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

TOPIC: Tutorial 3: Modification for VM Custom, Stockable

Tutorial 3: Modification for VM Custom, Stockable 9 years 9 months ago #10207

UPDATED: August 2nd

For those who are willing to use VM Custom, Stockable Variants, then you should do this small modification.
(otherwise you won't see the awesome CSS3 add to cart button and the Cart Animation)

Open this PHP file:
/plugins/vmcustom/stockable/stockable.php

Look for this line (around 403rd line):
$(".addtocart-bar").append(\'<span class="quantity-box"><input type="text" class="quantity-input js-recalculate" name="quantity[]" value="\' + quantity + \'" /></span><span class="quantity-controls js-recalculate"><input type="button" class="quantity-controls quantity-plus" /><input type="button" class="quantity-controls quantity-minus" /></span><span class="addtocart-button"><input type="submit" name="addtocart" class="addtocart-button" value="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" title="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" /></span><div class="clear"></div>\');
Virtuemart.product($("form.product"));
				}

and replace it with this:
$(".addtocart-bar").append(\'<div class="FlexibleCSS3Button"></div>\');
$(".FlexibleCSS3Button").append(\'<span class="FlexibleCSS3ButtonInner"></span><span class="FlexibleCSS3ButtonQuantity"></span>\');
$(".FlexibleCSS3ButtonInner").append(\'<input type="submit" name="addtocart" value="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" title="'.JText::_('COM_VIRTUEMART_CART_ADD_TO').'" class="addtocart-button FlexibleCSS3Button-text"><span class="FlexibleCSS3Button-symbol"></span><span class="FlexibleCSS3Button-slide-icon"></span>\');
$(".FlexibleCSS3ButtonQuantity").append(\'<span class="quantity-controls js-recalculate FlexibleMinus"><input type="button" class="quantity-controls quantity-minus"></span><span class="quantity-box FlexibleInput"><input type="text" value="\' + quantity + \'" onblur="check(this);" name="quantity[]" class="quantity-input js-recalculate"></span><span class="quantity-controls js-recalculate FlexiblePlus"><input type="button" class="quantity-controls quantity-plus"></span>\');
					Virtuemart.product($("form.product"));
				}
	if ( $.isFunction($.fn.FlexibleCartAnimate) ) {$.fn.FlexibleCartAnimate()};

And you will be good to go.
You would need to do this coding modification each time you update your Virtuemart.

Regards,
Support & Development
Last Edit: 9 years 7 months ago by Support.
The administrator has disabled public write access.
Time to create page: 0.101 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