Snowman Posted September 6, 2013 Share Posted September 6, 2013 i need to adjust the orderform addtocart function so that from the configure product page when you click to add to the cart the order will get added but the page will redirect to a different product group rather than the view cart page the html line code is <input type="button" value="{$LANG.continueshopping} »" class="checkout" onclick="addtocart();" /><br /> the js code is functionaddtocart (gid) { jQuery("#loading1").slideDown(); jQuery.post("cart.php", 'ajax=1&a=confproduct&'+jQuery("#orderfrm").serialize(), function(data){ if (data) { jQuery("#configproducterror").html(data); jQuery("#configproducterror").slideDown(); jQuery("#loading1").slideUp(); } else { if (gid) window.location='cart.php?gid='+gid; else window.location='cart.php?a=confdomains'; } }); now i know that if i adjust the onclick to use onclick="addtocart('43');" this button will not go to the view cart page but will instead load product group 43 what i want to achieve however is to add the order to the cart on click and redirect to group 43 can anyone assist me with this adjustment to the js code to achieve this 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.