Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Displaying certain text depending on item category

Displaying certain text depending on item category

Locked

Views: 1,585

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
12 Sep 2006, 2:16 AM
#1
deker avatar

deker

New Zenner

Join Date:
Nov 2003
Posts:
12
Plugin Contributions:
0

Displaying certain text depending on item category

On the shop I am currently working on I have some products that need to be sold "by the yard" and others that are "per button", "per item", etc. Is there a way to change this text depending on which category the item is listed in?

For example on this page: http://simplysunshine.com/index.php?main_page=product_info&products_id=1475 it needs to say $4.95 per Yard. But on this page: http://simplysunshine.com/index.php?main_page=product_info&products_id=1532 it needs to say "$1.30 per Button".

Any help is appreciated!

12 Sep 2006, 2:39 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Displaying certain text depending on item category

It might be worth coding in a new field for this ...

Then you can define what it should say, if anything, next to the price ...

You could do it as a interpreted value, like:

0 (blank)
1 per button
2 per item
3 per yard
etc.

Or, you could make Product Types ... which is more complicated but can be customized more specifically for dispaly and functionality ...

Or, if you are not into coding you could use Attributes where the
Option Name: Sold by
Option Type: READONLY

READONLY Attributes are only for display and do not get added to the cart nor act like attributes ...

They are a fast way to apply text to Products in a gang ...

Say you call it: per yard

Later you want it: by the yard

Just change the Option Value and it changes everywhere ...

12 Sep 2006, 2:41 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Displaying certain text depending on item category

NOTE: if you have your products and categories laid out well ... based on Categories or Parent Categories ... you could use that to build the text ...

12 Sep 2006, 10:44 AM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,701
Plugin Contributions:
56

Re: Displaying certain text depending on item category

A technique for how to add boilerplate text to the description field is described here:

http://www.thatsoftwareguy.com/zencart_php_in_description.html

This could be easily modified for your needs.

Scott

29 Dec 2007, 4:41 PM
#5
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Re: Displaying certain text depending on item category

Ajeh:

It might be worth coding in a new field for this ...

Then you can define what it should say, if anything, next to the price ...

You could do it as a interpreted value, like:

0 (blank)
1 per button
2 per item
3 per yard
etc.

Oh Linda! This is just what I need to do.... Is it very difficult to code it? Can you point me in a direction where I can learn to do it? The attribute thing won't work... and from what I can tell the broilerplate thing won't either. But what you described here is PERFECT! I NEED it so badly... :yes:

Can you help?

29 Dec 2007, 5:01 PM
#6
three_sisters avatar

three_sisters

Zen Follower

Join Date:
Nov 2006
Location:
Indiana
Posts:
188
Plugin Contributions:
0

Re: Displaying certain text depending on item category

On second thought... Maybe the boilerplate thing will work. I don't want the per yard, per pattern, etc to be in the description but rather appear after the price. But maybe I can use the article to show me how to do a related task.... Am I right? Any advise?