Ajax Add to Cart question
i have been using following snippet add prodcut variation shopping cart, it's not working quite yet. think it's because not setting selectedoptions properly. values expected selectedoptions parameter?
<script>
$(function(){
var product = {tag_product_json};
var divid = "#catprodtd_"+product.productid;
$(divid).find("input.productsubmitinput").click(function(){
bcinternals.shop.addtocart(product, {"selectedoptions": [1,4], "skiprefreshafter" : true });
});
});
</script>
here's link site working on:
http://www.studioofflowers.com/flowers/individual-flowers/dendrobiums
you'll see addtocart call get's submitted, ajax response returned is
null; r.error = {"message":"object reference not set instance of object.","type":"system.nullreferenceexception"
};/*
any appreciated!
ok, figured out if set selectedoptions [] works, because ajax call picks selected attribute id's anyway.
now need figure out how capture response , update cart display.
More discussions in eCommerce
adobe
Comments
Post a Comment