Question:
How can I dynamically display affiliate link buttons on a Wix Store product page using data from the Additional Info section?
Product:
Wix Store (Wix Studio)
What are you trying to achieve:
I’m building a custom product page in Wix Studio using Wix Store. Instead of using the default “Add to Cart” button, I want to display affiliate link buttons (Amazon, Wayfair, and AllModern). These buttons should only appear if a corresponding URL is provided in the Additional Info Section of the product.
For example:
If only the Amazon link exists, show just the Amazon button.
If all three links exist, show all three buttons.
Each button should navigate to the respective URL in a new tab.
What have you already tried:
I tried creating my own custom buttons and was able to:
Retrieve the additionalInfoSections
Extract the relevant URLs
Dynamically display the appropriate buttons with links based on availability
However, Wix Store doesn’t allow me to stack my custom buttons inside the native product page layout. As a result, my buttons sit in a separate section below, which creates a large empty space when the product description is short — not ideal for user experience.
So now I’m exploring whether I can utilize or override the default action buttons that Wix Store provides (like the Add to Cart button area) to insert my affiliate buttons more seamlessly into the layout.
Any ideas or workarounds would be greatly appreciated. Thanks in advance!
If you are using affiliate link buttons for products, then I’m assuming you won’t be needing the default Buy Now & Add to Cart buttons. So in that case you have three options using code:
1: Repurpose Existing Buttons
Since you’re using Wix Studio, you can change the labels and control the click actions of the Buy Now and Add To Cart buttons on your product page. Here’s a tutorial related to that: Tutorial: Request a Quote
2: Add / Remove buttons through DOM Manipulation
As you’ve already stated, you cannot add / remove buttons inside the native product page layout. But there is a way to manipulate the site’s DOM structure by writing HTML code that fires when your site loads. You can potentially use this to create or delete buttons or native elements which would otherwise not be possible through native Velo code. You may search about it online and you’ll find a few tutorials explaining more about DOM manipulation in Wix.
3: Create a site plugin using Wix Blocks
Even though you cannot add buttons or elements inside the product page widget directly, you can create and add a plugin inside dedicated slots using Wix Blocks. You can also have your site communicate with the widget through code, and with this you can dynamically hide / show buttons based on the links available. More on that here: Wix Stores: Product Page
4: Create a completely custom product page from scratch
The most time consuming option for sure, but will give you complete control and flexibility over the design and layout of your product page - you can tailor it all to your liking. Hoards of tutorials available online regarding the same
I have implemented solutions for clients who had the same requirements as yours, and based on your three-button logic I’d suggest option 3 would be the best fit for your case. It will keep your layout clean as-is, and will also fulfill the functionality you’re wanting to achieve. But if you want to hide the quantity dropdown or the buttons from the page altogether, then you will have to consider looking option 2 as well, or using a mix of both - whatever seems to work for you.