Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default 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?
    20 years a Zencart User

  3. #3
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default 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).
    20 years a Zencart User

  5. #5
    Join Date
    Nov 2006
    Posts
    127
    Plugin Contributions
    0

    Default Re: Input PHP into Product Description

    Thanks, schoolboy.
    And thank you Scott Wilson.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: Input PHP into Product Description

    You're welcome. :)
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. How can PHP be inserted into the Products Description area?
    By Donn in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 1 Nov 2010, 01:54 AM
  2. why I can only input 7 words for each line of product description?
    By mybiz9999 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 30 Sep 2010, 12:52 PM
  3. Manual Product Input thru PHP
    By elgrcg in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 17 Sep 2010, 08:44 AM
  4. How to include php code into a product description
    By andy1234 in forum General Questions
    Replies: 10
    Last Post: 5 Jan 2008, 06:32 AM
  5. Help embedding PHP into a description
    By baschwar in forum Basic Configuration
    Replies: 6
    Last Post: 13 Aug 2006, 10:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg