Hello,
In the "add to cart" section, custom fields can have an effect on product price.
I know this section contains a <form> with html inputs, selects etc....
How can I create my own custom select element that will affect the product price, directly within the template?
(without going through VM's custom fields system)
e.g. I want to create a select box, with an option that will increase the product price by 10 euros.
Thanks
why?
what do you want to accomplish?
I am trying to add a custom JS app, which inserts its own fields in the addtocart section.
It works fine so far, but I cannot add fields that affect product pricing.
It's sound like custom developping, maybe custom custom field?
You can use this custom field plugin https://shop.st42.fr/en/products/shortcodes.htm and implement your own system.
Of course the logic is the same as other plugin but it's more flexible
See the logic here https://shop.st42.fr/en/shorcodes-english-doc#cart_color
Thank you!
Is there a starting point to develop a VM plugin for the product page/add to cart section?
Thanks
EvanGr, i do not how you want set the options and price
I read : I am trying to add a custom JS app, which inserts its own fields in the addtocart section.
This is hard to do because you need to find a way to convert the options to real VM values to calculate the price.
My plugin can simplify this part but in any case you have to create your own code to do the rendering > conversion to make it compatible with Virtuemart because price calc, so if you do not have PHP skills, i do not mean you can achieve this
Thank you Studio for your help.
We do have PHP and JS skills, but little experience with the VM architecture.
I checked your plugin, and it may be helpful (do not know yet).
However we are exploring ways to do it as simple as possible without extra layers of complexity.
Integrating directly with VM would be ideal.
Thanks!