- Posts: 7
- Thank you received: 0
Questions about Payment Form extension
Coupon Code Field - Change field order & name
- Robin Smith
- Topic Author
- Offline
- New Member
-
Less
More
12 years 9 months ago #15530
by Robin Smith
Coupon Code Field - Change field order & name was created 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!
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.
- autopilot
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
12 years 9 months ago #15662
by autopilot
Replied by autopilot on topic Re: Coupon Code Field - Change field order & name
Yes !! Me too!!!
Please Log in or Create an account to join the conversation.
- autopilot
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
12 years 9 months ago #15663
by autopilot
Replied by autopilot on topic Re: Coupon Code Field - Change field order & name
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
-
Less
More
- Posts: 7
- Thank you received: 0
12 years 9 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....
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
- Offline
- Administrator
-
12 years 9 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
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.
- abdullah
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
12 years 8 months ago - 12 years 8 months ago #16372
by abdullah
Replied by abdullah on topic Re: Coupon Code Field - Change field order & name
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
regards
Last edit: 12 years 8 months ago by abdullah.
Please Log in or Create an account to join the conversation.
- abdullah
- Offline
- New Member
-
Less
More
- Posts: 2
- Thank you received: 0
12 years 8 months ago #16419
by abdullah
Replied by abdullah on topic Re: Coupon Code Field - Change field order & name
hi
anybody, can you please tell me what part of the code should i move and to where,
best regards
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
- Offline
- Administrator
-
12 years 8 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 :
Regards,
Tuan
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.
- MyWorld
- Offline
- Elite Member
-
Less
More
- Posts: 189
- Thank you received: 0
12 years 8 months ago #16706
by MyWorld
Replied by MyWorld on topic Re: Coupon Code Field - Change field order & name
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!!
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.
- Dave
- Offline
- Senior Member
-
Less
More
- Posts: 68
- Thank you received: 0
12 years 1 week ago #26302
by Dave
Replied by Dave on topic Re: Coupon Code Field - Change field order & name
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
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
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.