Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Plugin Contributions
    0

    Default Product listing, group products.

    Hi,

    I've been trying to make my product listing something like this:

    Group 1
    ---------
    Product 1
    Product 2

    Group 2
    ---------
    Product 3
    Product 4

    I added a new field in the products table and named that 'products_group'. In modules/product_listing.php I made this change to test that I could get the value of my new field.
    Code:
    case 'PRODUCT_LIST_PRICE':
            $lc_price = '<div class="list-price">' . zen_get_products_display_price($listing->fields['products_id']) . $listing->fields['products_group']. '</div>';
            $lc_align = 'right';
            $lc_text =  $lc_price;
    It works, I get the value next to the product price. I've been trying to customize tabular_display.php, but I get nowhere.

    If $listing->fields['products_group'] = 0
    Show default product listing

    If $listing->fields['products_group'] = 1
    echo a new header row with a custom name
    list products belonging to this group

    If $listing->fields['products_group'] = 2
    echo a new header row with a custom name2
    list products belonging to this group

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,918
    Plugin Contributions
    13

    Default Re: Product listing, group products.

    i'm guessing that you are looking at the script tpl_tabular_display.php as that is the only file i found close to what you mentioned.

    $listing is not available in that script from what i can tell. you need to add your new field into $list_box_contents in product_listing.php; else you can strip it out of $lc_price field that you already have.

    as $list_box_contents is a multi-dimensional array, it gets a little confusing as to where to add it.

    good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 

Similar Threads

  1. wrap group product listing information
    By keneso in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 14 Sep 2015, 04:24 PM
  2. Product listing layout - group several products together?
    By Maggie_2010 in forum Addon Templates
    Replies: 2
    Last Post: 24 Feb 2011, 08:23 AM
  3. Products not listing correctly in Product Listing
    By Blackwaterphil in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 9 Dec 2009, 06:26 PM
  4. display group pricing discount in product listing
    By aeisecurity in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Sep 2008, 02:17 PM
  5. Can I use features of All Products Listing in my Product Listing page?
    By bearaman in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Jun 2007, 05:56 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