WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Page refresh
- AuthorPosts
- 17 October, 2015 at 1:51 pm #13237
Hi, nice plugin, i wonder if is it possible to empty cart on page refresh?
Thanks.
17 October, 2015 at 1:58 pm #13240please explain to me in which scenario this could possibly be useful
17 October, 2015 at 2:12 pm #13241Avoid user duplicate order, id like to empty the card on page reload/refresh.
This can be done invoking fake click on the empty card button on page reload?
17 October, 2015 at 3:16 pm #13244and how would there be a duplicated order, given that after items have been ordered the cart empties automatically …
17 October, 2015 at 8:11 pm #13245Because user will be able to order from different restaurants, so we want to avoid user order stuffs from different restaurants.
17 October, 2015 at 8:14 pm #13246then you really should be using a multisite setup i would have thought..
17 October, 2015 at 8:48 pm #13247So ? Any solution ?
17 October, 2015 at 9:02 pm #13248sure.
if you are dealing with different restaurants, use a multisite setup.
that’s what it’s forother than that you could do as you suggested:
>This can be done invoking fake click on the empty card button on page reload?though this would probably work, this isn’t really an elegant solution i would think, but if this works for you then that’s fine by me
17 October, 2015 at 9:20 pm #13249You have other solution except the one i ve told you ?
17 October, 2015 at 9:21 pm #13250err, yes, use a multisite setup
17 October, 2015 at 10:04 pm #13253What do you mean by use a multiple site set-up ? Is a plug in feature ?
17 October, 2015 at 10:19 pm #1325419 October, 2015 at 8:38 pm #13303i had a bit of a think.
although i still think it would be better to use a multisite setup if you want to have control over different restaurants, you might be able to clear the session as follows in a single site environment…(test this thoroughly though as some unexpected results may occur)you could possible play with some get/post variables to clear the items in a session like so:
if (get/post == whatever){ unset($_SESSION['wppizza']['items']); }
again, the recommended way would be to have a multisite setup, but the above might work for you
- AuthorPosts
- The topic ‘Page refresh’ is closed to new replies.