News:

Support the VirtueMart project and become a member

Main Menu

Stockable variants plugin: change dropdown with radio buttons

Started by guidocx842, January 22, 2013, 10:52:47 AM

Previous topic - Next topic

guidocx842

Good morning everybody!
Today I'll ask you something about templating of the stockable variants plugin (frontend).
As you know, when you create custom fields, i.e. SIZE, COLOR, etc., final users that are visiting your website will see a dropdown menu from where they can choose the size and the color of the products.
What I need is to change the style of this view and have multiple checkboxes (ordinated orizontally) instead of the dropdown menu.
Let me show a simple example: http://webstore-it.scotch-soda.com/men-collection/blazers/slim-fitted-corduroy-blazer.html?color=3587
In that site the color field is like I need... obviusly I know that at the time I'm writing this post, Virtuemart don't permit to change the image according to the choice of the color... but first of all I need to change my two dropdown with similar checkboxes.
Do you know how can I do that? Do you know if there is a plugin that permit to make this change?
And, if there isn't nothing of just made, do you know what I need change in the stockable variants code to accomplish that?
Thank you so much for your help!  ;)

guidocx842

Nobody?
Please, I'm looking for a solution... do you know if there is a module/plugin that permit to change the VM Custom stockable variants dropdown into a configurable group of checkbox?
Thanks a lot!

balai

To change the drop-downs or the radio buttons to checkboxes visualy is really easy.

But this is not the issue. Even if you do that it won't work as VM acceprs only 1 value per custom field

guidocx842

Quote from: balai on February 06, 2013, 16:37:11 PM
To change the drop-downs or the radio buttons to checkboxes visualy is really easy.

But this is not the issue. Even if you do that it won't work as VM acceprs only 1 value per custom field

You're right! The user can select only one choice per field. Sorry!!! I say checkbox but I mean radio buttons!
Do you know how to change drop-downs in radio buttons?
After that, I need that my radio buttons become something like here: http://webstore-it.scotch-soda.com/men-collection/blazers/slim-fitted-corduroy-blazer.html?color=3587
(watch color field). Do you know wich is the procedure that I can follow?
Thank you very much!!! Have a nice day!  ;)

balai

The stockables html is generated in the file:
plugins\vmcustom\stockable\stockable.php

Just for your info.
Only the 1st drop-down is generated with HTML all the others with javascript. This happens in order to have compatible combinations

guidocx842

Hi balai!
Thank you for your answer!
I find that file and I see what you mean.
Which is in your opinion the best way that I need to follow to realize what I need?
I didn't find a module that made what I need but I find many users interested on the same thing...
Thank you very much! Kind regards.

Guido