Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Items in cart incease when I refresh page
Tagged: ajax theme, fixing rreload, refreshing issues
- This topic has 14 replies, 4 voices, and was last updated 11 years, 4 months ago by admin.
-
AuthorPosts
-
July 18, 2013 at 9:24 am #9341komborero dauramanziMember
the number of items in my cart increases each time when i refresh the page. why is this?
also each time i add an item to the cart, the page reloads. why would this be, im using an ajax based theme…
July 18, 2013 at 3:29 pm #56650wzpModeratorThe add to cart functionality uses HTML POST and not Ajax. That is why the page refreshes when you click the button. It is also the reason the number of items in the cart increase, when you manually refresh the page.
Only the free download button has an Ajax counterpart.
July 18, 2013 at 6:27 pm #56651komborero dauramanziMemberso what can i do then to prevent this as it is very usual for the user. the shopping experience is a bit confusing and figity under the current circumstances…
July 18, 2013 at 10:48 pm #56652adminKeymasterEnable the ajax option in the shopping cart:
Alternatively, create a specific checkout page using the instructions (using step 5 will be helpful):
https://support.tipsandtricks-hq.com/forums/topic/how-to-create-a-specific-checkout-page-for-estore
July 18, 2013 at 11:42 pm #56653komborero dauramanziMemberHi and thanks for your response. I didn’t find anywhere in the plugins settings to enable the ajax options. cou;d you please let me know where it is.
i have looked at the links you have posted but they are just a bit confusing and linking to lots of content not related to my query
July 19, 2013 at 12:08 am #56654PeterMemberHi,
The ajax options are actually not in any of the plugin settings screens. To enable ajax for the cart you have to edit a file as follows:
Open the eStore_advanced_configs.php file and find the following line of code:
define('WP_ESTORE_ENABLE_AJAX_ON_ADD_TO_CART_BUTTONS', '0');
Once you find it, change it to the following:
define('WP_ESTORE_ENABLE_AJAX_ON_ADD_TO_CART_BUTTONS', '1');
July 19, 2013 at 1:30 am #56655komborero dauramanziMemberHi, i found the page and code, however, when i change it to ‘1’, it adds items to the cart but doesn’t update the cart, when i change it back to 0 and refresh the page, it reloads and all the items i have added to the cart suddenly appear?
July 19, 2013 at 4:46 am #56656adminKeymasterAre you using the following shortcode to show the shopping cart? If you are not then please use it:
[wp_eStore_cart]
July 19, 2013 at 12:01 pm #56657komborero dauramanziMemberI’m using this, [wp_eStore_cart_fancy1].
July 20, 2013 at 12:29 am #56658adminKeymasterPlease use the following shortcode (the ajax option needs the standard shopping cart):
[wp_eStore_cart]
July 20, 2013 at 9:40 am #56659komborero dauramanziMemberis there no other way of doing it as the standard shopping cart doesnt intergrate well with my theme?
July 20, 2013 at 11:40 pm #56660adminKeymasterHi, The ajax cart option only works with the standard shopping cart. I can’t see why the standard shopping cart won’t work on your site. Can you please post a link to your site where you have the standard shopping cart so I can see what is wrong?
July 21, 2013 at 5:45 pm #56661komborero dauramanziMemberits not necessarilly that it doesnt work, but it requires far much more customisation than i can do or afford to fit the style of my theme and thats why the fancy shopping cart would have been suitable.
July 22, 2013 at 9:33 pm #56662komborero dauramanziMemberEven when i use the standard shopping cart, if i put items in the cart and then removes them. refreshing the page will cause it to ask if i want to resend information. how can i stop this?
[https://www.dropbox.com/s/zs9umzsl6zgmpnk/SHOP%20ERROR.mp4]
July 23, 2013 at 12:13 am #56663adminKeymasterYou can’t because thats how browsers work and thats exactly why the browser is giving you a warning telling you that it will redo the last action.
When you hit the “reload” button of a browser, it will redo the whole last operation. Which is what a reload means. You are thinking that a reload simply loads the page but that is not correct. A reload will REPEAT all the actions.
If you want to just load the page then don’t hit the “reload” button. Simply click in the URL in the address bar then hit enter which tell it to only load the page content (not the actions that was also performed).
Google it and read up more on how browsers work so you know what that “reload” button does.
Your customers won’t hit the reload button when they are loading your website.
-
AuthorPosts
- You must be logged in to reply to this topic.