Hi, I am attempting to create an add to cart link for a bundle (when a user clicks anything with this link attached it automatically adds the product to their cart) but I have not been able to do so.
For my standard variable products, I use a link like this - https://electriciteaa.com/?add-to-cart=754 , the 3 numbers at the end being the variation ID. For simple products I have had to do this but have tested the link and instead I just use the product ID.
I am struggling to replicate this for my product bundle. I have tried the product ID and the variation ID but the link still doesn't work. How could I do this for products made using your product bundles plugin.
Hi, I am attempting to create an add to cart link for a bundle (when a user clicks anything with this link attached it automatically adds the product to their cart) but I have not been able to do so.
For my standard variable products, I use a link like this - https://electriciteaa.com/?add-to-cart=754 , the 3 numbers at the end being the variation ID. For simple products I have had to do this but have tested the link and instead I just use the product ID.
I am struggling to replicate this for my product bundle. I have tried the product ID and the variation ID but the link still doesn't work. How could I do this for products made using your product bundles plugin.
Many Thanks, Isaac
Hi Isaac,
Suppose it's a fixed bundle (doesn't contain variable or optional product). You can use the simple link as you did, for example, https://demo.wpclever.net/woosb/?add-to-cart=102.
If not, please choose a variation and copy the generated data here:
Then, encode it (https://www.urlencoder.org/) to use for the link, for example:
You can try this link here: https://demo.wpclever.net/woosb/?add-to-cart=158&woosb_ids=41%2F645b87f6655b3%2F2%2F%257B%2522attribute_pa_color%2522%253A%2522black%2522%252C%2522attribute_pa_size%2522%253A%2522m%2522%257D%2C90%2F645b87f666091%2F3%2F
Best regards,
Dustin