Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sending All Cart Data in One Time

Use this code when a product added to cart, removed from cart and change quantity of a product that added to cart. 

Note

You must send all cart content after updates.

Code Block
languagejs
linenumberstrue
<script type="text/javascript">
function rdCart(){
	var VL = new Visilabs(); 
	VL.AddParameter("OM.pbid","Basket ID");
	VL.AddParameter("OM.pb","Product Code1;Product Code2");
	VL.AddParameter("OM.pu" ,"product Quantity 1Quantity1;product Quantity 2Quantity2")
	VL.AddParameter("OM.ppr" ,"Product Price1*Product Quantity 1Quantity1;Product Price2*Product Quantity2");
	VL.Collect();
}
rdCart();
</script>

...

Sending Data of Last Item that Added, Removed or Changed Quantity

Use this code when a product added to cart, removed from cart and change quantity of a product that added to cart. 

Code Block
languagejs
linenumberstrue
<script type="text/javascript">
function rdCart(){
	var VL = new Visilabs(); 
	VL.AddParameter("OM.pb","Product Code");
	VL.AddParameter("OM.pu" ,"Change in Product Quantity") 
	VL.AddParameter("OM.ppr" ,"Product Price");
	VL.Collect();
}
rdCart();
</script>

...