Results 1 to 1 of 1
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    1,932
    Plugin Contributions
    20

    Default 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

 

 

Similar Threads

  1. Replies: 18
    Last Post: 12 Mar 2010, 06:37 PM
  2. Product Quantity Discount and Attribute Weirdness
    By momof2 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Jun 2009, 08:36 PM
  3. Replies: 0
    Last Post: 3 Apr 2008, 08:16 PM
  4. Attribute Discount for adding on product?
    By paperthreads in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Feb 2008, 10:13 PM
  5. Ideas/Suggestions for Discount Coupon - How to give a credit and a discount
    By vegascoug in forum Creating Discounts/Coupons, Gift Certificates, Newsletters
    Replies: 0
    Last Post: 15 Nov 2007, 05:40 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
  •