Restrict Product
To get this extension, go to the Restrict Product extension page.
Restrict Product
Enable Restrict Product
Sign in to Magento Admin panel and navigate to Store ⟶ Configuration ⟶ Magediary ⟶ Restrict Product ⟶ General, Here select Yes to enable and save it. If you select no then the extension will be disabled on the frontend.
Backend
Restrict Product Rules
Sign in to Magento Admin panel and navigate to Marketing ⟶ Restrict Product by Magediary ⟶ Restrict Product Rules.
The grid lists all added rules by the admin.
Add a new rule
By clicking on Add New Rule button on the grid page, the admin can add a new rule
Rule Information
On creating a new Rule form, the following basic configuration will be displayed
Enable enable/disable the rule
Rule Name the name of the rule for the admin purpose only
Store View determines parts of the stores where the rule will be applied on the frontend
Customer Groups can be set for the audience to whom the rule will be applied on the frontend
From specifying the date from when the rule is applicable. Leave it blank to ignore this condition
To specify the date till the rule is applicable. Leave it blank to ignore this condition
Priority add the priority of the rule that will be considered on ascending order
Product Conditions
In this section, the admin can set conditions that must be met before the rule goes into action. If left blank, the rule applies to all products. Conditions can be based on any combination of product attributes.
By configuring this section, the admin can set conditions like restricting the products for such
- category
- attribute set
- particular product attributes
- skus
- etc...
Configuration
This section has two parts.
Hide products
To remove the product completely, set the Hide Product to Yes and the following additional configurations
- Redirect To: In case if the user access the product by direct
- Specific URL: specify the target link to the URL field or leave it blank to redirect to 404 not found page
- CMS Page: specify the target CMS Page to that the user will be redirected
Hide price/add to cart only
To only want to hide price/add to cart and/or replace it with CMS Block, set the Hide Product to No and the following additional configurations
Hide Price: it has three possible options
- Yes: to simply hide the price on the frontend
- No: to keep the price visible
- CMS Block: to replace the price block with selected cms block
- Hide Price Block: select the CMS block from the dropdown. This field is only visible on select the Hide Price to CMS Block and it shows on the product view and listing pages.
Hide Add to Cart: it has three possible options
- Yes: to simply hide the add-to-cart block on the frontend
- No: to keep the add-to-cart block visible
- CMS Block: to replace the add-to-cart block with selected cms block
- Hide Cart Block: select the CMS block from the dropdown. This field is only visible on select the Hide Add to Cart to CMS Block and it shows on the product view page.
Frontend
Below are the examples of Restrict product rules based on conditions.
Example 1
Conditions
- Remove the gym bag products from the frontend.
Category page - Before the rule is applied
- Gym bag products are showing
Category page - After the rule is applied
- Gym bag products are removed
Example 2
Conditions
- Remove the Price and Add to Cart block from the Top tees products on the frontend.
Category page - Before the rule is applied
- Price and Add to Cart button are showing
Category page - After the rule is applied
- Price and Add to Cart button are removed
Product page - Before the rule is applied
- Price and Add to Cart block are showing
Product page - After the rule is applied
- Price and Add to Cart block are removed
Example 3
Conditions
- Replace the Price and Add to Cart with CMS block
Category page - Before the rule is applied
- Price and Add to Cart block are showing
Category page - After the rule is applied
- Price is replaced with the selected CMS block, and Add to Cart is removed
Product page - Before the rule is applied
- Price and Add to Cart block are showing
Product page - After the rule is applied
- Price and Add to Cart block are replaced with the selected CMS blocks
YouTube demo
How it works - Demo