Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Is it possible to have two different Prod Listing Layouts?

    If you wanted categories_id 1 to be rows and all others columns and you were set to columns and change the IF to read:

    PHP Code:
    <?php
    /**
    * load the list_box_content template to display the products
    */
    if ($current_category_id != && PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
    require(
    $template->get_template_dir('tpl_columnar_display.php',DIR_W S_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display.php');
    } else {
    // (PRODUCT_LISTING_LAYOUT_STYLE == 'rows')
    require($template->get_template_dir('tpl_tabular_display.php',DIR_WS _TEMPLATE$current_page_base,'common'). '/tpl_tabular_display.php');
    }
    ?>
    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!

  2. #12
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Is it possible to have two different Prod Listing Layouts?

    No joy unfortunately - I've been working locally and as I got mods working uploaded to the build area, but I went ahead and loaded this one so you could see -

    On the online site the category in questions is '6' so I changed that in the code of course - but as you can see - if you click here http://69.50.202.136/index.php?main_...dex&cPath=6_12 we're still in columns - now I just had a thought as I pasted the url - The primary category is 6 with 5 subcategories - should that make a difference as the products are all actually in the subcategories? - As I'm writing this I changed the cat_id to 12 (one of the subcategories) and i did notice that it was now properly interpreting the .css style for the columns (which it was not before), but the candles still appear in columns.

    Not sure where to go from here....

    Thank you so much for trying to help me here. This has dead stopped me from going ahead and getting this done for her. she's really had a hard time with her site, as she lost it completely about two months ago, to no fault of her own.
    Last edited by rwoody; 10 Oct 2006 at 05:20 AM.

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

    Default Re: Is it possible to have two different Prod Listing Layouts?

    Do you have Categories and Products mixed in Categories?

    Categories hold Categories or they hold Products ... they do not hold both at the same time as thing will not function correctly ...

    Your Category 6 appears to hold both Products and Categories ...

    Separate them properly like they should be, then test ...

    Note: $current_category_id is the immediate categories_id for the Products in the products_listing ...
    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!

  4. #14
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Re: Is it possible to have two different Prod Listing Layouts?

    In regards to the category/product structure - it is correct - Top Category is Candle - which is ID 6 (no products there) Sub Categories - Jar Candles Small cat id = 12 - Jar Candles Medium cat id = 13- Jar Candles Large cat id = 14 - Votives cat id = 24 and Melts cat id 25. All the products are sitting directly in these Sub-Categories.

    All products lying in the subcategories under the Top Category of Candle to be in a row layout. All other categories on the site are to be in Columns.

    So my questions goes back to under the code you've helped with where the category id listed is to be in rows, will that effect it's direct subcategories also, since that is in fact where the products lie? Based on what I'm seeing the short answer is "no". If that is the case is there a way of writing the category id to be 6_wildcard (the wildcard - whatever symbol that required to represent the subcategories) that will be correctly read by the system? I've included a screen shot of the admin.

    Thanks again for assisting with this. If I cannot do this, I'm going to look at the short descriptions mod as the descriptions in this layout are entirely too long for this type of layout as she wishes columns to be 4 across and this will just not work well. It's far too crowded. I'm assuming the short description mod provides for a shorter description for product listing and an expanded version for product detail, is that correct?

    Thaks again
    Attached Images Attached Images  

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Is it possible to have two different Prod Listing Layouts?

    As I alluded to in your other thread, the ereg function can do this wildcard pattern matching.

    To match a top cat alone, use "^6$" - the ^ means beginning of string and $ means end of string, thus matching 6 and nothing else.
    To match any subcat of 6, use "^6_" - this means starting with 6_ followed by anything or nothing, which will match all subcats etc. but not the top cat.
    To match both cases, use "(^6$|^6_)" - this means matching either the first or second pattern separated by |.

    I'm not sure what the format is for $current_category_id - whether it matches $cPath for subcats or what... this wants Ajeh's expertise.

  6. #16
    Join Date
    Oct 2006
    Posts
    149
    Plugin Contributions
    0

    Default Re: Is it possible to have two different Prod Listing Layouts?

    Hi,

    I am working on the same problem - need two diffefent prod listing templates to be switched. Have you managed to do this?
    Thanks
    A

  7. #17
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Is it possible to have two different Prod Listing Layouts?

    Yes it is possible and I finally got it done. I'm running out right now, but as soon as I can, I'll pull what I did (took awhile to figure it out) and give you some info. Off the top of my head - edited the tpl_modules_products_listing.php and the modules/products_listing.php and had to add a function... I think... can't remember right now... but that will give you a place to start. Got some help on this as I was not getting the changes to pull through and really frustrated, but it does now.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 31 Jan 2014, 01:50 AM
  2. Is this possible ? Two or more product listing layouts (one per category)?
    By risant in forum Templates, Stylesheets, Page Layout
    Replies: 51
    Last Post: 15 Nov 2013, 02:53 AM
  3. I'm Stumped...same layouts two different results...
    By bigblue in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Apr 2011, 06:10 PM
  4. Different product listing layouts for different categories?
    By kbascombe in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Apr 2010, 09:36 AM
  5. Two different login page layouts
    By JackA in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Dec 2007, 10:42 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