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

#   Modification: the minimum order quantity

##

- **[korkunov](/forum/user/1069-korkunov "View korkunov's Profile")**
- [![korkunov's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1069.jpg)](/forum/user/1069-korkunov "View korkunov's Profile") Topic Author
- [ Offline](/forum/user/1069-korkunov)

Less More

- Posts: 50
- Thank you received: 4
-
-
-

15 years 8 months ago -  15 years 8 months ago [\#8721](#8721) by [korkunov](/forum/user/1069-korkunov "View korkunov's Profile")  *[Modification: the minimum order quantity](/forum/2-general-talk-about-hikashop/8721-modification-the-minimum-order-quantity#8721 "Hi Nicolas. Please include the following releases small correction. Moreover, that the functional store /displayButton()/ supports it. The minimum order quantity. It is necessary for some specific shops, for example - polygraphy. administrator&#92;components&#92;com&#95;hikashop&#92;views&#92;product&#92;tmpl&#92; defined('&#95;JEXEC') or die('Restricted access'); ?&gt;        nput type=&quot;text&quot; name=&quot;data&#91;product&#93;&#91;product&#95;quantity&#93;&quot; element-&gt;product&#95;max&#95;per&#95;order)? '' : 'onfocus=&quot;this.value=&#92;'&#92;';&quot;'; ?&gt; value=&quot;element-&gt;product&#95;quantity; ?&gt;&quot; /&gt;    &#92;components&#92;com&#95;hikashop&#92;views&#92;product&#92;tmpl&#92; defined('&#95;JEXEC') or die('Restricted access'); ?&gt; ?php  line 37  cart-&gt;displayButton(JText::&#95;('ADD&#95;TO&#95;CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product&#95;max&#95;per&#95;order,); }elseif($this-&gt;row-&gt;product&#95;quantity&gt;0){ ?&gt; line 50 echo $this-&gt;cart-&gt;displayButton(JText::&#95;('ADD&#95;TO&#95;CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product&#95;max&#95;per&#95;order,);  To change the database  And add to lang file  Thanks :)")* was created by *[korkunov](/forum/user/1069-korkunov "View korkunov's Profile")*

Hi Nicolas.
Please include the following releases small correction.
Moreover, that the functional store /**displayButton()**/ supports it.
**The minimum order quantity.** It is necessary for some specific shops, for example - polygraphy.
**administrator\\components\\com\_hikashop\\views\\product\\tmpl\\**
defined('_JEXEC') or die('Restricted access');
?&gt;
&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="product_quantity"&gt;
&lt;?php echo JText::_( 'PRODUCT_QUANTITY' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" name="data[product][product_quantity]" &lt;?php echo is_numeric(@$this-&gt;element-&gt;product_max_per_order)? '' : 'onfocus="this.value=\'\';"'; ?&gt; value="&lt;?php echo @$this-&gt;element-&gt;product_quantity; ?&gt;" /&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td class="key"&gt;
&lt;label for="data\[product\]\[product\_min\_per\_order\]"&gt;
&lt;?php echo JText::\_( 'PRODUCT\_MIN\_QUANTITY\_PER\_ORDER' ); ?&gt;
&lt;/label&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;input type="text" name="data\[product\]\[product\_min\_per\_order\]" &lt;?php echo is\_numeric(@$this-&gt;element-&gt;product\_min\_per\_order)? '' : 'onfocus="this.value=\\'\\';"'; ?&gt; value="&lt;?php echo @$this-&gt;element-&gt;product\_min\_per\_order; ?&gt;" /&gt;
&lt;/td&gt;
&lt;/tr&gt;

**\\components\\com\_hikashop\\views\\product\\tmpl\\**
defined('_JEXEC') or die('Restricted access');
?&gt;
&lt;?php
$min\_q = $this-&gt;row-&gt;product\_min\_per\_order;
$min\_q = ($min\_q &lt;= 0) ? (1) : ($min\_q);

line 37
&lt;span class="hikashop_product_stock"&gt;
&lt;?php
echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product_max_per_order,$min\_q);
}elseif($this-&gt;row-&gt;product_quantity&gt;0){
?&gt;
line 50
echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product_max_per_order,$min\_q);

To change the database
ALTER TABLE &#96;#\_\_hikashop\_product&#96; ADD &#96;product\_min\_per\_order&#96; INT UNSIGNED DEFAULT 0

And add to lang file
PRODUCT\_MIN\_QUANTITY\_PER\_ORDER='Minimum Order quantity of product'

Thanks ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 15 years 8 months ago by [korkunov](/forum/user/1069-korkunov "View korkunov's Profile").

The following user(s) said Thank You: [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg3MjEtbW9kaWZpY2F0aW9uLXRoZS1taW5pbXVtLW9yZGVyLXF1YW50aXR5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14281
-
-

15 years 8 months ago [\#8745](#8745) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Modification: the minimum order quantity](/forum/2-general-talk-about-hikashop/8721-modification-the-minimum-order-quantity#8745 "Hi Nicolas. Please include the following releases small correction. Moreover, that the functional store /displayButton()/ supports it. The minimum order quantity. It is necessary for some specific shops, for example - polygraphy. administrator&#92;components&#92;com&#95;hikashop&#92;views&#92;product&#92;tmpl&#92; defined('&#95;JEXEC') or die('Restricted access'); ?&gt;        nput type=&quot;text&quot; name=&quot;data&#91;product&#93;&#91;product&#95;quantity&#93;&quot; element-&gt;product&#95;max&#95;per&#95;order)? '' : 'onfocus=&quot;this.value=&#92;'&#92;';&quot;'; ?&gt; value=&quot;element-&gt;product&#95;quantity; ?&gt;&quot; /&gt;    &#92;components&#92;com&#95;hikashop&#92;views&#92;product&#92;tmpl&#92; defined('&#95;JEXEC') or die('Restricted access'); ?&gt; ?php  line 37  cart-&gt;displayButton(JText::&#95;('ADD&#95;TO&#95;CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product&#95;max&#95;per&#95;order,); }elseif($this-&gt;row-&gt;product&#95;quantity&gt;0){ ?&gt; line 50 echo $this-&gt;cart-&gt;displayButton(JText::&#95;('ADD&#95;TO&#95;CART'),'add',$this-&gt;params,$url,$this-&gt;ajax,'',$this-&gt;row-&gt;product&#95;max&#95;per&#95;order,);  To change the database  And add to lang file  Thanks :)")*

We'll add that to next release then.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg3MjEtbW9kaWZpY2F0aW9uLXRoZS1taW5pbXVtLW9yZGVyLXF1YW50aXR5P3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.061 seconds

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