You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
below I have POC snippet that adds the item to the cart (load all deps and then call add to cart).
item was added but it's not causing the cart to reload and you will see that item was added on the next refresh is there any way to trigger the refresh without reloading the page?
im trying to create thrid party app.
function loadJS(file) {
var jsElm = document.createElement("script");
jsElm.type = "application/javascript";
jsElm.src = file;
document.body.appendChild(jsElm);
}
below I have POC snippet that adds the item to the cart (load all deps and then call add to cart).
item was added but it's not causing the cart to reload and you will see that item was added on the next refresh is there any way to trigger the refresh without reloading the page?
im trying to create thrid party app.
function loadJS(file) {
var jsElm = document.createElement("script");
jsElm.type = "application/javascript";
jsElm.src = file;
document.body.appendChild(jsElm);
}
loadJS("https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js")
loadJS("https://io.vtex.com.br/vtex.js/2.0.0/vtex.min.js")
var item = {
id: 355027,
quantity: 1,
seller: "1",
}
vtexjs.checkout
.getOrderForm()
.then(function(orderForm) {
console.log(orderForm)
vtexjs.checkout.addToCart([item], null, "1").done(function(orderForm) {
alert("Item added!")
console.log(orderForm)
})
})
The text was updated successfully, but these errors were encountered: