alkohko Posted March 19, 2010 Share Posted March 19, 2010 I need some customization fields in my products and i like when i click on the save customization Button add to cart directly. I add this code:Product.js function saveCustomization() { $('#quantityBackup').val($('#quantity_wanted').val()); $('body select[@id^="group_"]').each(function() { $('#customizationForm').attr('action', $('#customizationForm').attr('action') + '&' + this.id + '=' + parseInt(this.value)); }); $('#customizationForm').attr('action', $('#customizationForm').attr('action')+'&fflag=1'); $('#customizationForm').submit(); } $(document).ready(function(){ if( $("div#fflag").length > 0 ){ auxiliar=$('#customizationForm').attr('action').split('&'); $('#customizationForm').attr('action', auxiliar[0]); $('#addtocart').click(); } ... Product.php if($_GET["fflag"]==1){ echo ''; } The problem is that I´m redirect to cart.php and dont load the product page.Thanks Link to comment Share on other sites More sharing options...
babyewok Posted October 19, 2010 Share Posted October 19, 2010 Hi - did you figure out how to combine the save and add to cart buttons? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now