VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Coding Central => Topic started by: doc_denis on March 09, 2018, 10:40:06 AM

Title: I propose to modify the button Choose a variant
Post by: doc_denis on March 09, 2018, 10:40:06 AM
I propose to modify the button Choose a variant

in the file :
components/com_virtuemart/sublayouts/addtocartbtn.php

I propose to add a field for the translation of the button choose the variant (addtocart) so that the text is different from the available options.

my idea is to add this key in language file :
COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT_DISABLED_BTN

containt this text for exemple : "choose above"

then replace:

else {
echo '<span name="addtocart" class="addtocart-button-disabled" title="'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT' ).'" >'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT' ).'</span>';
}

to

else {
echo '<span name="addtocart" class="addtocart-button-disabled" title="'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT_DISABLED_BTN' ).'" >'.vmText::_( 'COM_VIRTUEMART_ADDTOCART_CHOOSE_VARIANT_DISABLED_BTN' ).'</span>';
}


thank-you