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

#   Minimum total order

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 5 months ago [\#106176](#106176) by [Nayeh](/forum/user/20050-nayeh "View Nayeh's Profile")  *[Minimum total order](/forum/4-how-to/82849-minimum-total-order#106176 "Hi there  Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.  This can be a mix of six different or 12 different wines though so the &quot;min order amount&quot; per wine doesn't apply.  Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?  Thanks")* was created by *[Nayeh](/forum/user/20050-nayeh "View Nayeh's Profile")*

Hi there

Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.

This can be a mix of six different or 12 different wines though so the "min order amount" per wine doesn't apply.

Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?

Thanks

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

13 years 5 months ago [\#106266](#106266) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum total order](/forum/4-how-to/82849-minimum-total-order#106266 "Hi there  Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.  This can be a mix of six different or 12 different wines though so the &quot;min order amount&quot; per wine doesn't apply.  Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?  Thanks")*

Hi,

You should just add a check on the file 'cart' of the 'checkout' view via the menu Display-&gt;Views and add such code: Code:

&lt;?php $total = 0; foreach($this-&gt;products as $product){ $total+=$product-&gt;cart_product_quantity; } if($total%6){ $app =&amp; JFactory::getApplication(); $app-&gt;enqueueMessage('Not possible'); $this-&gt;nextButton = false; }

Or you can also do it with manual shipping methods. Suppose that all your products weight 1kg. You could create shipping methods with range restrictions from 5.5 to 6.5, from 11.5 to 12.5, etc. And the system wouldn't find any shipping method when the weight wouldn't be in these ranges and wouldn't let the user finish the order.

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

- **[Mehul\_Hikashop](/forum/user/50533-mehul-hikashop "View Mehul&#95;Hikashop's Profile")**
- [![Mehul&#95;Hikashop's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50533-mehul-hikashop "View Mehul&#95;Hikashop's Profile")
- [ Offline](/forum/user/50533-mehul-hikashop)

Less More

- Posts: 11
- Thank you received: 0
-
-

8 years 8 months ago [\#286985](#286985) by [Mehul\_Hikashop](/forum/user/50533-mehul-hikashop "View Mehul&#95;Hikashop's Profile")  Replied by *[Mehul\_Hikashop](/forum/user/50533-mehul-hikashop "View Mehul&#95;Hikashop's Profile")* on topic *[Minimum total order](/forum/4-how-to/82849-minimum-total-order#286985 "Hi there  Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.  This can be a mix of six different or 12 different wines though so the &quot;min order amount&quot; per wine doesn't apply.  Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?  Thanks")*

Hello , I am not able to find above file please share full path of file and tell me where to add this code

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

Less More

- Posts: 86290
- Thank you received: 14268
-
-

8 years 8 months ago [\#286986](#286986) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Minimum total order](/forum/4-how-to/82849-minimum-total-order#286986 "Hi there  Because of packaging constraints, we only allow our online customers to buy a minimum of 6 of our products, and in multiples thereof.  This can be a mix of six different or 12 different wines though so the &quot;min order amount&quot; per wine doesn't apply.  Is it possible for Hikashop to do a validation check on the number of units they have before they are allowed to buy and pop up an error message if they have an incorrect number?  Thanks")*

Hi,

It is components/com_hikashop/views/checkout/tmpl/cart.php
Please note that it can only work with the "checkout legacy" setting activated in the HikaShop configuration.

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

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

[](#top)
