Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2015
    Location
    California
    Posts
    54
    Plugin Contributions
    0

    Default "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    (not entirely sure this issue is due to my recent to upgrade to 1.5.5a, but that is when we noticed it)

    The "also purchased products" section seems to be displaying every product that the db query finds and is not limited by the MAX_DISPLAY_ALSO_PURCHASED entry. After reading this thread: https://www.zen-cart.com/showthread....er-small-thing , I noticed that the number of also purchased products does max out at 50, so the db query is apparently working fine, but the php is apparently not limiting the displayed number of products to the value of MAX_DISPLAY_ALSO_PURCHASED.

    So I'm assuming something is messed up with my php, my site is heavily modified so this doesn't surprise me. But I really have no idea where to go to fix this. As far as I can tell, everything in "also_purchased_products.php" is fine, specifically the line

    PHP Code:
      $also_purchased_products $db->ExecuteRandomMulti(sprintf(SQL_ALSO_PURCHASED, (int)$_GET['products_id'], (int)$_GET['products_id']), MAX_DISPLAY_ALSO_PURCHASED); 
    Any help or pointing the right direction is appreciated. Thanks!

  2. #2
    Join Date
    Jan 2017
    Location
    Bulgaria
    Posts
    11
    Plugin Contributions
    0

    Default Re: "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    I have the same problem!?

  3. #3
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    Not where I can test this on/against a demo store, but from the above thread and another earlier one discussing changes introduced in ZC 1.5.5 about the ->Move(0) function as it was modified. It appears that there was a subsequent change to the also_purchased.php module file. So, question regarding the "upgrade", is there an override version of the file in your template directory (includes/modules/YOUR_TEMPLATE) and was it upgraded to follow the new methodology?

    This of course assumes also that such code was all written/tested successfully to limit the number of results based on the maximum quantity entered.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    FYI, did just do a test of this "process" using ZC 1.5.5d. Besides learning a little something about the "customers that purchased this also purchased:" query. It only returns results of products that were purchased at the same time as the product on screen. I expected it to possibly identify every other product that was ever purchased by all people that had ever purchased this product. But, that's not how the query was written...

    Anyways, I made a purchase of four product in one purchase. When I returned to one of the products, was presented with three other products (the other three). Changed the max in the admin to 2 and when returning to that product only 2 items showed. Not the three. This indicated that the limit (identified by the constant and not the limit 50 that was in the query) was being respected...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jan 2017
    Location
    Bulgaria
    Posts
    11
    Plugin Contributions
    0

    Default Re: "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    In my shop does not work - there are products purchased together with 20-30 other and they all appear below.

  6. #6
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: "also purchased products" not limited by MAX_DISPLAY_ALSO_PURCHASED

    So how is the software of your store different than the software of a clean install? What files are present on yours that are not in a clean install, what are missing, how are they different?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v150 where to control "also purchased" products
    By soso838 in forum General Questions
    Replies: 8
    Last Post: 3 Aug 2012, 01:05 AM
  2. Turning off my "also purchased" does not work
    By MK1990 in forum General Questions
    Replies: 3
    Last Post: 1 Dec 2011, 09:16 PM
  3. "Also Purchased" Not Displaying on Product Info Page
    By nlcabrera in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Sep 2010, 11:31 PM
  4. Replies: 1
    Last Post: 1 Apr 2010, 10:22 AM
  5. Reset the "Also purchased" module in "product info"
    By Char3 in forum General Questions
    Replies: 6
    Last Post: 8 Jul 2007, 04:42 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