Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Input PHP into Product Description

Input PHP into Product Description

Locked

Views: 1,614

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
22 Jun 2009, 6:35 AM
#1
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Input PHP into Product Description

I have to add php-code into the product description. Not on all products, only some. It seems zen-cart is ignoring anything between the php-tags. Is there a way to do it?

22 Jun 2009, 10:16 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Input PHP into Product Description

php code cannot be embedded into product descriptions, as this data is housed in the database and is parsed AFTER the php code in the core files has done its job of assembling the page.

What are you trying to achieve? Maybe there's another way?

23 Jun 2009, 5:52 AM
#3
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: Input PHP into Product Description

I want to make a box under some products which recommends related products (like "if you got this pink shirt, we recommend these yellow socks").
I would have written a php class which receives the product id and then searches the relating data from the DB.
Of course it can be done just by html, but it takes much more time to input image src, href etc.

23 Jun 2009, 6:42 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Input PHP into Product Description

Scott Wilson (swguy) has done this for you... he has written a number of modules that enable up-sell and cross-sell. Look at the Marketing section of the Free Add-ons (link above).

23 Jun 2009, 7:46 AM
#5
todoonada avatar

todoonada

Zen Follower

Join Date:
Nov 2006
Posts:
127
Plugin Contributions:
0

Re: Input PHP into Product Description

Thanks, schoolboy.
And thank you Scott Wilson.

23 Jun 2009, 11:08 AM
#6
swguy avatar

swguy

Administrator

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

Re: Input PHP into Product Description

You're welcome. :)