close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

quantity miscalculation in cart

Thread began 2/28/2013 10:38 am by info445899 | Last modified 3/01/2013 2:03 pm by Jason Byrnes | 563 views | 7 replies |

info445899

quantity miscalculation in cart

Hello,
the quantity shown in the cart is wrong. If there is an item in the cart, it would show 11. If there are 2 it would show 22. How can I solve this issue?

tende_ecart.php?categoria=tenda&style=Colors%20STYLE

Attached Files
tende_ecart.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you have the code for the add to cart button inside a recordset loop, this is causing the code to be executed multiple times and multiple items added to the cart.The code for the add to cart button should be in the head of the page, not within the body inside a recordset loop.

Sign in to reply to this post

info445899

Isn't it possible to force the quantity to be always 1 in the add to cart form?

Sign in to reply to this post

Jason ByrnesWebAssist

in the add to cart behavior, you could set If in Cart option to Replace

Sign in to reply to this post

info445899

How do do that? I don't see that option. Sorry

Sign in to reply to this post

Jason ByrnesWebAssist

in the add to cart button behavior, on the bindings tab, see the attached screen shot.

Sign in to reply to this post

info445899

Ok I got that. However if I select the and item twice it won't add up. Is there any way to keep the add to cart form in the loop and the php out of it by passing variables? I tried to put the php on top but the cart wouldn't work.

Sign in to reply to this post

Jason ByrnesWebAssist

yes, move the add to cart code outside of the loop....

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...