Clear/reset "Product" custom entry fields after <Add to cart> clicked
- nevillematthews
-
Topic Author
- Offline
Less
More
5 years 8 months ago #328659
by nevillematthews
Clear/reset "Product" custom entry fields after <Add to cart> clicked was created by nevillematthews
-- url of the page with the problem -- :
www.mathost3.co.uk/lou4/index.php/order-...oduct/1-potato-label
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.4.11
-- Browser(s) name and version -- : Firefox Developer 85.0b9(64-bit)
-- Error-message(debug-mod must be tuned on) -- : N/A
Hi
I only have one product which has 6 custom options.After clicking <Add to cart> is it possible to reset to the default values shown for the product?
I have a separate button that reloads the product page which does what I need. Is there a way to force this to execute after the <Add to cart> button is executed?
Thank you
Neville Matthews
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.4.11
-- Browser(s) name and version -- : Firefox Developer 85.0b9(64-bit)
-- Error-message(debug-mod must be tuned on) -- : N/A
Hi
I only have one product which has 6 custom options.After clicking <Add to cart> is it possible to reset to the default values shown for the product?
I have a separate button that reloads the product page which does what I need. Is there a way to force this to execute after the <Add to cart> button is executed?
Thank you
Neville Matthews
Please Log in or Create an account to join the conversation.
5 years 8 months ago #328670
by nicolas
Replied by nicolas on topic Clear/reset "Product" custom entry fields after <Add to cart> clicked
Hi,
You can add such javascript to the page instead of the extra button :
That will refresh the current page after the add to cart.
You can add such javascript to the page instead of the extra button :
Code:
<script type="text/javascript">
window.Oby.registerAjax(["cart.updated","checkout.cart.updated"], function(params) {
window.location.reload(true);
});
</script>
Please Log in or Create an account to join the conversation.
- nevillematthews
-
Topic Author
- Offline
5 years 7 months ago - 5 years 7 months ago #328884
by nevillematthews
Replied by nevillematthews on topic Clear/reset "Product" custom entry fields after <Add to cart> clicked
Hi Nicolas
Thank you have added to javascript you suggested into a module on the page and it works
.
Brilliant....
Thank you
Neville Matthews
Thank you have added to javascript you suggested into a module on the page and it works
Brilliant....
Thank you
Neville Matthews
Last edit: 5 years 7 months ago by nevillematthews.
The following user(s) said Thank You: Philip
Please Log in or Create an account to join the conversation.
Time to create page: 0.136 seconds