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

#   Limit order: Hikashop for restaurants

##

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

Less More

- Posts: 5
- Thank you received: 0
-
-

6 years 6 months ago [\#318312](#318312) by [isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")  *[Limit order: Hikashop for restaurants](/forum/35-orders-management/899713-limit-order-hikashop-for-restaurants#318312 "-- url of the page with the problem -- : saborartecieza.es -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I need to modify hikashop for restaurants.  I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.  Is it possible to do something like this with hikashop?  Thank you!")* was created by *[isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")*

-- url of the page with the problem -- : saborartecieza.es
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.3

Hello, I need to modify hikashop for restaurants.

I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.

Is it possible to do something like this with hikashop?

Thank you!

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

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

Less More

- Posts: 5
- Thank you received: 0
-
-

6 years 6 months ago [\#318315](#318315) by [isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")  Replied by *[isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")* on topic *[Limit order: Hikashop for restaurants](/forum/35-orders-management/899713-limit-order-hikashop-for-restaurants#318315 "-- url of the page with the problem -- : saborartecieza.es -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I need to modify hikashop for restaurants.  I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.  Is it possible to do something like this with hikashop?  Thank you!")*

I'm doing tests, if I set a time for the store to close my purchases, that same function works for me. But instead of closing the cart at certain times, I need it to close once the maximum number of orders has been reached

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

Less More

- Posts: 86583
- Thank you received: 14324
-
-

6 years 6 months ago [\#318314](#318314) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Limit order: Hikashop for restaurants](/forum/35-orders-management/899713-limit-order-hikashop-for-restaurants#318314 "-- url of the page with the problem -- : saborartecieza.es -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I need to modify hikashop for restaurants.  I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.  Is it possible to do something like this with hikashop?  Thank you!")*

Hi,

There is no solution for that for now.
But it would be possible to do with the development of a plugin to handle that restriction.

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

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

Less More

- Posts: 5
- Thank you received: 0
-
-

6 years 6 months ago [\#318392](#318392) by [isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")  Replied by *[isfpvesta](/forum/user/59061-isfpvesta "View isfpvesta's Profile")* on topic *[Limit order: Hikashop for restaurants](/forum/35-orders-management/899713-limit-order-hikashop-for-restaurants#318392 "-- url of the page with the problem -- : saborartecieza.es -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I need to modify hikashop for restaurants.  I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.  Is it possible to do something like this with hikashop?  Thank you!")*

Could it be used to modify it shopclosehours.phpmore or less like this?

/*trigger_error("No se puede dividir por cero", E_USER_ERROR);

$db = JFactory::getDBO();
$query = "select count(*) as cuenta from w2car_hikashop_order where order_status = 'pending'";
$db-&gt;setQuery($query);
$itemData = json_decode($db-&gt;loadResult());
if(!empty($itemData-&gt;cuenta)){
$data = $itemData-&gt;cuenta;
if (intval($data) &lt; 1 ) {
return true;
} else {
return false;
}
}*/

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

Less More

- Posts: 86583
- Thank you received: 14324
-
-

6 years 6 months ago [\#318400](#318400) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Limit order: Hikashop for restaurants](/forum/35-orders-management/899713-limit-order-hikashop-for-restaurants#318400 "-- url of the page with the problem -- : saborartecieza.es -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18 -- PHP version -- : 7.3  Hello, I need to modify hikashop for restaurants.  I need to have a limit of orders, for example 50. When you reach 50 orders whose status is in preparation that the rest of the users cannot order until they change their status.  Is it possible to do something like this with hikashop?  Thank you!")*

Hi,

Yes, I think you can do something like that.
Note that you don't need to do a json_decode as the value returned will already be an integer.
So $itemData is what you want to use directly in your Code:

if (intval($data) &lt; 1 ) {

check.

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

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