Zen Cart Logo

Adding text after price

Locked

Views: 1,497

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
22 May 2007, 9:57 PM
#1
jordana avatar

jordana

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.

27 May 2007, 3:51 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding text after price

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?

3 Jun 2007, 7:07 PM
#3
jordana avatar

jordana

New Zenner

Join Date:
Apr 2007
Posts:
72
Plugin Contributions:
0

Re: Adding text after price

Yes, that's the only place it needs to show. Could you please tell me how? Thanks!

3 Jun 2007, 7:29 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding text after price

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 ...

3 Jun 2007, 10:12 PM
#5
jordana avatar

jordana

New Zenner

Join Date:
Apr 2007
Posts:
72
Plugin Contributions:
0

Re: Adding text after price

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.

3 Jun 2007, 10:40 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding text after price

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;
3 Jun 2007, 11:02 PM
#7
jordana avatar

jordana

New Zenner

Join Date:
Apr 2007
Posts:
72
Plugin Contributions:
0

Re: Adding text after price

Thanks. I tried this but no change.

3 Jun 2007, 11:40 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding text after price

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).

3 Jun 2007, 11:50 PM
#9
jordana avatar

jordana

New Zenner

Join Date:
Apr 2007
Posts:
72
Plugin Contributions:
0

Re: Adding text after price

That was it. I was uploading to the wrong folder. Thank you!