New Zenner
- Join Date:
- Apr 2007
- Posts:
- 72
- Plugin Contributions:
- 0
Adding text after price
On the product listing page I would like to add the words "per set" after the price (on the same line). How do I do this?
Thanks.
Views: 1,497
New Zenner
On the product listing page I would like to add the words "per set" after the price (on the same line). How do I do this?
Thanks.
Oba-san
Get a really big screen ... :eek:
Is that even going to fit on one line?
What about with a Special or a Sale?
This can be done, but I don't think you have room for it on one line ...
Is that the only place you need to see this?
New Zenner
Yes, that's the only place it needs to show. Could you please tell me how? Thanks!
Oba-san
Copy the products_listing module to your templates and overrides directory and you can add in the text or via a constant what you would like to see ...
Then set the width in the Configuration ... Product Listing for the Price column to be wide enough to accommodate this ...
New Zenner
Thanks. I've tried adding it both ways, using a constant and text, but nothing is showing. I set the price column to 200. Could you please show me where exactly in the code I need to add the text? I don't know php all that well.
Thanks.
Black Belt
In /includes/modules/your_template/product_listing.php, find this section ```php
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;
[ space ] per set
to get this ```php
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . ' per set<br />';
$lc_align = 'right';
$lc_text = $lc_price;
New Zenner
Thanks. I tried this but no change.
Black Belt
Then you have somehow not gotten the edit to the right place to be recognized.
What is your custom template name?
What is the filepath to your custom template?
What is the filepath to your edited product_listing.php?
Post the section of the file that you edited (say 5 lines on either side).
New Zenner
That was it. I was uploading to the wrong folder. Thank you!
Tell staff why this post should be reviewed.