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
the js code is
now i know that if i adjust the onclick to use
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
the html line code is
Code:
<input type="button" value="{$LANG.continueshopping} »" class="checkout" onclick="addtocart();" /><br />
Code:
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';
}
});
Code:
onclick="addtocart('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