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

    Idea or Suggestion [Done v1.3.9] out stock products can be seen issue bug and fix

    I f customers turn a product to 'out stock' status. his product is supposed to can not be seen anywhere if the status of '$include_deactivated' is false which is false in default. But there is a bug. I can see the products that i set to out stock. I researched the source code. And finally i found the reason.

    in YOUR_STORE_DOMAIN/includes/functions/functions_categories.php.
    go to function 'zen_get_categories_products_list'.

    Change the following line

    $sql = "select p.products_id
    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_id = p2c.products_id
    and p2c.categories_id = '" . (int)$childCatID . "'" .
    ($include_deactivated ? " and p.products_status = 1" : "") .
    $display_limit;

    to:

    $sql = "select p.products_id
    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
    where p.products_id = p2c.products_id
    and p2c.categories_id = '" . (int)$childCatID . "'" .
    ($include_deactivated ? "" : " and p.products_status = 1") .
    $display_limit;

    It might be a tiny logic mistake.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: out stock products can be seen issue bug and fix

    What Version?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: out stock products can be seen issue bug and fix

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jan 2008
    Posts
    2
    Plugin Contributions
    0

    bug Re: [Done v1.4.0] out stock products can be seen issue bug and fix

    The latest version. V1.3.8.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 17 Jan 2012, 08:20 AM
  2. Replies: 7
    Last Post: 10 Jun 2010, 10:43 AM
  3. [Done v1.3.8] Database cache bug and fix
    By bouncingltd in forum Bug Reports
    Replies: 19
    Last Post: 14 Jul 2009, 03:26 PM
  4. Applying discount on out of stock items...can it be done?
    By brucemead in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 3
    Last Post: 26 Feb 2008, 01:27 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