Foro de WP Car Rental

Please or Registro to create posts and topics.

CouponCode Step on 4 Step

Hello i would like to ask if can you tell me how to put the Coupon Code field also on the 4 step on my website. I make it with Phpstorm if this is needed.

Also on the next Update can we put when we have a coupon code on the last page the costumer see the percent that he win with this coupon so can the costumer really believe that we have an action made! thanks a lot

Hello Alex,

Yes, I havent tested it, but the following code should do the work if using Car rental system v5.0.2+:

<form action="" name="coupon-submit" id="coupon-submit" method="post">
    <input type="hidden" name="<?= esc_attr( $extPrefix . $orderCodeParam ); ?>" value="<?= esc_attr( $orderCode ); ?>"/>
    <input type="hidden" name="<?= esc_attr( $extPrefix ); ?>do_not_flush" value="yes"/>
    <input type="text" name="coupon_code"
           value="<?= esc_attr( $couponCode != "" ? $couponCode : $lang['LANG_COUPON_CODE_INPUT2_TEXT'] ); ?>"
    class="coupon-code" title="<?= esc_attr( $lang['LANG_COUPON_CODE_TEXT'] ); ?>"
    onfocus="if(this.value === '<?= esc_js( $lang['LANG_COUPON_CODE_INPUT2_TEXT'] ); ?>') {this.value=''}"
    onblur="if(this.value === ''){this.value ='<?= esc_js( $lang['LANG_COUPON_CODE_INPUT2_TEXT'] ); ?>'}"/>
    <button type="submit" name="<?= esc_attr( $extPrefix ); ?>do_search4" class="button">Apply</button>
</form>

I will check if I can add the percentage from theme before next update, otherwise you will have to ask this to plugin author.

Regards

hello again thanks a lot but what file i must open and put it in because i have try on /wp-content/plugins/FleetManagement/Controllers/Front/Search/Step5SummaryController.php and it is not working

 

No worries i made it and work perfectly thanks a lot for your help!!!!!!

https://imgur.com/ENw2EhL

 

check out for the next update idea! thanks alot

Thank you very much for the coupon information. I did the same update on my website, everything works fine. Even there is now a new opportunity to add bonus codes for no deposit operations. Very cool option.

Very good idea Alex, I might add it on next update.

Thank you!