1) открываем файл administrator/components/com_virtuemart/html/shop.browse.php
вставляем в начало файла строки
<script type = "text/javascript">
function func_plus (id,znach){
var id_input = "quantity_" + id;
var input = document.getElementById(id_input);
if (znach == 1) input.value = parseInt(input.value) + 1;
if (znach == -1 && input.value > 0) input.value = input.value - 1;
}
</script>
2) в том самом файле ищем строки
if (USE_AS_CATALOGUE != '1' && $product_price != "" && !stristr( $product_price, $VM_LANG->_PHPSHOP_PRODUCT_CALL )) {
$form_addtocart = "<form action=\"". $mm_action_url ."index.php\" method=\"post\" name=\"addtocart\" id=\"addtocart".$i."\">\n
<label for=\"quantity_".$i."\">".$VM_LANG->_PHPSHOP_CART_QUANTITY.":</label>\n
<input id=\"quantity_".$i."\" class=\"inputbox\" type=\"text\" size=\"3\" name=\"quantity\" value=\"1\" />
<input type=\"submit\" style=\"text-align:center;background-position:bottom left;width:160px;height:35px;cursor:pointer;border:none;font-weight:bold;font-family:inherit;background: url('". IMAGEURL ."ps_image/".PSHOP_ADD_TO_CART_STYLE ."') no-repeat left center transparent;vertical-align: middle;overflow:hidden;\" value=\"".$VM_LANG->_PHPSHOP_CART_ADD_TO ."\" title=\"".$VM_LANG->_PHPSHOP_CART_ADD_TO."\" />
<input type=\"hidden\" name=\"category_id\" value=\"". @intval($_REQUEST['category_id']) ."\" />\n
<input type=\"hidden\" name=\"product_id\" value=\"". $db_browse->f("product_id") ."\" />\n
<input type=\"hidden\" name=\"page\" value=\"shop.cart\" />\n
<input type=\"hidden\" name=\"func\" value=\"cartadd\" />\n
<input type=\"hidden\" name=\"Itemid\" value=\"$Itemid\" />\n
<input type=\"hidden\" name=\"option\" value=\"com_virtuemart\" />\n
</form>\n";
}
и вставляем после
<label for=\"quantity_".$i."\">".$VM_LANG->_PHPSHOP_CART_QUANTITY.":</label>\n
<input id=\"quantity_".$i."\" class=\"inputbox\" type=\"text\" size=\"3\" name=\"quantity\" value=\"1\" />
такие строки
<img src = \"images\plus.gif\" style = \"cursor : pointer\" onclick = \"func_plus($i,1);\">
<img src = \"images\minus.gif\" style = \"cursor : pointer\" onclick = \"func_plus($i,-1)\">
3) Не забудьте скопировать в папку images файлы plus.gif i minus.gif
Вроде все.