News:

Support the VirtueMart project and become a member

Main Menu

Conditional Custom Field

Started by JacoboPS, February 12, 2016, 23:35:58 PM

Previous topic - Next topic

JacoboPS

Hello,

I have a question, and I hope the answer isn't: "you can't".

I sell bulk spices, in 100 grs steps. But if anyone choses 3 units of 100 grs (that is, 300 grs.), I want to give them the choice of a single packaging or a 3 packages of 100 grammes. So to do that, I have created a string with two options (to be chosen by the client):

- A single package
- Single packages of 100 grs.

And I want to show that options "only" when the client choses more than one unit (100 grs). How can I do this?

Thank you very much,
Learning, pulling hair out, learning...

GJC Web Design

I would try with JS..  choosing quantities triggers functions in the vmprices.js and you could either code there to unhide the custom fields or just detect clicks or a keyup in the quantity elements-- test the quantity if >1 unhide the custom fields display
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

JacoboPS

Thank you for the suggestions, GJC Web Design. I was hoping that the functionality could already exist, since I don't code (I can copy and test and copy and test, but... :-\). I'll consider about hiring a freelance for this and other changes I also need.
Learning, pulling hair out, learning...