Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 52
  1. #31
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    Yellow1912 is no longer active in the forum. What you are asking for here is a highly specific and complex set of custom coding, and you will need to hire someone to write it if you can't do it yourself. Look for the Commercial Help Wanted section, with its link to oDesk for posting your request.

  2. #32
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    I'm a bit confused on this thread. I want the same thing, just to use a different product listing template file for a certain category.

    What is the code required and what file do I insert it in?

  3. #33
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    Actually I need it to use a different tpl_columnar_display.php file..

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

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    I think you would put your if() test in /includes/templates/your_template/templates/tpl_modules_product_listing.php, which is what calls tpl_columnar_display.php.

  5. #35
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    This is what Ive got and the modified extra line in the middle, but at the moment it brings up two lots of listings (one below the other) on one page if im in category 544.

    How do I make it only display the one listing (tpl_columnar_display2.php)?

    <?php
    /**
    * load the list_box_content template to display the products
    */
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
    require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');

    }


    if ($current_category_id !== 544) {
    require($template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display2.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');
    }
    ?>

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

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    I expect you have set the listing style to "columns".
    Then when it gets to the first if(), it outputs the listing because that is true, and when it gets to the second if() that is also true so it outputs again. You need to reorganize the tests so you cover each possibility once. The way your posted code is written, you will get the extra listing unless you are on cat 544 ($current_category_id !== 544). Is that what you want?
    PHP Code:
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
    require(
    $template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display.php');

    }


    if (
    $current_category_id !== 544) {
    require(
    $template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display2.php');

    }


    else {
    // (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') 
    needs to be something like
    PHP Code:
    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns') {
      if (
    $current_category_id == 544) {
        require(
    $template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display2.php');
      } else {
        require(
    $template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_columnar_display.php');
      }
    } else {
    // (PRODUCT_LISTING_LAYOUT_STYLE == 'rows') 

  7. #37
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    Ok ive got this working, but working in reverse, ie cat 544 is pulling up tpl_tabular_display.php and all other cats are pulling up tpl_columnar_display2.php

    <?php
    /**
    * load the list_box_content template to display the products
    */


    if (PRODUCT_LISTING_LAYOUT_STYLE == 'columns' AND $current_category_id !== 544) {
    require($template->get_template_dir('tpl_columnar_display2.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display2.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');
    }
    ?>

    Any ideas? What I also want is multiple statements for multiple cats, so they can pull up different columnar display files for each category.

  8. #38
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    Ah sorry, didnt see your post, ill try it now.

  9. #39
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    Thanks Glen they worked perfectly, how would I do multiple cats for multiple files?

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

    Default Re: Is this possible ? Two or more product listing layouts (one per category)?

    The current code you have posted will call tpl_columnar_display.php if you are set to "columns";
    tpl_columnar_display2.php if you are not in cat 544 no matter the setting;
    or tpl_tabular_display.php if you are in cat 544 no matter the setting.

    Nevermind, I didn't see your posts after my previous one.

 

 
Page 4 of 6 FirstFirst ... 23456 LastLast

Similar Threads

  1. How can I implement multiple product listing layouts based on category
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Jul 2011, 07:44 PM
  2. Two Site with One Paypal account...is this possible?
    By PinkLeopard in forum PayPal Website Payments Pro support
    Replies: 7
    Last Post: 12 Jan 2010, 04:04 AM
  3. Newbie - Possible to create more than one category filter?
    By henrytan in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Oct 2008, 09:22 AM
  4. One product database + two kinds of handling possible?
    By pe7er in forum General Questions
    Replies: 2
    Last Post: 21 Mar 2008, 05:32 PM
  5. Is it possible to have two different Prod Listing Layouts?
    By rwoody in forum Setting Up Categories, Products, Attributes
    Replies: 16
    Last Post: 14 Oct 2006, 05:24 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR