Attribute discount when product discount: Database hits
I'm working on an update to my site that involves a product with a gazillion attributes (i.e. more than 50). For a single product to be added to the cart, upwards of 4000 database hits were registered.
Fussing around in admin, I found the "attribute is discounted when product is discounted". Turning that off resulted in less than 400 hits.
The hits are centered on the shopping_cart class's 'calculate' function which is called whenever the cart's weight or current price is needed.
Just a heads-up.
P.S. If the shopping cart class did a calculate whenever the cart was changed, saving the current price and weight in a variable, and then just returned the variable when the weight/price was requested it would be a big savings!
Last edited by lat9; 12 Jan 2010 at 10:34 PM.
Reason: shopping_cart class update suggestion
By bobtabin in forum Bug Reports
Last Post: 12 Mar 2010, 06:37 PM
By momof2 in forum Templates, Stylesheets, Page Layout
Last Post: 12 Jun 2009, 08:36 PM
By TJB in forum General Questions
Last Post: 3 Apr 2008, 08:16 PM
By paperthreads in forum Setting Up Categories, Products, Attributes
Last Post: 13 Feb 2008, 10:13 PM
By vegascoug in forum Creating Discounts/Coupons, Gift Certificates, Newsletters
Last Post: 15 Nov 2007, 05:40 PM
Content and Graphics Copyright (c) 2003 - 2013 Zen Ventures, LLC - all rights reserved
Zen Cart® is a Registered Trademark of Zen Ventures, LLC