Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Mod to Grid Layout product display page

    I'm trying to mod the product_listing.php so that all products with priced attributes will have "from" before the price within the grid listing product display. I think I can do it using a conditional If statement and I thought I would use the zen_has_product_attributes_values($products_id) variable that seems to be set to true if the case is met. Can't seem to get it to work as I'm not sure how to compare the value. Not a programmer so may be getting a little confused. Need something along the lines of:

    Code:
     
    if  (zen_has_product_attributes_values($products_id) =="true") {
    $lc_price = 'from ' . zen_get_products_display_price($listing->fields['products_id']) . ''; 
    } else {
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . ''; 
    }
    (zen_has_product_attributes_values($products_id) = true) is obviously wrong so if someone can steer me in the right direction it would be much appreciated.

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

    Default Re: Mod to Grid Layout product display page

    $products_id is most likely $listing->fields['products_id']
    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
    Mar 2005
    Location
    UK
    Posts
    38
    Plugin Contributions
    0

    Default Re: Mod to Grid Layout product display page

    Brilliant!

    Worked first time. If anyone else is interested I changed the code as follows:

    Code:
    case 'PRODUCT_LIST_PRICE':
    if  (zen_has_product_attributes_values($listing->fields['products_id']) =="true"){
    $lc_price = 'from ' . zen_get_products_display_price($listing->fields['products_id']) . ''; //JRG line break removed and from included
    } else {
    $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '';
    }
    $lc_align = 'right';
    $lc_text =  $lc_price;
    Ajeh,

    Many Thanks.

    Bought you a cup of coffee (no biscuits!). If you get the chance to explain exactly what $listing->fields does it would be appreciated

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

    Default Re: Mod to Grid Layout product display page

    Glad to hear that this was able to resolve your issues ...

    Thanks very much for the support ... we really appreciate it to help keep Zen Cart growing and growing and growing!

    Whether it's a cup of coffee or a great big urn of coffee ... every little bit helps ...
    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!

 

 

Similar Threads

  1. Column Layout Grid for Product Listing mod
    By johnybravo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Sep 2011, 03:42 PM
  2. Help: Product Listing Grid Layout Mod DISASTER!
    By BabaGee in forum Customization from the Admin
    Replies: 4
    Last Post: 16 May 2011, 04:28 AM
  3. how can I change product display ? Column Layout Grid
    By neveu in forum Addon Templates
    Replies: 9
    Last Post: 12 Nov 2010, 02:41 AM
  4. Product Listing Grid Layout Mod need help
    By covone in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Nov 2006, 10:41 PM
  5. make column-layout-grid mod to look like special listing layout
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Oct 2006, 02:18 AM

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