Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Responsive Joomla Virtuemart Template - SportMart (SKU# FLEX-00019)

TOPIC: remove selected default from image custom field

remove selected default from image custom field 6 years 11 months ago #15005

in the product page i have option to select color of product with image custom
the default option is the first item
i want to remove the option and set this to required field
Attachments:
The administrator has disabled public write access.

remove selected default from image custom field 6 years 11 months ago #15014

Hi,

Selecting the 1st option by default after the page gets loaded; is something we have implemented by SportMart.

In the ordinary Virtuemart, the image type custom field was not "required". We thought that, some people might add the product to cart without even selecting any option, which is why we implemented this "automatically selecting the 1st option"

I can help you here to remove that automatic selection. It is a 1-2 lines of javascript code in our template's file and when you remove those lines the automatic selection will be gone. But i can't help you here to implement the "required field" feature. Because it is little complex to implement and it is considered as a "custom modification". Unfortunately we don't provide free support or step-by-step instructions for custom coding-modifications.

You may purchase premium support:
www.flexiblewebdesign.com/premium-support

and let us take care this modification for you directly on your website though.

Regards.
Support
The administrator has disabled public write access.

remove selected default from image custom field 6 years 11 months ago #15019

can you help me here to remove the automatic selection ?
The administrator has disabled public write access.

remove selected default from image custom field 6 years 11 months ago #15027

Sure,

Open this PHP file:
ROOT//templates/flexible_sportmart/tpls/blocks/head.php

find this line:
$('.product-field-type-M .product-field-display label').first().addClass('selected').find('input').prop('checked',true); 

and replace it to this:
// $('.product-field-type-M .product-field-display label').first().addClass('selected').find('input').prop('checked',true); 

and that's it. The automatic selection of the 1st option feature will be gone.

Regards.
The administrator has disabled public write access.
Time to create page: 0.097 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo