Add to cart executed again when navigating 'back'

This topic has 13 replies, 5 voices, and was last updated 9 years, 8 months ago ago by Stan Russell

  • Avatar: f1websites
    f1websites
    Participant
    March 19, 2015 at 20:28

    Hi,

    My client just found that when adding a product to the cart, then navigating away from that page, e.g. opening the cart and then hitting “back” (using the back button of the browser) the same product is added to the cart again.

    Some visitors on the site have encountered this and notified the owner.

    Please help to remove this issue.

    Thanks & regards,
    – Frank

    12 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    March 20, 2015 at 09:58

    Hello,

    Please provide us with link to the page and wp-admin access (full permissions) in Private Content.

    Regards,
    Robert Hall.

    Avatar: f1websites
    f1websites
    Participant
    March 20, 2015 at 11:00

    Hello Robert,

    Please have a look at our test site, which runs on a bit lower version, but shows the same behaviour.

    Thanks & regards,
    – Frank

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    March 20, 2015 at 15:48

    Hello,

    I’ve checked your site and when navigating from the Cart page the same product isn’t added to the cart. There are only 1 product in the cart that was added.
    Could you please clarify with more details?

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: f1websites
    f1websites
    Participant
    March 22, 2015 at 12:37

    Hi Eva,

    Thanks for looking into this.

    I created this screen recording to show you what happens. Please note that the Back button of the browser is used in the process.

    Video link: https://www.youtube.com/watch?v=8vhSoqixWQk

    Regards,
    – Frank

    Avatar: Eva
    Eva Kemp
    Support staff
    March 23, 2015 at 15:48

    Hello,

    We recommend you to update the theme and Woocommerce plugin to latest versions.
    Create a back up of your files and database before update!
    Also update all required plugins which you can download here https://www.8theme.com/download-plugins/ .

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: f1websites
    f1websites
    Participant
    March 24, 2015 at 07:09

    Hi Eva,

    I can assure you, this is not the reason for the issue to occur. It happens on our live site too, of which you can see the version numbers in the first post of this thread.

    Regards,
    – Frank

    Avatar: f1websites
    f1websites
    Participant
    March 27, 2015 at 14:29

    Hi Eva, any news on this one?

    I see that the URL contains the command to add the product to the cart. Therefore when it is called again, the product is added again.

    On your theme demo however, it seems that the product is added to the cart from a modal box. I do not see the same command in the address bar. So perhaps we are using a different setting or perhaps your new theme version has the solution?

    Please share an update.

    Thanks & regards,
    – Frank

    Avatar: Brian Johnson
    Brian Johnson
    Member
    March 28, 2015 at 10:35

    Hello

    I have commented few lines of code which were causing syntax error in child theme(please watch private content)
    I have also enabled Ajax add to cart(pop up) in theme options->single product page->ajax add to cart and woocommerce->settings->product->ajax add to cart. Now you may check the issue again.

    With best regards
    Brian Johnson

    Please, contact administrator
    for this information.
    Avatar: f1websites
    f1websites
    Participant
    April 2, 2015 at 10:15

    Hi Brian,

    Thanks for looking into our case. It seems that your private content is hidden for me. I cannot seem to open it, even though I am logged in. Are you able to email it to me (see private content for my email address?

    Thanks & regards,
    – Frank

    Please, contact administrator
    for this information.
    Avatar: Brian Johnson
    Brian Johnson
    Member
    April 2, 2015 at 10:34

    I have sent an email. You may also view your child theme fuctions.php. This line is already marked with “/” character. Is your issue solved now?

    With best regards
    Brian Johnson

    Avatar: f1websites
    f1websites
    Participant
    April 2, 2015 at 11:58

    Yes, thanks very much Brian, the issue is now resolved.

    Regards,
    – Frank

    Avatar: stan
    Stan Russell
    Participant
    April 2, 2015 at 12:28

    Hello f1websites,

    you are welcome!

    Regards,
    Stan Russell.

  • Viewing 13 results - 1 through 13 (of 13 total)

The issue related to '‘Add to cart executed again when navigating 'back'’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.