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

#   Default quantity

##

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

Less More

- Posts: 5
- Thank you received: 1
-
-

11 years 1 month ago [\#213955](#213955) by [pbleiman](/forum/user/37789-pbleiman "View pbleiman's Profile")  *[Default quantity](/forum/26-product-category-display/879239-default-quantity#213955 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.27 -- Browser(s) name and version -- : Safari 8.0.7 (OS X)  Is it possible to set a default quantity in the &quot;add to cart&quot; field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.  I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.")* was created by *[pbleiman](/forum/user/37789-pbleiman "View pbleiman's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.27
-- Browser(s) name and version -- : Safari 8.0.7 (OS X)

Is it possible to set a default quantity in the "add to cart" field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.

I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzkyMzktZGVmYXVsdC1xdWFudGl0eT90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

11 years 1 month ago [\#213990](#213990) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Default quantity](/forum/26-product-category-display/879239-default-quantity#213990 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.27 -- Browser(s) name and version -- : Safari 8.0.7 (OS X)  Is it possible to set a default quantity in the &quot;add to cart&quot; field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.  I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.")*

Hi,

There is no option to change that.
You can edit the file "show_quantity" of the view "product" via the menu Display&gt;Views and change the occurrences of : Code:

value="&lt;?php echo JRequest::getInt('quantity',$min_quantity); ?&gt;"

to: Code:

value="6"

so that the default value would be 6, but that you would still be able to set a lower value in the field.

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

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

Less More

- Posts: 5
- Thank you received: 1
-
-

11 years 1 month ago [\#214003](#214003) by [pbleiman](/forum/user/37789-pbleiman "View pbleiman's Profile")  Replied by *[pbleiman](/forum/user/37789-pbleiman "View pbleiman's Profile")* on topic *[Default quantity](/forum/26-product-category-display/879239-default-quantity#214003 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.27 -- Browser(s) name and version -- : Safari 8.0.7 (OS X)  Is it possible to set a default quantity in the &quot;add to cart&quot; field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.  I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.")*

Works like a charm ! Thanks.

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

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

Less More

- Posts: 36
- Thank you received: 1
-
-

5 years 9 months ago [\#329000](#329000) by [ImageVillage](/forum/user/58780-imagevillage "View ImageVillage's Profile")  Replied by *[ImageVillage](/forum/user/58780-imagevillage "View ImageVillage's Profile")* on topic *[Default quantity](/forum/26-product-category-display/879239-default-quantity#329000 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.27 -- Browser(s) name and version -- : Safari 8.0.7 (OS X)  Is it possible to set a default quantity in the &quot;add to cart&quot; field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.  I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.")*

Hey Nicolas is there a way to do this in latest Hikashop? I have a client who needs to do the same thing as this but can't work it out at all.

thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzkyMzktZGVmYXVsdC1xdWFudGl0eT90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

5 years 9 months ago [\#329008](#329008) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Default quantity](/forum/26-product-category-display/879239-default-quantity#329008 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.5.27 -- Browser(s) name and version -- : Safari 8.0.7 (OS X)  Is it possible to set a default quantity in the &quot;add to cart&quot; field on the product page ? We have products which we like to sell per 6 by default. It must be possible to order less than 6 units, but we'd like to stimulate the customers to order by 6 (or another multiple). Therefore, in the add to cart box by default the quantity should be set to 6 instead of 1.  I found a thread to set the minimum value to 0 and also manage to set this to 6 (either through minimum order quantity or by modifying the PHP directly), but in that case I cannot input a lower value anymore.")*

Hi,

It's still possible but the code to change has evolved.
Now, in that same view file show_quantity.php, you need to change the line:
$current_quantity = hikaInput::get()-&gt;getInt('quantity', $min_quantity);
to:
$current_quantity = 6;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzkyMzktZGVmYXVsdC1xdWFudGl0eT90bXBsPW1hcmtkb3du) 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.055 seconds

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