Product Page – Insert additional add to cart button between variations
-
Hello everyone,
This is what we need (easier to explain with visual):
Let me also put the explanation here (for SEO and search purposes)
There are 3 variations here:
1. Year Selection
2. Single-Multi Selection
3. Lifetime-Monthly-Annual SelectionA user can either:
– Select a year and free download
– Select all variations and buyInfo about variations:
– Last two is the same for all products (single-multi selection AND lifetime-monthly-annual Selection)
– First variation (year in this case) is optional:
— For some products there is only year variation
— For some products there is no variation
— For some products there can be even more variations.
– Please note that, free download should work independent of the last two variations. But buy button works connected with all variations.So, basically I have two ideas with my limited knowledge:
– We will write a custom function. This will hook into the variations loop. And it will insert this Free Download button just before the last two variations. I say “just before” because we don’t know how many variations will be on the top but we know that last two variations are always there. So, when code finds the “Users” variation, it will inject a free download button there.
– Or even better: if there is a plugin which allow us to build the form section like a page builder, it would be great. I searched a lot but could not find any plugins to do that.
– I also thought about using “Free Downloads for Woocommerce” plugin, but we want the user to go through the normal checkout process for Woocommerce to record them as normal orders.Any other easier options are also welcomed.
- The topic ‘Product Page – Insert additional add to cart button between variations’ is closed to new replies.