rob2 Posted April 4, 2016 Share Posted April 4, 2016 Hi, i use the order form "standard cart" and i hope some addon(s) are added by default, and client can disable it if he do not need it when ordering. for instance,i want to set id protect as enabled by default, i modify the file templates/orderforms/standard_cart/configuredomains.tpl i add checked after <input type="checkbox" name="idprotection[{$num}]" , when ordering,the id protect option will show as checked by default, but when i click the lower part button "add to cart" "added to cart(remove)", the buttons are no works at all, i think it is because the file templates/orderforms/standard_cart/base.js , do you know how can i correct the code at the base.js ? thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 4, 2016 Share Posted April 4, 2016 (edited) another way would be to remove the panel showing the add to cart message - then the user can just use the checkbox to enable/disable the addon when ordering... <div class="panel-add"> <i class="fa fa-plus"></i> {$LANG.orderForm.addToCart} </div> Edited April 4, 2016 by brian! 0 Quote Link to comment Share on other sites More sharing options...
rob2 Posted April 4, 2016 Author Share Posted April 4, 2016 Hi, thank for your codes,but with my testing, it seems do not work but the same result. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 4, 2016 Share Posted April 4, 2016 (edited) thank for your codes,but with my testing, it seems do not work but the same result. lol - it worked for me originally... then I came back and tested again and it failed... but at least I know why it works sometimes and not others. in the meantime, the suggestion of removing that lower panel is a solution (as either clicking the checkbox or link in the panel adds it to the cart) - though an inelegant one! Edited April 4, 2016 by brian! 0 Quote Link to comment Share on other sites More sharing options...
rob2 Posted April 4, 2016 Author Share Posted April 4, 2016 Hi, yes,i also remove it to achieve what i need now.but for the first time loading the page,the box does not show with green border and i need check/unchecked it later and it shows well. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 4, 2016 Share Posted April 4, 2016 that'll be a css issue the line below... <div class="panel panel-default panel-addon{if $domain.idprotectionselected} panel-addon-selected{/if}"> because you're enabling the checkbox automatically, $domain.idprotectionselected isn't initially true - if it was true (e.g you view cart and then return to the configuredomains page), then my previously posted code would work fine. untested, but try the following and it should always be green... <div class="panel panel-default panel-addon panel-addon-selected"> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.