On my wordpress site, customer should choose a product but if they click on the link it should not add the product to cart, it should forward them to my contact form. Id did this already fine with this manual: https://zeropointdevelopment.com/woocommerce-change-add-to-cart-button-text-and-url/
Is it possible to get also the title of the product and paste it directly into the subject of the contact form? Otherwise the customer is choosing the product, will be forwarded to contact form and then he have to choose the product again..
The site: https://elitelehrstellen.ch/angebote
Thanks for help!
CodePudding user response:
I think you can set a parameter with the name of the product and you can get in into contact form. That's what you have to do:
Set a url param to the link. Example https://www.elitelehrstellen.ch/kontakt?product-name=my-product-name
In your form add this field
[text* product-name default:get default:post_meta "My Product Name"]
You can see more examples in the docs