Hi,
I have my prices in the options, so the price displayed is always 0. The option is mandatory and it is a radio button.
How can I display the first option checked by default? (when I open the page). I only checked the product.twig, and there is not where I should look...
How can I display, instead of the price of the product, the price of the selected price? I am using opencart 3.0.2, and there the product.twig has the arrays with the options prices, but I am new and I don't know how to trick it...
Any help is welcome.
You can play with javascript to make it possible .
On load you can set first option selected for all option uisng each function of jquery.
Also, for price changes you can use recalculate price after option selected . below is the extension link -
https://www.opencart.com/index.php?rout ... n_id=28909
Thanks
On load you can set first option selected for all option uisng each function of jquery.
Also, for price changes you can use recalculate price after option selected . below is the extension link -
https://www.opencart.com/index.php?rout ... n_id=28909
Thanks
Thanks a lot!synapseindia wrote: ↑Sat Dec 01, 2018 2:01 pmYou can play with javascript to make it possible .
On load you can set first option selected for all option uisng each function of jquery.
Also, for price changes you can use recalculate price after option selected . below is the extension link -
https://www.opencart.com/index.php?rout ... n_id=28909
Thanks
I will translate it into 3.0.2.
Thanks again.
Just for the record, I've found a free extension, live options (called Ajax live options) that work with Opencart 3.x, after a few modifications.
1 - In config.php, change the HTTP definition's url to https
2 - Manually modify all the steps in the install.xml, because if not it goes to the cache, and the moment you touch your product.twig, it will stop working.
Hello @open_user
once you checked the first checkbox option by default you can use this java script code to update the price by default .
$(window).load(function(){
if ($('#checkbox_id').is(':checked') == true) {
changePrice();
}
});
once you checked the first checkbox option by default you can use this java script code to update the price by default .
$(window).load(function(){
if ($('#checkbox_id').is(':checked') == true) {
changePrice();
}
});
Who is online
Users browsing this forum: Anthony101990Jones and 178 guests