{if $smarty.const.CONF_SHOW_ADD2CART eq 1 && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) } <input class="plus" type="button" onclick="set_count_mod('inp_{$product_info.productID}', 1);" /> <input type={if $smarty.const.CONF_MULTYCART==0}hidden{else}text{/if} value="1" name="multyaddcount" id="inp_{$product_info.productID}" {if $smarty.const.CONF_MULTYCART==1} class="num" {/if}> <input class="minus" type="button" onclick="set_count_mod('inp_{$product_info.productID}', -1);" /> {/if}
Добавляем внизу в data/default/user.js
function set_count_mod(input_id, step) { var oCountMod = document.getElementById(input_id); if (!(iCurrCount = parseInt(oCountMod.value))) { iCurrCount = 0; } if (!(iCurrCount <= 1 && step < 0)) { oCountMod.value = iCurrCount + step; } }
Добавляем стили
.plus { background:url(../i/p_m.gif) no-repeat 0px 0px; } .num { width:20px; border:1px solid #cecece; color:#676556; text-align:center; font-weight:bold; text-shadow:1px 1px 1px #b3b3b3; margin:0px 4px; float:left; height:20px; } .minus { background:url(../i/p_m.gif) no-repeat 0px -22px; } .plus, .minus { height:22px; width:22px; border:none; cursor:pointer; float:left; }
Заливаем картинку
Получаем: