[Skip to main content](#vessel-content)

#   Quantity increase or decrease won't work

##

- **[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")**
- [![diacotm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52238-diacotm "View diacotm's Profile") Topic Author
- [ Offline](/forum/user/52238-diacotm)

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 8 months ago -  2 years 8 months ago [\#359655](#359655) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  *[Quantity increase or decrease won't work](/forum/31-development/907876-quantity-increase-or-decrease-wont-work#359655 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.3 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, Hope u are all great. I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -. for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1. what should I do? Thanks in advance  my show&#95;default.php code:")* was created by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.3
-- PHP version -- : 8.1.13
-- Browser(s) name and version -- : firefox

Hi, Hope u are all great.
I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -.
for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1.
what should I do?
Thanks in advance

my show_default.php code: Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 5.0.2 * @author hikashop.com * @copyright (C) 2010-2023 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php $form = ',0'; if(!$this-&gt;config-&gt;get('ajax_add_to_cart', 1)) { $form = ',\'hikashop_product_form\''; } ?&gt; &lt;div id="hikashop_product_top_part" class="hikashop_product_top_part"&gt; &lt;!-- TOP BEGIN EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;topBegin)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;topBegin); } ?&gt; &lt;!-- EO TOP BEGIN EXTRA DATA --&gt; &lt;!-- TOP END EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;topEnd)) { echo implode("\r\n", $this-&gt;element-&gt;extraData-&gt;topEnd); } ?&gt; &lt;!-- EO TOP END EXTRA DATA --&gt; &lt;/div&gt; &lt;div class="hk-row-fluid"&gt; &lt;div id="hikashop_product_left_part" class="hikashop_product_left_part hkc-md-6"&gt; &lt;!-- LEFT BEGIN EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;leftBegin)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;leftBegin); } ?&gt; &lt;!-- EO LEFT BEGIN EXTRA DATA --&gt; &lt;!-- LEFT END EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;leftEnd)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;leftEnd); } ?&gt; &lt;!-- EO LEFT END EXTRA DATA --&gt; &lt;/div&gt; &lt;div id="hikashop_product_right_part" class="hikashop_product_right_part hkc-md-6"&gt; &lt;!-- RIGHT BEGIN EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;rightBegin)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;rightBegin); } ?&gt; &lt;!-- EO RIGHT BEGIN EXTRA DATA --&gt; &lt;!-- RIGHT MIDDLE EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;rightMiddle)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;rightMiddle); } ?&gt; &lt;!-- EO RIGHT MIDDLE EXTRA DATA --&gt; &lt;!-- RIGHT END EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;rightEnd)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;rightEnd); } ?&gt; &lt;!-- EO RIGHT END EXTRA DATA --&gt; &lt;span id="hikashop_product_id_main" class="hikashop_product_id_main"&gt; &lt;input type="hidden" name="product_id" value="&lt;?php echo (int)$this-&gt;element-&gt;product_id; ?&gt;" /&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- END GRID --&gt; &lt;div id="hikashop_product_bottom_part" class="hikashop_product_bottom_part"&gt; &lt;!-- BOTTOM BEGIN EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;bottomBegin)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;bottomBegin); } ?&gt; &lt;!-- EO BOTTOM BEGIN EXTRA DATA --&gt; &lt;!-- FILES --&gt; &lt;?php $this-&gt;setLayout('show_block_product_files'); echo $this-&gt;loadTemplate(); ?&gt; &lt;!-- EO FILES --&gt; &lt;!-- BOTTOM MIDDLE EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;bottomMiddle)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;bottomMiddle); } ?&gt; &lt;!-- EO BOTTOM MIDDLE EXTRA DATA --&gt; &lt;!-- BOTTOM END EXTRA DATA --&gt; &lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;bottomEnd)) { echo implode("\r\n",$this-&gt;element-&gt;extraData-&gt;bottomEnd); } ?&gt; &lt;!-- EO BOTTOM END EXTRA DATA --&gt; &lt;/div&gt; &lt;!-- HP HIKASHOP Product Page Layout Begins! --&gt; &lt;div class="container hppadding0"&gt; &lt;div class="row"&gt;&lt;!-- Product Top Infos --&gt; &lt;div class="col-xl-4 col-lg-4"&gt;&lt;!-- Product Images gallery/ Like/share/compare/add to list --&gt; &lt;!-- IMAGE --&gt; &lt;?php $this-&gt;row =&amp; $this-&gt;element; $this-&gt;setLayout('show_block_img'); echo $this-&gt;loadTemplate(); ?&gt; &lt;!-- EO IMAGE --&gt; &lt;/div&gt; &lt;div class="col-xl-8 col-lg-8"&gt;&lt;!-- Product Infos-Name/code/comment count-rating charactricstis and prices --&gt; &lt;div class="col-xl-12 col-lg-12"&gt;&lt;!-- Product Name --&gt; &lt;!-- NAME --&gt; &lt;h1 class="hphikah1name"&gt; &lt;span id="hikashop_product_name_main" class="hikashop_product_name_main" itemprop="name"&gt;&lt;?php if(hikashop_getCID('product_id') != $this-&gt;element-&gt;product_id &amp;&amp; isset($this-&gt;element-&gt;main-&gt;product_name)) echo $this-&gt;element-&gt;main-&gt;product_name; else echo $this-&gt;element-&gt;product_name; ?&gt;&lt;/span&gt; &lt;/h1&gt; &lt;!-- EO NAME --&gt; &lt;/div&gt; &lt;div class="col-xl-12 col-lg-12 hphikatopleft1"&gt;&lt;!-- Product SKU/details/price box --&gt; &lt;div class="col-xl-8 col-lg-8"&gt;&lt;!-- Product SKU/Details --&gt; &lt;h1 class="hphikacodeskuh1"&gt; &lt;!-- CODE --&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')) { ?&gt; &lt;span class="hpflexrow10"&gt; &lt;span id="hikashop_product_code_main" class="hikashop_product_code_main"&gt;&lt;?php echo $this-&gt;element-&gt;product_code; ?&gt;&lt;/span&gt; &lt;span class="hphikacodefrontline1"&gt;&lt;/span&gt; &lt;/span&gt; &lt;?php } ?&gt; &lt;!-- EO CODE --&gt; &lt;meta itemprop="sku" content="&lt;?php echo $this-&gt;element-&gt;product_code; ?&gt;"&gt; &lt;meta itemprop="productID" content="&lt;?php echo $this-&gt;element-&gt;product_code; ?&gt;"&gt; &lt;/h1&gt; &lt;!--Mini star for JLexreview --&gt; &lt;?php /** Mini star **/ $loader = JPATH_ROOT . '/components/com_jlexreview/load.php'; if(file_exists($loader)){ require_once $loader; echo JLexReviewLoad::quick_init('hikashop', (isset($this-&gt;element-&gt;main) ? (int)$this-&gt;element-&gt;main-&gt;product_id : (int)$this-&gt;element-&gt;product_id )); } ?&gt; &lt;!--EO Mini star for JLexreview --&gt; &lt;!-- SOCIAL NETWORKS --&gt; &lt;?php $this-&gt;setLayout('show_block_social'); echo $this-&gt;loadTemplate(); ?&gt; &lt;!-- EO SOCIAL NETWORKS --&gt; &lt;!-- VOTE --&gt; &lt;div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"&gt;&lt;?php if($this-&gt;params-&gt;get('show_vote_product')) { $js = ''; $this-&gt;params-&gt;set('vote_type', 'product'); $this-&gt;params-&gt;set('vote_ref_id', isset($this-&gt;element-&gt;main) ? (int)$this-&gt;element-&gt;main-&gt;product_id : (int)$this-&gt;element-&gt;product_id ); echo hikashop_getLayout('vote', 'mini', $this-&gt;params, $js); } ?&gt;&lt;/div&gt; &lt;!-- EO VOTE --&gt; &lt;!-- DIMENSIONS --&gt; &lt;?php $this-&gt;setLayout('show_block_dimensions'); echo $this-&gt;loadTemplate(); ?&gt; &lt;!-- EO DIMENSIONS --&gt; &lt;br /&gt; &lt;!-- CHARACTERISTICS --&gt; &lt;?php if($this-&gt;params-&gt;get('characteristic_display') != 'list') { $this-&gt;setLayout('show_block_characteristic'); echo $this-&gt;loadTemplate(); ?&gt; &lt;br /&gt; &lt;?php } ?&gt; &lt;!-- EO CHARACTERISTICS --&gt; &lt;!-- OPTIONS --&gt; &lt;?php if(hikashop_level(1) &amp;&amp; !empty ($this-&gt;element-&gt;options)) { ?&gt; &lt;div id="hikashop_product_options" class="hikashop_product_options"&gt;&lt;?php $this-&gt;setLayout('option'); echo $this-&gt;loadTemplate(); ?&gt;&lt;/div&gt; &lt;br /&gt; &lt;?php $form = ',\'hikashop_product_form\''; if($this-&gt;config-&gt;get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') { ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } } ?&gt; &lt;!-- EO OPTIONS --&gt; &lt;!-- MANUFACTURER URL --&gt; &lt;span id="hikashop_product_url_main" class="hikashop_product_url_main"&gt;&lt;?php if(!empty($this-&gt;element-&gt;product_url)) { echo JText::sprintf('MANUFACTURER_URL', '&lt;a href="' . $this-&gt;element-&gt;product_url . '" target="_blank"&gt;' . $this-&gt;element-&gt;product_url . '&lt;/a&gt;'); } ?&gt;&lt;/span&gt; &lt;!-- EO MANUFACTURER URL --&gt; &lt;!-- Short Description --&gt; &lt;p class=""&gt;&lt;span class="hphikashdesc"&gt;&lt;?php echo JText::_('SHORT_DESCRIPTION_HP1');?&gt;&lt;/span&gt;&lt;/p&gt; &lt;?php echo $this-&gt;element-&gt;product_short_description; ?&gt; &lt;div class="hphikashortdescbot1"&gt; &lt;hr class=""&gt; &lt;a href="#hphikacustomfields" class="hphikashortdescbot1a"&gt;&lt;span class="hphikashortdescbot1a1"&gt;&lt;?php echo JText::_('SHOWALLCUSTOMFIELDS');?&gt;&lt;/span&gt;&lt;span class="fa fa-chevron-left hphikaico1" aria-hidden="true"&gt;&lt;/span&gt;&lt;/a&gt; &lt;hr class=""&gt; &lt;/div&gt; &lt;!-- EO Short Description --&gt; &lt;/div&gt; &lt;div class="col-xl-4 col-lg-4 hphikapricearea"&gt;&lt;!-- Product price box --&gt; &lt;!-- PRICE --&gt; &lt;!-- SELLER --&gt; &lt;p class=""&gt;&lt;span class="hphikaproductseller"&gt;&lt;?php echo JText::_('PRODUCT_SELLER');?&gt;&lt;/span&gt;&lt;/p&gt; &lt;?php echo $this-&gt;element-&gt;product_seller; ?&gt; &lt;!-- EO SELLER --&gt; &lt;?php $itemprop_offer = 'itemprop="offers" itemscope itemtype="https://schema.org/Offer"'; ?&gt; &lt;span id="hikashop_product_price_main" class="hikashop_product_price_main" &lt;?php echo $itemprop_offer; ?&gt;&gt; &lt;?php $main =&amp; $this-&gt;element; if(!empty($this-&gt;element-&gt;main)) $main =&amp; $this-&gt;element-&gt;main; if(!empty($main-&gt;product_condition) &amp;&amp; !empty($this-&gt;element-&gt;prices)) { ?&gt; &lt;meta itemprop="itemCondition" itemtype="https://schema.org/OfferItemCondition" content="https://schema.org/&lt;?php echo $main-&gt;product_condition; ?&gt;" /&gt; &lt;?php } if($this-&gt;params-&gt;get('show_price') &amp;&amp; (empty($this-&gt;displayVariants['prices']) &#124;&#124; $this-&gt;params-&gt;get('characteristic_display') != 'list')) { $this-&gt;row =&amp; $this-&gt;element; $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate(); $price = 0; if (!empty($this-&gt;element-&gt;prices)) { $price = $this-&gt;itemprop_price; } } ?&gt; &lt;meta itemprop="price" content="&lt;?php echo $price; ?&gt;" /&gt; &lt;meta itemprop="availability" content="https://schema.org/&lt;?php echo ($this-&gt;row-&gt;product_quantity != 0) ? 'InStock' : 'OutOfstock' ;?&gt;" /&gt; &lt;meta itemprop="priceCurrency" content="&lt;?php echo $this-&gt;currency-&gt;currency_code; ?&gt;" /&gt; &lt;/span&gt; &lt;!-- EO PRICE --&gt; &lt;!-- PRICE WITH OPTIONS --&gt; &lt;?php if($this-&gt;params-&gt;get('show_price')) { ?&gt; &lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt; &lt;/span&gt; &lt;?php } ?&gt; &lt;!-- EO PRICE WITH OPTIONS --&gt; &lt;!-- ADD TO CART BUTTON --&gt; &lt;?php if(empty($this-&gt;element-&gt;characteristics) &#124;&#124; $this-&gt;params-&gt;get('characteristic_display') != 'list') { ?&gt; &lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;&lt;?php $this-&gt;row =&amp; $this-&gt;element; $this-&gt;formName = $form; $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . (int)$this-&gt;element-&gt;product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }'; $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); ?&gt;&lt;/div&gt; &lt;div id="hikashop_product_quantity_alt" class="hikashop_product_quantity_main_alt" style="display:none;"&gt; &lt;?php echo JText::_('ADD_TO_CART_AVAILABLE_AFTER_CHARACTERISTIC_SELECTION'); ?&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;!-- EO ADD TO CART BUTTON --&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- HP HIKA Product Detail Page Module Position --BEGIN-- --&gt; &lt;?php $hphikaproductbottom1_modules = 'hphikaproductbottom1'; $attrs = array(); $result = null; $renderer = JFactory::getDocument()-&gt;loadRenderer('modules'); $hphikaproductbottom1 = $renderer-&gt;render($hphikaproductbottom1_modules, $attrs, $result); if ($hphikaproductbottom1) : ?&gt; &lt;div class="content-inline t4-module module"&gt; &lt;?php echo $hphikaproductbottom1 ?&gt; &lt;/div&gt; &lt;?php endif ?&gt; &lt;!-- HP HIKA Product Detail Page Module Position --END-- --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row hphiksecborbotsep"&gt; &lt;div class="col-xl-12 col-lg-12"&gt;&lt;!-- Extra Statics infos --&gt; &lt;!-- TAGS --&gt; &lt;?php if(HIKASHOP_J30) { $this-&gt;setLayout('show_block_tags'); echo $this-&gt;loadTemplate(); } ?&gt; &lt;!-- EO TAGS --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="col-xl-12 col-lg-12"&gt;&lt;!-- Products similar products --&gt; &lt;!-- HP HIKA Product Detail Page Module Position --BEGIN-- --&gt; &lt;?php $hphikaproductbottom_modules = 'hphikaproductbottom'; $attrs = array(); $result = null; $renderer = JFactory::getDocument()-&gt;loadRenderer('modules'); $hphikaproductbottom = $renderer-&gt;render($hphikaproductbottom_modules, $attrs, $result); if ($hphikaproductbottom) : ?&gt; &lt;div class="content-inline t4-module module"&gt; &lt;?php echo $hphikaproductbottom ?&gt; &lt;/div&gt; &lt;?php endif ?&gt; &lt;!-- HP VM Product Detail Page Module Position --END-- --&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row hphisecmdiv"&gt; &lt;div class="col-xl-12 col-lg-12 hppadding0"&gt;&lt;!-- Shortcut to product infos --&gt; &lt;ul class="hpulno hpflexrow hphisectitleul"&gt; &lt;li class="active" onclick="activateHphitiborderbot(this)"&gt;&lt;a class="hphiksectitle" href="&lt;?php echo JRoute::_('#hikashop_product_description_main'); ?&gt;"&gt;&lt;?php echo JText::_('MAIN_DESCRIPTION'); ?&gt;&lt;/a&gt;&lt;div class="hphitiborderbot hpsectitleleft1"&gt;&lt;/div&gt;&lt;/li&gt; &lt;li onclick="activateHphitiborderbot(this)"&gt;&lt;a class="hphiksectitle" href="&lt;?php echo JRoute::_('#hikashop_product_custom_info_main'); ?&gt;"&gt;&lt;?php echo JText::_('SPECIFICATIONS'); ?&gt;&lt;/a&gt;&lt;div class="hphitiborderbot hpsectitleleft2"&gt;&lt;/div&gt;&lt;/li&gt; &lt;li onclick="activateHphitiborderbot(this)"&gt;&lt;a class="hphiksectitle" href="&lt;?php echo JRoute::_('#CUSTOMER_REVIEW_SEC'); ?&gt;"&gt;&lt;?php echo JText::_('JR_CUSTOMER_REVIEW'); ?&gt;&lt;/a&gt;&lt;div class="hphitiborderbot hpsectitleleft3"&gt;&lt;/div&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row hppadding0"&gt; &lt;div class="col-xl-12 col-lg-12 hppadding0 hphikadesccesdiv1"&gt; &lt;div class="col-xl-9 col-lg-9 hppadding0"&gt;&lt;!-- Details --&gt; &lt;!-- DESCRIPTION --&gt; &lt;h2 id="hikashop_product_description_main" class=""&gt;&lt;span class="hphikamaindesc"&gt;&lt;?php echo JText::_('MAIN_DESCRIPTION');?&gt;&lt;/span&gt;&lt;/h2&gt; &lt;div class="hikashop_product_description_main" itemprop="description"&gt;&lt;?php echo JHTML::_('content.prepare',preg_replace('#&lt;hr *id="system-readmore" */&gt;#i','',$this-&gt;element-&gt;product_description)); ?&gt;&lt;/div&gt; &lt;!-- EO DESCRIPTION --&gt; &lt;!-- CUSTOM PRODUCT FIELDS --&gt; &lt;?php if(!empty($this-&gt;fields)) { $this-&gt;setLayout('show_block_custom_main'); echo $this-&gt;loadTemplate(); } ?&gt; &lt;!-- EO CUSTOM PRODUCT FIELDS --&gt; &lt;!-- CUSTOM ITEM FIELDS --&gt; &lt;?php if(!$this-&gt;params-&gt;get('catalogue') &amp;&amp; ($this-&gt;config-&gt;get('display_add_to_cart_for_free_products') &#124;&#124; ($this-&gt;config-&gt;get('display_add_to_wishlist_for_free_products', 1) &amp;&amp; hikashop_level(1) &amp;&amp; $this-&gt;params-&gt;get('add_to_wishlist') &amp;&amp; $this-&gt;config-&gt;get('enable_wishlist', 1)) &#124;&#124; !empty($this-&gt;element-&gt;prices))) { if(!empty($this-&gt;itemFields)) { $form = ',\'hikashop_product_form\''; if ($this-&gt;config-&gt;get('redirect_url_after_add_cart', 'stay_if_cart') == 'ask_user') { ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } $this-&gt;setLayout('show_block_custom_item'); echo $this-&gt;loadTemplate(); } } ?&gt; &lt;!-- EO CUSTOM ITEM FIELDS --&gt; &lt;!-- CONTACT US BUTTON --&gt; &lt;div id="hikashop_product_contact_main" class="hikashop_product_contact_main"&gt;&lt;?php $contact = (int)$this-&gt;config-&gt;get('product_contact', 0); if(hikashop_level(1) &amp;&amp; ($contact == 2 &#124;&#124; ($contact == 1 &amp;&amp; !empty($this-&gt;element-&gt;product_contact)))) { $css_button = $this-&gt;config-&gt;get('css_button', 'hikabtn'); $attributes = 'class="'.$css_button.'"'; $fallback_url = hikashop_completeLink('product&amp;task=contact&amp;cid=' . (int)$this-&gt;element-&gt;product_id . $this-&gt;url_itemid); $content = JText::_('CONTACT_US_FOR_INFO'); echo $this-&gt;loadHkLayout('button', array( 'attributes' =&gt; $attributes, 'content' =&gt; $content, 'fallback_url' =&gt; $fallback_url)); } ?&gt; &lt;/div&gt; &lt;!-- EO CONTACT US BUTTON --&gt; &lt;!-- JLEX Review --&gt; &lt;!-- EO JLEX Review --&gt; &lt;/div&gt; &lt;div class="col-xl-3 col-lg-3"&gt;&lt;!-- Float price box --&gt; &lt;div class="hphikapricearea bottomsidstickypbox"&gt; &lt;!-- PRICE --&gt; &lt;?php $itemprop_offer = 'itemprop="offers" itemscope itemtype="https://schema.org/Offer"'; ?&gt; &lt;span id="hikashop_product_price_main" class="hikashop_product_price_main" &lt;?php echo $itemprop_offer; ?&gt;&gt; &lt;?php $main =&amp; $this-&gt;element; if(!empty($this-&gt;element-&gt;main)) $main =&amp; $this-&gt;element-&gt;main; if(!empty($main-&gt;product_condition) &amp;&amp; !empty($this-&gt;element-&gt;prices)) { ?&gt; &lt;meta itemprop="itemCondition" itemtype="https://schema.org/OfferItemCondition" content="https://schema.org/&lt;?php echo $main-&gt;product_condition; ?&gt;" /&gt; &lt;?php } if($this-&gt;params-&gt;get('show_price') &amp;&amp; (empty($this-&gt;displayVariants['prices']) &#124;&#124; $this-&gt;params-&gt;get('characteristic_display') != 'list')) { $this-&gt;row =&amp; $this-&gt;element; $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate(); $price = 0; if (!empty($this-&gt;element-&gt;prices)) { $price = $this-&gt;itemprop_price; } } ?&gt; &lt;meta itemprop="price" content="&lt;?php echo $price; ?&gt;" /&gt; &lt;meta itemprop="availability" content="https://schema.org/&lt;?php echo ($this-&gt;row-&gt;product_quantity != 0) ? 'InStock' : 'OutOfstock' ;?&gt;" /&gt; &lt;meta itemprop="priceCurrency" content="&lt;?php echo $this-&gt;currency-&gt;currency_code; ?&gt;" /&gt; &lt;/span&gt; &lt;!-- EO PRICE --&gt; &lt;!-- PRICE WITH OPTIONS --&gt; &lt;?php if($this-&gt;params-&gt;get('show_price')) { ?&gt; &lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt; &lt;/span&gt; &lt;?php } ?&gt; &lt;!-- EO PRICE WITH OPTIONS --&gt; &lt;!-- ADD TO CART BUTTON --&gt; &lt;?php if(empty($this-&gt;element-&gt;characteristics) &#124;&#124; $this-&gt;params-&gt;get('characteristic_display') != 'list') { ?&gt; &lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;&lt;?php $this-&gt;row =&amp; $this-&gt;element; $this-&gt;formName = $form; $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . (int)$this-&gt;element-&gt;product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }'; $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); ?&gt;&lt;/div&gt; &lt;div id="hikashop_product_quantity_alt" class="hikashop_product_quantity_main_alt" style="display:none;"&gt; &lt;?php echo JText::_('ADD_TO_CART_AVAILABLE_AFTER_CHARACTERISTIC_SELECTION'); ?&gt; &lt;/div&gt; &lt;?php } ?&gt; &lt;!-- EO ADD TO CART BUTTON --&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;script&gt; function activateHphitiborderbot(selectedLi) { // Remove 'active' class from all list items document.querySelectorAll('li').forEach(li =&gt; { li.classList.remove('active'); }); // Add 'active' class to the clicked list item selectedLi.classList.add('active'); } &lt;/script&gt;

