[solved] CartMS updateQTY help needed, update doesn't work very neatly.
Posted: Tue Jan 27, 2009 10:07 am
I have a question about updating the quantity when viewing the shopping-cart inside CartMadeSimple.
This is the original code:
When I change the quantity of an item, the updat works fine, everything (total price and such) gets updated perfectly, only thing is that my entire CartMS module gets replaced from it's original page to the homepage.
here you can add products
here you can see the shoppingbasket
and here you can see the shoppingbasket beïng updated inside the HOMEpage
I would very very much like to get the update to be performed inside the current page.
I've tried to alter into things like and such. Doesn't work.
If anyone has a solution, please let me know!
Thanx in advance,
Matthijs
This is the original code:
Code: Select all
<__script__ language="JavaScript">
function UpdateQty(item)
{ product_id = item.name;
newQty = item.options[item.selectedIndex].text;
<!-- I know, the following is not very neatly done, but it works. Sorry :-) // -->
document.location.href = 'index.php?mact=CartMadeSimple,cntnt01,cart,0&cntnt01product_id='+product_id+'&cntnt01qty='+newQty+'&cntnt01perfaction=update_product'; }
</__script>
When I change the quantity of an item, the updat works fine, everything (total price and such) gets updated perfectly, only thing is that my entire CartMS module gets replaced from it's original page to the homepage.
here you can add products
here you can see the shoppingbasket
and here you can see the shoppingbasket beïng updated inside the HOMEpage
I would very very much like to get the update to be performed inside the current page.
I've tried to alter
Code: Select all
document.location.href
Code: Select all
this.location.href
Code: Select all
window.location.href
If anyone has a solution, please let me know!
Thanx in advance,
Matthijs