VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: marvays on November 12, 2013, 21:12:19 PM

Title: Products only for 18 Years Old
Post by: marvays on November 12, 2013, 21:12:19 PM
Good day. I shop at some goods that can be sold only to persons older than 18 years. I set the field for the articles, which selects from a list that he is more than 18 years. But I can somehow set the field was mandatory, otherwise it will not order? Currently shop your order even if you select any option from the list. How do I set that was ordered goods only when you select "yes"?

link: http://www.lukysipy.sk/kuse/pistolova-kusa-kobra (http://www.lukysipy.sk/kuse/pistolova-kusa-kobra)

thx
Title: Re: only for the elderly 18 years
Post by: GJC Web Design on November 12, 2013, 22:12:41 PM
I guess the only way would be javascript to detect the state of the radio button and disable the add to cart if +18 not checked
Title: Re: only for the elderly 18 years
Post by: marvays on November 12, 2013, 22:27:57 PM
OK. This is not a normal part of the VM settings? I must search for nay plugin?
Title: Re: only for the elderly 18 years
Post by: GJC Web Design on November 12, 2013, 23:56:32 PM
not that I know of .. would be highly unlikely some one would write a plugin for something so specific

it requires some js code in your product detail templare
Title: Re: only for the elderly 18 years
Post by: PRO on November 13, 2013, 01:37:16 AM
is it all products are just some?
Title: Re: Products only for 18 Years Old
Post by: PRO on November 13, 2013, 01:51:24 AM
I changed your thread title so maybe you get more responses.

In English "elderly" is the oldest generation
Title: Re: Products only for 18 Years Old
Post by: marvays on November 13, 2013, 09:15:12 AM
Quote from: PRO on November 13, 2013, 01:37:16 AM
is it all products are just some?

some
Title: Re: Products only for 18 Years Old
Post by: GJC Web Design on November 13, 2013, 13:52:00 PM
but you only have the custom field (I assume it's a custom field?) on the products that need it?
Title: Re: Products only for 18 Years Old
Post by: marvays on November 13, 2013, 13:53:38 PM
Quote from: GJC Web Design on November 13, 2013, 13:52:00 PM
but you only have the custom field (I assume it's a custom field?) on the products that need it?

yes
Title: Re: Products only for 18 Years Old
Post by: GJC Web Design on November 13, 2013, 13:55:02 PM
then as I suggested - some JS in the details template to detect if the correct radio is checked - if not disable the add to cart
Title: Re: Products only for 18 Years Old
Post by: marvays on November 13, 2013, 13:56:32 PM
Quote from: GJC Web Design on November 13, 2013, 13:55:02 PM
then as I suggested - some JS in the details template to detect if the correct radio is checked - if not disable the add to cart

thx. will be search for it :)