Last edit: 2 years 8 months ago by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzg3Ni1xdWFudGl0eS1pbmNyZWFzZS1vci1kZWNyZWFzZS13b250LXdvcms/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")**
- [![diacotm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52238-diacotm "View diacotm's Profile") Topic Author
- [ Offline](/forum/user/52238-diacotm)

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 8 months ago [\#359656](#359656) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[Quantity increase or decrease won't work](/forum/31-development/907876-quantity-increase-or-decrease-wont-work#359656 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.3 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, Hope u are all great. I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -. for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1. what should I do? Thanks in advance  my show&#95;default.php code:")*

I copied the price box content to a new position for the time that the price box hide in the screen to a new position and gave it a sticky position. because of that quantity box won't work properly but the copied price box code at the bottom position worked!
Please help me with this
Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzg3Ni1xdWFudGl0eS1pbmNyZWFzZS1vci1kZWNyZWFzZS13b250LXdvcms/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

2 years 8 months ago [\#359664](#359664) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Quantity increase or decrease won't work](/forum/31-development/907876-quantity-increase-or-decrease-wont-work#359664 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.3 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, Hope u are all great. I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -. for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1. what should I do? Thanks in advance  my show&#95;default.php code:")*

Hi,

Could you provide the URL of the page with the issue so that we can look at the result and analyze what's going on ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzg3Ni1xdWFudGl0eS1pbmNyZWFzZS1vci1kZWNyZWFzZS13b250LXdvcms/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")**
- [![diacotm's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52238-diacotm "View diacotm's Profile") Topic Author
- [ Offline](/forum/user/52238-diacotm)

Less More

- Posts: 47
- Thank you received: 3
-
-

2 years 8 months ago [\#359715](#359715) by [diacotm](/forum/user/52238-diacotm "View diacotm's Profile")  Replied by *[diacotm](/forum/user/52238-diacotm "View diacotm's Profile")* on topic *[Quantity increase or decrease won't work](/forum/31-development/907876-quantity-increase-or-decrease-wont-work#359715 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.3 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, Hope u are all great. I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -. for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1. what should I do? Thanks in advance  my show&#95;default.php code:")*

Hi, thanks for your reply
Sure,
here you are,

[ onlineshop.tesla360.ir/index.php/product/1-lamp-10-wat-mganwr](http://onlineshop.tesla360.ir/index.php/product/1-lamp-10-wat-mganwr)

the copied price box which is the second one, located in the middle of the page works fine but the first one is not working, it is frozen at the amount of 1.

Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzg3Ni1xdWFudGl0eS1pbmNyZWFzZS1vci1kZWNyZWFzZS13b250LXdvcms/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

2 years 8 months ago [\#359718](#359718) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Quantity increase or decrease won't work](/forum/31-development/907876-quantity-increase-or-decrease-wont-work#359718 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.3 -- PHP version -- : 8.1.13 -- Browser(s) name and version -- : firefox  Hi, Hope u are all great. I have a problem with the quantity box which does not increase or decrease the quantity when clicking on + or -. for the first time when it is not shown, when you click on the add to cart button it increases quantity to 1 but it got frezed on number 1. what should I do? Thanks in advance  my show&#95;default.php code:")*

Hi,

I would recommend turning off the "synchronized add to cart" setting of the HikaShop configuration and configuring the "Quantity input method" setting there to not display a quantity input field.
That way, the user will be able to use each add to cart button on the page, and use them several times if he needs to add the product several times in the cart.
Otherwise, if you really need to have a quantity input field, I would recommend not duplicating the add to cart area. Having several quantity input fields with several add to cart buttons in the same HTML form won't work properly and you'll struggle trying to do what you're trying to do at the moment. It's not impossible but quite complex to achieve with the way the product page is made in HikaShop, even for me.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50LzkwNzg3Ni1xdWFudGl0eS1pbmNyZWFzZS1vci1kZWNyZWFzZS13b250LXdvcms/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.072 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
