close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Strange cart bug

Thread began 7/12/2012 8:35 am by mrs | Last modified 7/12/2012 1:15 pm by Jason Byrnes | 1530 views | 5 replies |

mrs

Strange cart bug

I have been testing my site, and I have just found a very odd bug or behaviour.

If I add two products to my cart, click on the remove box for one of them and update the cart, it then removes that one product leaving me with one left. OK so far, but if I then click on the 'More info' link of the remaining product to visit its detail page, THEN click the back button, the cart removes the one remaining product!

I have also done this to a cart with three or more products, remove one product, click on more info of a product left in the cart, click back and the cart holds one less product again! It's actually deleting the product I have just visited and clicked back on. The browser asks do I want to send the form again?

Why is it removing a product that I didn't check? I assume there is some sort of session issue happening as there is nothing showing in the browser address bar.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

when you click the back button, it is resubmitting the update cart button, since that was the action that loaded the page initially.


If you submit a form, go to another page, then click the back button, it resubmits the form, the back button tells the browser to perform the action that loaded the previous page.

Sign in to reply to this post

mrs

Yes, that's what's happening, but I don't have a product checked for removal... is this going to happen regardless of the check button being checked or not?

Sign in to reply to this post

Jason ByrnesWebAssist

but you did have an item checked when you initially submitted the form to clear the cart.

When you use the browsers back button, it is submitting the original form.

The remove item behavior uses the line index to determine which item to delete.


This is a drawback of using the browsers back button.

Sign in to reply to this post

mrs

I check an item, click remove, and the cart refreshes to display the remaining products. If I then click through to one of the remaining products' detail page (without checking a further remove button) and click the back button, that product I visited is removed too even though it's remove button isn't checked.

OK, not a problem if it's a browser-based thing rather than a code-based issue. The customer can live with it.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes it is a browser based issue.

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...