top of page
Forum Posts
contact
Feb 20, 2021
In Coding with Velo
Hey there! I am trying to add the TikTok tracking pixel to my website, but it does not seem to validate it. I added the script to the head: What could be wrong?
0
4
1k
contact
Nov 16, 2020
In Coding with Velo
Hi forum! We are currently working on our product page (theproducerschool.com/packs) and we are using a custom repeater to showcase our products. We have added the following code to let the buttons in the repeater function as an add to cart button: $w.onReady(function () {
$w("#addToCart").onClick((event) => {
let $item = $w.at(event.context);
let selectedProduct = $item('#dataset4').getCurrentItem();
let productId = selectedProduct._id;
$w('#shoppingCartIcon1').addToCart(productId)
.then(() => {
console.log("add product ${productId} success");
})
.catch((error) => {
console.log(error);
});
}); First, this all worked perfectly. But once I added some new products, the store/product dataset is now causing the buttons to only add 1 product to the cart, instead of a different one for every product. Can anybody help me with this? It would be highly appreciated :)
0
3
246
contact
More actions
bottom of page