I’m having trouble with
Adding a “Buy Now” button on the Wix Stores Product Page. I want it to add the product to cart and redirect directly to checkout, but I’m unable to access product data or trigger the Add to Cart functionality programmatically.
Working in
Wix Editor + Dev Mode (Velo) + Wix Stores
Site link
What I’m trying to do
Add a “Buy Now” button alongside “Add to Cart” on the Product Page that:
-
Validates required options (like color/size)
-
Adds the product to cart
-
Redirects directly to the checkout page
What I’ve tried so far
-
Tried using
$w("#productPage").getProduct()→ not available -
Tried
getCurrentProduct()from wix-stores-frontend → not working -
Tried using dataset (
getCurrentItem) → not available -
Tried triggering Add to Cart button using
.click()→ not accessible -
Could not find element ID for Add to Cart button
Extra context
It seems the Wix Stores Product Page is a system component and does not expose product data or internal elements to Velo.
Is there any supported way to implement a true “Buy Now” button on the default Product Page, or is building a custom product page the only option?