By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Unofficial Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!
elementor official

WooCommerce Single Product Templates Limit?

L

LookingAhead

New Member
I'm building a site with multiple products that each need a contact form which will redirect to different pages, depending on the item.
The only way I can see to do this is to create a single product template for each product, where the form redirects to a predetermined location. There are over 200 products.
Question: Is there a limit to the number of product templates that can be created &
Is there another way to do this, where the form can have a variable that changes with each product?
 
elementor official
3

3quid

New Member
Definitely don't make a template for each product! That sounds like madness and unmanageable! (not to mention defeating the purpose of a template).

The way I would do it is install ACF (advanced custom fields) plugin (free). Create a url field that will show in the admin area for all products (eg. call the field something like "custom product link").

Then edit a product and fill in the field with the link you want it to go to.

Not sure what you mean by a form redirect ... Do they have to fill in a form on the product page before being redirected to specific info?

If so, then create a form in the product template. Make the form how you like. In the 'Actions after submit' add 'redirect' and then using dynamic tags choose the ACF URL field you created. Then after submission of the form they will be sent to the URL.

Or if you don't want a form you can create a button and use dynamic tags for the link. Select the ACF url field you created and voila! each product will link to the specified url
 
elementor official
L

LookingAhead

New Member
Wow, thank you for the information. The 2 things I have yet to learn about is the ACF and how dynamic tags work.
Your solution sounds like exactly what I was hoping for. I'll jump on learning the additional info and test it.
Thank you again!
 
elementor official
3

3quid

New Member
No worries. That will be much better than having 200 product templates to manage!!! o_O
 
elementor official
L

LookingAhead

New Member
No worries. That will be much better than having 200 product templates to manage!!! o_O
Hi! I just wanted to get back to you to thank you for the guidance. I learned and applied CPT's with ACF set as a dynamic link and it worked perfectly!

Of course, now the client wants the link to appear in the autoresponder. I don't see any dynamic fields for the form email, so I assume the solution would be to use a different email or hook. Your thoughts?
Thanks again!
 
elementor official
3

3quid

New Member
Create a field
Edit the field
Click the advanced tab
Default value = your ACF field
 
elementor official
3

3quid

New Member
Glad I could help and that you learned a new (really really useful) technique.
 
elementor official

Latest posts

Other Elementor Resources

elementor official
elementor official
Top