Download the PHP package viraxpress/restriction without Composer
On this page you can find all versions of the php package viraxpress/restriction. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download viraxpress/restriction
More information about viraxpress/restriction
Files in viraxpress/restriction
Package restriction
Short Description ViraXpress Restriction Extension for Magento2
License Apache-2.0
Informations about the package restriction
ViraXpress Restriction (Magento 2)
A Magento 2 extension to create flexible access restrictions for products, category pages, CMS pages, and CMS blocks, with customer group and store-scoped rules.
Description
ViraXpress_Restriction lets admins define restriction rules that control frontend user access and behavior based on:
- Customer group
- Store view(s)
- Date range (
start_at,end_at) - Restriction target types: products, categories, CMS pages, CMS blocks
- Response action: show an error message or redirect URL
Active restrictions apply in real-time via frontend event observers.
Features
- Admin UI under Stores > Manage Restriction > Restriction Rule
- Enable/disable module globally via system configuration (
VX Restriction > General > Enable Manage Restriction) - Create/ edit/ delete rule records in grid UI
- Restrict by:
- specific products
- product categories (and filter product collections globally)
- CMS pages
- CMS blocks
- Add-to-cart blocking for restricted product rules
Compatibility
- Magento 2.4.x
Installation
-
Install the extension via Composer:
- Run the following commands from your Magento root directory:
Usage
Configuration
Navigate to Stores > Configuration > VX Restriction > General and set Enable Manage Restriction to Yes.
Managing Restriction Rules
Go to Stores > Manage Restriction > Restriction Rule and click Add New Restriction Rule.
- Set a title, date range, store view, and customer group for the rule.
- Choose a response type —
Error Message(with custom text) orRedirect(with a target URL). - Enable Restrict Products and select specific products.
- Enable Restrict Categories to block access to category pages and filter their product collections.
- Enable Restrict CMS Pages or Restrict CMS Blocks to hide specific pages or blocks.
How It Works
- On each frontend request, observers check if the current customer's group matches an active rule within its date range and store view scope.
- Exact product matches take priority over
allwildcard matches. - On a match, the user is either shown an error message or redirected to the configured URL.
- Disabling the module globally bypasses all observer checks without requiring rule deletion.