Questions about Payment Form extension

Coupon Code Field - Change field order & name

  • Robin Smith
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago #15530 by Robin Smith
Hello,

I want to change the order in which my form displays the coupon field. Right now, it's at the very top, and I'd like it to be at the bottom (or have the ability to put it somewhere else). The coupon field doesn't show up in the fields setting so I can't change the order there.

I also want to know how to change the title of the field from "Coupon" to something else, like "Discount Code". What files do I need to modify to change this?

Thanks!

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #15662 by autopilot
Yes !! Me too!!!

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #15663 by autopilot
Also - the coupon discount needs to apply to [AMOUNT] - how do I get that to work?

Please Log in or Create an account to join the conversation.

  • Robin Smith
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 11 months ago #15668 by Robin Smith
Replied by Robin Smith on topic Re: Coupon Code Field - Change field order & name
Update:

I figured out how to change the name of the field - you have to go to the "Translation" tab in the backend and you can find teh coupon field near the bottom. Just type whatever you want to rename the field in the text field and save.

Still not sure of how to move the Coupon Code field down to the bottom....

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
11 years 11 months ago #15689 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Coupon Code Field - Change field order & name
Hi

If you want to change position of coupon code field, you will need to edit the code. Look at the file components/com_pmform/views/form/tmpl/default.php, you will see code for the coupon field and should be able to move it to the position you need .

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago - 11 years 10 months ago #16372 by abdullah
can you please specify what part of the code we should move and where to place? in order to display the coupon field at the end of the form


regards
Last edit: 11 years 10 months ago by abdullah.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #16419 by abdullah
hi

anybody, can you please tell me what part of the code should i move and to where,

best regards

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
11 years 10 months ago #16436 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Coupon Code Field - Change field order & name
Hi abdullah

You will need to know alitle PHP / HTML code to move. Open the file components/com_pmform/views/form/tmpl/default.php , find the code below and move it to the position you want :
Code:
<?php if ($this->enableCoupon) { ?> <tr class="title_cell key"> <td class="title_cell" width="30%"> <?php echo JText::_('PF_COUPON') ?> </td> <td class="field_cell"> <input type="text" class="inputbox" name="coupon_code" value="<?php echo $this->couponCode; ?>" size="18" /> <?php if ($this->errorCoupon) { ?> <span class="invalid"><?php echo JText::_('PF_INVALID_COUPON'); ?></span> <?php } ?> </td> </tr> <?php }


Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #16706 by MyWorld
Hi Tuan,

In most cases the "Coupon Code" is at the bottom of a form. This is just a suggestion - why not put it at the bottom as the default instead of having us move it around?

Thanks!!

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #26302 by Dave
Hi Tuan,

I too would like to move the Coupon field to the bottom of my form (right above the "Review and Checkout" button). I tried cutting and pasting the code as you described but something did not work - The page with my form would no longer load.

1. Here is my page: tenota.com/index.php/tenota-services/single-tea-note

2. Where exactly should I paste the code in order to move the Coupon field to the right place?

I attached my "default.php" file in case you need to see it

Thanks!
Dave

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc