Hi
I've got a version 6 site which I would like to bring out the quick search and mini cart into some external pages. I've sorted the quick search, and have tried to do the minicart using the getCartItem function on the cart cookie:
<script language="JavaScript" type="text/JavaScript">
function getCartItem(index)
{
var act_cart= getCookie("CART_CONTENT")
temp =(act_cart != null) ? temp=act_cart.split("\t"):0;
return (temp.length > 0) ? temp[index] : 0;
}
// -->
</script>
then write the value and quantity in thus:
items ordered:
<script language="JavaScript">
document.write(getCartItem(3));</script>
value:
<script language="JavaScript">
document.write(getCartItem(1));</script>
but it don't work.
the catalog is at
www.domain/acatalog
and I have tested the code on pages at
www.domain/prelaunch
www.domain/
www.domain/acatalog/
as I thought it might be a cookie 'availability' thing, but without success.
Is this not possible, or have I made a boo-boo in the code?
Many thanks, Dan
I've got a version 6 site which I would like to bring out the quick search and mini cart into some external pages. I've sorted the quick search, and have tried to do the minicart using the getCartItem function on the cart cookie:
<script language="JavaScript" type="text/JavaScript">
function getCartItem(index)
{
var act_cart= getCookie("CART_CONTENT")
temp =(act_cart != null) ? temp=act_cart.split("\t"):0;
return (temp.length > 0) ? temp[index] : 0;
}
// -->
</script>
then write the value and quantity in thus:
items ordered:
<script language="JavaScript">
document.write(getCartItem(3));</script>
value:
<script language="JavaScript">
document.write(getCartItem(1));</script>
but it don't work.
the catalog is at
www.domain/acatalog
and I have tested the code on pages at
www.domain/prelaunch
www.domain/
www.domain/acatalog/
as I thought it might be a cookie 'availability' thing, but without success.
Is this not possible, or have I made a boo-boo in the code?
Many thanks, Dan
Comment