Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
  1. #1
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    388
    Plugin Contributions
    0

    Default Exclude category from also purchased?

    I was wondering if anyone can tell me how to exclude a category from this feature. I'm still running on 1.3.9h and could really use some help with this. I have a category that does not have images and I would rather have those products not show at all. Thanks for the help!

  2. #2
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    705
    Plugin Contributions
    5

    Default Re: Exclude category from also purchased?

    Edit your includes/templates/YOUR_TEMPLATE/templates/tpl_modules_also_purchased_products.php (if you don't have that file there, then copy it from template_default)
    Find line 17 and change from
    Code:
    <?php if ($zc_show_also_purchased == true) { ?>
    to
    Code:
    <?php if ($zc_show_also_purchased == true && ($current_page_base == 'index' and $cPath != 'YOUR_CAT_ID') ) { ?>
    Replace YOUR_CAT_ID with the category ID where you don't want to show APP. I haven't tested, but it should work... Hopefully, you'll tell us if it does.
    What I've done lately: Goatee Saver | CCRSport | JonaMaria | LBB Adult Shop | Costelloe and Costelloe | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT

  3. #3
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    388
    Plugin Contributions
    0

    Default Re: Exclude category from also purchased?

    Sorry for the late response here, but this isn't working. It's showing up blank on my product pages and seems to have no effect on the shopping cart page at all. Would appreciate if you could take another look:-)

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    66,813
    Plugin Contributions
    6

    Default Re: Exclude category from also purchased?

    Try changing:
    Code:
    <?php if ($zc_show_also_purchased == true) { ?>
    To read:
    Code:
    <?php if ($zc_show_also_purchased == true && ($current_category_id != '10') ) { ?>
    Where 10 is the immediate category ... this would be, for example when you see $cPath=3_10 in the URL the last number is the $current_category_id and when you see $cPath=21 in the URL then you would use 21 ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    388
    Plugin Contributions
    0

    Default Re: Exclude category from also purchased?

    Hi Linda, thanks so much for being so speedy. However, this also seems to have no effect. My category ID is 70, I have subcats 71, 72, 75, and 76. Have tried all of them in the code you provided to no avail

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    66,813
    Plugin Contributions
    6

    Default Re: Exclude category from also purchased?

    Let's say in the URL I see:
    cPath=3_10
    cPath=3_12
    cPath=3_15

    and I do not want to see the Also Purchased on these ...

    I would use the code:
    Code:
    <?php if ($zc_show_also_purchased == true && ($current_category_id != '10' && $current_category_id != '12' && $current_category_id != '15') ) { ?>
    So in your case you would use:
    71, 72, 75, and 76

    Just add an additional:
    && $current_category_id != 'XX'

    for each one that you need to add ... where XX is the number on the end of the cPath= that you see in the URL when on a Product where you are not wanting to see the Also Purchased ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  7. #7
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    388
    Plugin Contributions
    0

    Default Re: Exclude category from also purchased?

    Hi Linda,

    I'm sorry but it seems this modification is having no effect on both the product page and the shopping cart page where I have the "also purchased" mod enabled. I am still seeing the items from the category and subcategories on all my pages

    My code looks like this:

    Code:
    <?php
    /**
     * Module Template
     *
     * Displays content related to "also-purchased-products"
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_also_purchased_products.php 3206 2006-03-19 04:04:09Z birdbrain $
     */
      $zc_show_also_purchased = false;
      include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_ALSO_PURCHASED_PRODUCTS));
    ?>
    
    <?php if ($zc_show_also_purchased == true && ($current_category_id != '71' && $current_category_id != '72' && $current_category_id != '75' && $current_category_id != '76') ) { ?>
    <div class="centerBoxWrapper clearfix" id="alsoPurchased">
    <?php
      require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
    ?>
    </div>
    <?php } ?>

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    66,813
    Plugin Contributions
    6

    Default Re: Exclude category from also purchased?

    Have you an URL to the Products where you are trying to make this change work?
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  9. #9
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    388
    Plugin Contributions
    0

    Default Re: Exclude category from also purchased?

    Surely, there's this page: http://www.perfectlocks.com/virgin-i...ian-hair-weave

    The product "10" Wavy Machine Weft (#2 Dark Brown)" is from our "clearance rack" and does not have an image associated with it. None of our "Clearance Rack" items have an image, that's why I'm trying to find a workaround for this.

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    66,813
    Plugin Contributions
    6

    Default Re: Exclude category from also purchased?

    Is your templates and overrides using:
    plocks_v1

    If so, could you look to see if you have a templates and overrides file:
    /includes/templates/plocks_v1/templates/tpl_modules_also_purchased_products.php

    If so, can you put the custom code in your templates and overrides file ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. How to remove price information from "also purchased" box?
    By wilsonshen in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 May 2011, 06:45 AM
  2. Horizontal Product Display (also purchased, featured products, category images)
    By jayhos in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 1 Feb 2011, 11:29 AM
  3. Remove price from also purchased display
    By ggbarnum in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 17 Oct 2010, 01:30 AM
  4. Disable Specific Product from Customers who bought/selected also purchased...
    By dharma in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Dec 2009, 07:18 PM
  5. remove product name from also purchased
    By etoile03 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 26 Jul 2006, 05:39 PM

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
  •