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

#   Product restrictions within a category

##

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

Less More

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

11 years 11 months ago [\#181816](#181816) by [Impress51](/forum/user/34807-impress51 "View Impress51's Profile")  *[Product restrictions within a category](/forum/27-checkout/873354-product-restrictions-within-a-category#181816 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.5  Hi, I'm trying to create a shop in which these restrictions need to be configured and I'm unsure about how to configure them:  Within Category A, a user cannot complete checkout with items from this category unless they have at least one Product X in their cart.  Within Category B, a user cannot complete checkout with items from this category unless they have at least one Product Y in their cart.  Within other categories there are no restrictions.  Regards")* was created by *[Impress51](/forum/user/34807-impress51 "View Impress51's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5

Hi, I'm trying to create a shop in which these restrictions need to be configured and I'm unsure about how to configure them:

Within Category A, a user cannot complete checkout with items from this category unless they have at least one Product X in their cart.

Within Category B, a user cannot complete checkout with items from this category unless they have at least one Product Y in their cart.

Within other categories there are no restrictions.

Regards

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 11 months ago [\#181830](#181830) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Product restrictions within a category](/forum/27-checkout/873354-product-restrictions-within-a-category#181830 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.5  Hi, I'm trying to create a shop in which these restrictions need to be configured and I'm unsure about how to configure them:  Within Category A, a user cannot complete checkout with items from this category unless they have at least one Product X in their cart.  Within Category B, a user cannot complete checkout with items from this category unless they have at least one Product Y in their cart.  Within other categories there are no restrictions.  Regards")*

Hi,

By default we can't set this kind of restrictions in HikaShop, but thanks to a plugin this can be possible.
So you will have to do a little plugin based on the function "onPaymentDisplay()", in that function do your checks about the products presents in the cart, and if all conditions are met, return true, else empty the methods and display a system message.

It require good PHP knowledges, here is the documentation for that:
[ www.hikashop.com/support/support/documen...tml#onPaymentDisplay](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html#onPaymentDisplay)

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

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