Programatically add a product to cart
Add a product to your cart programmatically
var cart = getCart();
var itemToAdd = {
id: "12345", //id of your product in the shop
title: "Your product title",
sku: "YOURSKU",
label: "",
variantID: "",
img: "URL_Of_THE_PRODUCT_IMAGE_HERE",
qty: 1,
aqty: 1,
price: 24.99
};
cart.push(itemToAdd);
saveCart(cart);
showCart();