News:

Support the VirtueMart project and become a member

Main Menu

Defult radiolist & image Custumfiled

Started by mahootshop, April 03, 2017, 00:29:34 AM

Previous topic - Next topic

mahootshop

in a situation that we have number of images to choose as customfiled (for example: sell a watch in 3 unique texture).

i looking one of these custom images, selected by default. this will prevent buying product without choosing any color or texture.
we have this future in list type in other customfields. but im looking to have it in image customfiled...

it will be nice if someone share an information about how to do it...

using virtuemart 3.2 & joomla 3.6.5
using template named FLEX

bstearns

Has there been any update to this? I have no problem changing the code so that the first radio input is checked, but finding the code where this would happen is a real bugger. Anyone have any ideas?

I tried just using jQuery and that works fine when you click on the product from the shop, but if you navigate using the Next and Previous product buttons the JS code does not get triggered.

mahootshop

paste this code:

jQuery(document).ready(function(){
jQuery('.product-field-type-M .product-field-display label:first-child').children('input').attr({"checked" : "checked"});


in your custom.js file of template (read your template documentation).

i think its better to put some menu in virtuemart costumfields configuration.