News:

Looking for documentation? Take a look on our wiki

Main Menu

How to make one of custom field REQUIRED?

Started by dron_gr, March 25, 2012, 14:33:47 PM

Previous topic - Next topic

dron_gr

Hi,

VM2.0.0. How can i make one of custom fields with cart attribute (text plugin) - required field? I mean that IF client does not fill the field he cannot push the "ADD TO CART" button.

Thanks in advance!

boucdur

I have the same question.

I created custom attributes for sizes and colors but it's possible to press the button add to cart without choosing from the drop down menus.

Furthermore the price don't change dynamicly when I choose something from the drop down menus though I wrote +5 in the column "Price" within the tab "custom field" which is in the "product creation page"

boucdur

i could do it with a javascript made in jquery.
When cliking on "add to cart" a bubble (saying please choose a size) would appear if nothing has been chosen in the drop down list "size".
I would do just the kind of things we see on contact forms for required information

But I would have to work on it and it seems such an important feature that I imagine there is some way to do get a custom field required without making my own javascript script.

So how can we make custom field REQUIRED ?




HenrikS


Virtual

#6
Have you tried to use custom field Image and display input type="radio"?

Bruce Morgan

Looks interesting.  How did you do it? 

HenrikS

There should be an option to make every customfield required in virtuemart 2 .... this is needed for most shops.

vigier


Actlas

Does anybody know how??
A tutorial with javascript could also be helpful if this is the only way.

Krisse

*BUMP*

This should be resolved quickly, I imagine most shops would need some form of required custom fields!

Genius WebDesign

Couldn't agree more.. Its really odd that this is not included in the 2.xxx version when it worked fine and people used it in v1.xxx...

We can only hope that a dev or a kind Java wizard will help us get this feature working ASAP

Genius WebDesign

I did it!!

I actually found a thread that helped me hack my way into making custom field child variants where the first drop-down choise automatically says "Please Choose" or whatever you want, and when you try to add to the basket a modal popup appears telling the customer to make a variant choise and the product is not added to the cart.

Here is the thread:
http://forum.virtuemart.net/index.php?topic=100330.0


Further more I found a thread with a hack that makes your "internal note text" shown as text in the drop down menu.
Here's the thread:
http://forum.virtuemart.net/index.php?topic=101947.0

You can see this working on my site here:  (login: demo1   demo1)
http://traeogbyg.dk/index.php/produkter/isolering/paroc-isolering/paroc-a-byg-70mm-600x980mm-pr-m2-details

It's in Danish but google translate makes a proper translation..

On a side note I also changed the "Continue shopping" and "close" link in the modal popup to href="javascript:history.go(0)"   - so that you always go back the current page and refresh if you want to continue shopping instead of always ending up in the category browse..





spyderwebdesign

Quote from: fabelmik on June 19, 2012, 21:53:13 PM
I actually found a thread that helped me hack my way into making custom field child variants where the first drop-down choise automatically says "Please Choose" or whatever you want, and when you try to add to the basket a modal popup appears telling the customer to make a variant choise and the product is not added to the cart.

Here is the thread:
http://forum.virtuemart.net/index.php?topic=100330.0

I must be blind, because I don't see where it shows how to add the modal popup and stop the customer from adding the parent item to cart. Would you please post instructions how to do this?