Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    Default Shopping Cart quantity by attribute

    I searched the FAQ, but couldn't find this particular issue.

    I need to set up my attributes on a product in a way that it forces the shopping cart to quantify the products based on attribute.

    What the shopping cart does currently:
    Customer buys Product A with Attribute (color) Red. Shopping cart now says "Product A, Red, quanity 1".
    Customer then buys Product A with Attribute (color) Blue, and adds it to the current shopping cart. What the shopping cart now says is "Product A, Blue, quantity 2".

    What I need is for the product to be defined by attribute, so the shopping cart says "Product A, Red, quantity 1. Product A, Blue, quantity 1."

    Thanks in advance for any help!

  2. #2
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    red flag Re: Shopping Cart quantity by attribute

    A follow up on the problem:

    Still haven't found any setting that has fixed the issue. The only mod I've installed (before I made the initial post) was the "Group Price per Item" mod. However, the logins I'm using don't use any Group Pricing, and that doesn't seem to be the cause of the issue.

    Also, it appears that the problem occurs when a user attempts to buy multiples of the same product, just with different non-priced attributes (in my specific case, having two item As, but just different colors).

    I'm using version 1.3.8a of Zen Cart, and version 1.3.8 of the database patch level.

    Any ideas guys? I'm stumped.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart quantity by attribute

    Zen Cart should be loading Products with different attributes as separate line items in the shopping_cart ...

    Have you an URL where we could perhaps peek at this and see what it is doing?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopping Cart quantity by attribute

    Sure! Here's the live site:
    http://store.nationalminitrucks.com

    I created a dummy login so you can try it out for yourself:
    zencart (yes, I created a non e-mail login just for this)
    zenned

    (On Edit: zencart login does not use any Group Pricing, nor has it been set up beyond default login settings)

    This does the same thing on regular, standard logins, so the non-standard one isn't doing anything.

    To reproduce the issue:
    Go to 'Mini Hauler' section.
    Leave all attributes alone, except color. Pick any color (Pure White is default), and add to cart. Note the cart is correct.

    Go back to 'Mini Hauler' section (doesn't seem to matter how you get there).
    Leave all attributes alone again, but pick a different color (any seems to do). Now the cart will say 2 of the Hauler, in the last color you chose. Refreshing won't help. If you go back to modify, the Mini Hauler section now reads 2 Haulers under the last color selected.

    Repeating this will only increase the quantity of the same order, with the last color selected.

    Thanks for the help!
    Last edited by pkazda; 26 Aug 2008 at 09:26 PM.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart quantity by attribute

    Is this a clean v1.3.8 or an upgrade?

    Do you have any add-ons added to your site?

    This is not how the attributes should be working ...

    If this is a clean Zen Cart v1.3.8 and you have no add-ons, are you able to setup a test site in a test directory with a test database with the demo data just to try this with the default products to see if they work, and if so, try to make a product similar to this one and see if it now works?

    I am not seeing why your site would behave in this manner, off the top of my head ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopping Cart quantity by attribute

    It's a clean install. Fairly recently, so I haven't had to do any updates.

    The only mod I've installed is the "Group Price Per Item v1.3". Only modification I've done on that is change the names of the four preset pricing groups, according to instructions that came with the mod. I installed this early on, before most of the store was set up. I installed it before SSL (see below).

    The modifications I've made to the store itself has been layout only (mostly just colors and main site size). I've made no modification to any of the functional code. The database was set up by hand, one item at a time. No automation tool was used, and the database was set up from scratch (from an 'empty' default install database). The only odd modification that was made to the store beyond this, was that I activated SSL after most things were set up.

    I ran a sample install on my local machine, running under the latest Apache server, using default install only. It's the same install I used to set up the web store. I was unable to duplicate the issue by remaking the item on the local store. It broke out the items by different attributes correctly.

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Shopping Cart quantity by attribute

    Sounds more and more like something is bad on your site ...

    Are you able to reload the files from a clean download of Zen Cart v1.3.8, if you have not made any changes to the code?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopping Cart quantity by attribute

    Reloading clean files doesn't help. So I tried something else. I took my existing live store database, and imported it into my clean, non-modified, non-mod'ed local default install of zencart (using a local version of phpMyAdmin). That created a working copy of the store on my local machine.

    When I went to add the Haulers, it exhibited the same behavior that it did on the online version, collecting different non-priced attributes together as a single order (with the exception that I get a "1364 Field 'customers_basket_id' doesn't have a default value" error on the first Hauler I try to add to the shopping cart. The error comes up, but the order still gets processed correctly).

    This indicates that it's not the store's site code that's causing the problems, but something in the database itself (or somehow the database is set up in such a way that it's messing up the site's code functionality). The only modifications to the database itself are the four fields added by 'Group Price Per Item v1.3' (which are table columns, so should be ignored by the clean install), and for a couple logins created for special purposes by a couple of our clients, I have modified the login name so it doesn't contain an e-mail, but a name only (like the zencart login I gave here).

    Hope this extra information helps!

  9. #9
    Join Date
    Jan 2004
    Posts
    66,387
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Shopping Cart quantity by attribute

    Quote Originally Posted by pkazda View Post
    1364 Field 'customers_basket_id' doesn't have a default value
    That suggests that you are missing the "auto-increment" flag on that table, and most likely on all your tables.
    Exporting and importing databases can sometimes lose that flag if you uncheck the option to include that data. Sometimes when moving between versions of MySQL that flag can also be dropped due to changes in the database engine.

    That may or may not also be the cause of your attribute issues.

    While the best way to fix your auto-increment issues is to work with a clean new install, you probably don't have one of those which also contains your live data.
    So, there's a script in the /zc_install folder of the Zen Cart files which you can run to recreate all the autoincrement flags on the tables that come with a new install of Zen Cart.
    .

    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.

  10. #10
    Join Date
    Aug 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Shopping Cart quantity by attribute

    Alright, I believe I found the issue (and an odd one it seems to be at that).

    First, the auto-increment script worked. Thank you. After that, I removed all side effects in the database from the Group Pricing Per Item mod, then deleted all customers and recreated a standard new one from scratch so I had, effective, a clean, unaltered install of the ZenCart code, plus a 'standard, default' database. The problem still existed. That indicated a problem with the product configuration, which is where I found this:

    There appears to be a problem in ZenCart when parsing attributes in a certain way. I was able to reproduce the problem from scratch. It's remarkably simple (leading me to wonder if it's just on my install, if no one has just accidentally stumbled on it yet, or if they have, that for their configuration it actually mattered). This is how I reproduced the problem (I'll try to make this verbose so it can be produced without ambiguity):

    I set up an item (priced at $6,522.22). For attributes, I included a checkbox attribute (with 2 items, pricing doesn't seem to matter, my example was vehicle chassis options), and then a radio attribute (with 2 items, pricing doesn't seem to matter, my example was colors). No images or other modifications are made (or needed). Order is important. I found though that the problem still exists if you insert another attribute (say a dropdown) between the checkbox and radio attributes, however only one checkbox and one radio is needed (for simplicity sake).

    Reproducing the behavior of the issue: Make sure shopping cart is clear. (I did this next part logged in with a login that had Authorization Status 'Approved'.) Go to the product, select one checkbox attribute item (doesn't matter which one), and one radio attribute item (doesn't matter which one). Add to cart. Immediately return to item (doesn't matter how), and make sure the same checkbox attribute item is checked (no changes on the checkbox attribute should be made from the first product placed in the shopping cart). Select a different radio item. Add to cart. Now the cart groups the products together as a single order, quantity 2, of the last radio item selected. If a different checkbox item was selected, the cart breaks out the products correctly.

    This problem works even if no radio option is selected the first time, then one is selected the second. What seems to matter is that the checkbox item stays the same (but checked), while the radio changes, on consecutive 'add to cat' operations.

    The problem, fortunately, is easy to get around. I moved my color radio to the top, and it worked. I was seeing the problem largely because I had both the checkbox and radio items with a default item selected.

    I hope this is clear enough. Can you reproduce this issue? If so, does anyone know a fix? If not, what would you suggest?

    Thanks for all the help!

 

 

Similar Threads

  1. Replies: 5
    Last Post: 2 Jan 2010, 08:44 PM
  2. shopping cart - hide the Cart Quantity Update button when not needed
    By dause in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Oct 2009, 04:28 AM
  3. Quantity Total in Shopping Cart Sidebox with Quantity Discount Contribution
    By maineiac13 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 14 Oct 2008, 08:40 PM
  4. Replies: 1
    Last Post: 15 Mar 2008, 11:29 AM
  5. Show quantity in cart only when the product is already in shopping cart
    By e81ny in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 8 Sep 2007, 03:34 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