News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to change the method of selecting the quantity?

Started by hazael, March 01, 2017, 14:45:36 PM

Previous topic - Next topic

hazael

Standard selection of the quantity of products in "add to cart bar" is: (+/-) 1,2,3 ...

I want to do shop for printing house.
if I will sell the business cards and flyers I want to make a choice like this:
(+/-) 100,500,1000, 2000...

How to change the method of selecting the quantity of products in the cart?

Is it somehow?

Studio 42

You can modify in your template directly the quantity part in YOURTEMPLATE/html/com_virtuemart/sublayouts/addtocartbar.php
If it not exist you need to copy this from components/com_virtuemart/sublayouts/addtocartbar.php
If you need to have different layout, then you have to copy to another file eg addtocartbar2.php , using another sublayout and change this code
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$this->product));
to
echo shopFunctionsF::renderVmSubLayout('addtocart2',array('product'=>$this->product));
and do your changes in this file.

Note : You can add condition too or copy the default files and do an overrides...

hazael

Thanks for the valuable clue.

I found variables:
$init = 1;
$step=1;
I can handle it :)