top of page

Forum Posts

pongsiri taksinwattananon
Jun 26, 2020
In Coding with Velo
I created website for 3d print that have submit form for client to send their file and contact info then send to database, when click submit button it will prompt a lightbox that has completion words and information pulled form the database that they just put in as a confirmation and re-check for them. so i link the input field to database and link some text boxes on the lightbox to that database and link the submit button to prompt to the lightbox which make it somewhat dynamic. the problem is, the info it show on the light box is a previous input, like, the submit button hasn't send the current input so when when it prompt the lightbox it can only pull from the previous one. and when change the jump trigger with dataset connect function it work with very show respond, but only on preview, not in the real site. how do I solve this though ? and I want to make the submit button able to generate a simple numeric code to use as order ID to help communicate with client, how do I make that though ? my site that i'm working on https://www.protorepublic.com/
how to create dynamic lightbox update with info from submit form's data base content media
0
1
277
pongsiri taksinwattananon
Mar 25, 2020
In Coding with Velo
there is grand question out there that quite a lot of people sought to figure out "HOW TO ADD AN 'ADD TO CART' BUTTON TO MY STORE'S DATABASE'S CUSTOM DYNAMIC PAGE" I got it work somehow a couple times before no go again what I did was: 1. I created dynamic page from the original Wix store's "products" dataset 2. I build regular button, create onClick event and apply this code export function addToshoppingCartIcon_click(event, $w) { const productId = $w('dynamicDataset').getCurrentItem()._id; $w('#shoppingCartIcon1').addToCart(productId, 1 ); and $w.onReady(function () { $w("#addToCartButton").onClick((event) => { let $item = $w.at(event.context); let selectedProduct = $item('#productsDataset').getCurrentItem(); let productId = selectedProduct._id; $w('#shoppingCartIcon1').addToCart(productId) .then(() => { console.log("add product ${productId} success"); }) .catch((error) => { console.log(error); }); }); }); that's the only time it work, somehow ..............it did add my product to the cart and jump to cart page but that's fine I was so hype............then it didn't work again ...somehow, on the console it show the error as: addToCart is not a function which is odd because when it compile it can work and i did find the function but it become not when preview. can anyone figure something from what I told? I already know how to setup "standalone add-to-cart-button" which is not what I want. I don't want to use the standard wix store page and store widget, I want to use MY designed dynamic page. the solution to this error is my only objective of this discussion.
0
2
69

pongsiri taksinwattananon

More actions
bottom of page