Page 7 of 7 FirstFirst ... 567
Results 61 to 64 of 64
  1. #61
    Join Date
    Aug 2011
    Location
    Portland, Oregon
    Posts
    20
    Plugin Contributions
    0

    Default Re: Hidden Wholesale and Version 1.5

    This addon works just fine on Zen Cart version 1.5.

    I am having one difficulty with it when combined with the Master Password addon. When I log in as a wholesale customer and use the master password it won't show the hidden products. It shows the retail price until the product is added to the cart for other items. But, the hidden items are still hidden. Is there a code adjustment that will make these to addons work together? Thanks!

  2. #62

    Default Re: Hidden Wholesale and Version 1.5

    Hi, I have installed the all_sub_cats_products mod to show all products instead of sub cats title when you click a category. I would like to hide the wholesale product but I am not sure where to insert the custom restriction. Below is the code for includes\modules\pages\index\header_php.php which I think should be file to insert the custom restriction. Can someone please help me? Thank you.
    PHP Code:
    <?php
    /**
     * index header_php.php
     *
     * @package page
     * @copyright Copyright 2003-2011 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: header_php.php 18697 2011-05-04 14:35:20Z wilt $
     */

    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_INDEX');

    // the following cPath references come from application_top/initSystem
    $category_depth 'top';
    if (isset(
    $cPath) && zen_not_null($cPath)) {
        
    // bof all_sub_cats_products
      
    $_SESSION['category_tree']->build_deepest_level_children();
      
    $sub_cats implode(',',$_SESSION['category_tree']->retrieve_deepest_level_children($cPath));
      if(!empty(
    $sub_cats))
          
    $categories_products_query "SELECT count(*) AS total
                                    FROM   " 
    TABLE_PRODUCTS_TO_CATEGORIES "
                                    WHERE   categories_id IN (
    $sub_cats)";
       else    
       
    // eof all_sub_cats_products
      
    $categories_products_query "SELECT count(*) AS total
                                    FROM   " 
    TABLE_PRODUCTS_TO_CATEGORIES "
                                    WHERE   categories_id = :categoriesID"
    ;

      
    $categories_products_query $db->bindVars($categories_products_query':categoriesID'$current_category_id'integer');
      
    $categories_products $db->Execute($categories_products_query);

      if (
    $categories_products->fields['total'] > 0) {
        
    $category_depth 'products'// display products
      
    } else {
        
    $category_parent_query "SELECT count(*) AS total
                                  FROM   " 
    TABLE_CATEGORIES "
                                  WHERE  parent_id = :categoriesID"
    ;

        
    $category_parent_query $db->bindVars($category_parent_query':categoriesID'$current_category_id'integer');
        
    $category_parent $db->Execute($category_parent_query);

        if (
    $category_parent->fields['total'] > 0) {
          
    $category_depth 'nested'// navigate through the categories
        
    } else {
          
    $category_depth 'products'// category has no products, but display the 'no products' message
        
    }
      }
    }
    // include template specific file name defines
    $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_MAIN_PAGE'false');
    require(
    DIR_WS_MODULES zen_get_module_directory('require_languages.php'));

    // set the product filters according to selected product type
    $typefilter 'default';
    if (isset(
    $_GET['typefilter'])) $typefilter $_GET['typefilter'];
    require(
    zen_get_index_filters_directory($typefilter '_filter.php'));

    // query the database based on the selected filters
    $listing $db->Execute($listing_sql);

    // category is invalid or has no products, so don't index it:
    if ($category_depth == 'products' && $listing->RecordCount() == 0$robotsNoIndex true;

    // if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
    // if filter_id exists the 1 product redirect is ignored
    if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
      if (
    $listing->RecordCount() == 1) {
        
    zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath 'cPath=' $cPath '&' '') . 'products_id=' $listing->fields['products_id']));
      }
    }

    // This should be last line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_END_INDEX');

  3. #63

    Default Re: Hidden Wholesale and Version 1.5

    Quote Originally Posted by Defanci View Post
    Hi, I have installed the all_sub_cats_products mod to show all products instead of sub cats title when you click a category. I would like to hide the wholesale product but I am not sure where to insert the custom restriction. Below is the code for includes\modules\pages\index\header_php.php which I think should be file to insert the custom restriction. Can someone please help me? Thank you.
    Problem solved. Here the fix in case you need.
    Edit \includes\index_filters\default_filter.php

    Replace
    PHP Code:
    bof all_sub_cats_products */
             if(!empty(
    $sub_cats)) 
                 
    $listing_sql .=  "and p2c.categories_id IN($sub_cats)" .
             
    $alpha_sort;
             else 
    /* eof all_sub_cats_products*/ 
    with
    PHP Code:
    /* bof all_sub_cats_products */
             
    if(!empty($sub_cats)) 
                 
    $listing_sql .=  "and p2c.categories_id IN($sub_cats)" $custom_restriction .
             
    $alpha_sort;
             else 
    /* eof all_sub_cats_products*/ 

  4. #64
    Join Date
    Nov 2019
    Location
    Calgary, Alberta, Canada
    Posts
    1
    Plugin Contributions
    0

    Default Re: Hidden Wholesale

    Has anyone found a way to allow Hidden Wholesale and Attribute pricing to play nice together?


    I have the dual pricing mod installed and working great. I also have the hidden wholesale mod installed and working, but when hidden wholesale makes everything that is priced at 0 as a wholesale product the price by attributes is broken for the retail products.

 

 
Page 7 of 7 FirstFirst ... 567

Similar Threads

  1. v150 Dual pricing/ hidden wholesale...
    By rainbow_pixie_star in forum General Questions
    Replies: 1
    Last Post: 25 Sep 2013, 11:01 AM
  2. hidden wholesale help needed!
    By rainbow_pixie_star in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Feb 2012, 03:48 PM
  3. Need to have wholesale pricing with quantity discounts for wholesale customers only..
    By littleturtlemama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 16 Dec 2010, 04:47 AM
  4. Cpath incorrect on links to Subcategories from category page (hidden wholesale mod)
    By jackie.taferner in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 3 Nov 2010, 04:10 PM
  5. making a hidden wholesale only category?
    By daniellebaklava in forum General Questions
    Replies: 1
    Last Post: 10 Jun 2007, 10:44 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR