Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    help question Turn a field on/off in product listing

    I've created a new product type that merely added one field. I've also coded product_listing to display the field on the listing page. 90% of the customer's products will need this field, but there are a few to include Gift Cards (Gift Certificates) that I would rather not have it show.

    Is there a bit of code that could be added to the template that could detect the product type and if not product_type 6 don't display field?

    I'm not quite sure how to go about this. Any suggestions would be greatly appreciated.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Turn a field on/off in product listing

    You would need to customize the product listing files so that when the products_type is not your new Product Type the individual listing will exclude that field ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Aug 2007
    Location
    Tampa FL.
    Posts
    142
    Plugin Contributions
    0

    Default Re: Turn a field on/off in product listing

    $query = "SELECT your_field, FROM your_table WHERE product_type='6' and products_status='1' ;
    $result = mysql_query($query) or die(mysql_error());
    // Print out result
    while($row = mysql_fetch_array($result)){
    echo $row['your_field to be displayed'];



    }

    ?>

 

 

Similar Threads

  1. Can I turn off Quantity Box and Qty field in subcategory page (all product listing)?
    By bigstore in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Mar 2012, 10:28 PM
  2. Product Description turn off on subcat listing
    By cshart in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 15 Aug 2010, 08:56 PM
  3. How to turn off breadcrumbs on product listing page?
    By alicia1234 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 Nov 2008, 02:45 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