News:

Support the VirtueMart project and become a member

Main Menu

Mandatory custom fields

Started by lexi, May 06, 2016, 12:17:05 PM

Previous topic - Next topic

lexi

Hi,

I have bought an extension for a calendar (used as custom field). I would like this custom field to be mandatory in order to Add to Cart. I have searched in the forum but there doesn't seem to be any solutions. I tried to add code as suggested here http://forum.virtuemart.net/index.php?topic=100172.15 on Reply #27, but it didn't work. Any ideas on how I can do this please?

I'm using Joomla 3.4.5 and VM 3.0.10
The calendar extension I'm talking about is this http://virtuemartcalendardate.com/joomla-2-joomla-3-cms-extensions/virtuemart-extension-custom-field-plugin/vm-ecommerce-calendar-picker/virtuemart-calendar-date-advanced-version

Thanks :)

GJC Web Design

why not just some simple js check that the field isn't empty when the confirm button is clicked?
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

lexi

That's what I had in mind but I don't know how to do it since i have the confirm button in catproduct/defult.php and the input field in datetime/default.php (they are 2 different extensions). Any help please?

Thanks

GJC Web Design

but JS works at the page level so just check it on clicking the add to cart

if this is a cat layout with multiple add to cart and products then u would need to assign a unique id to each product "tile"
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