Dynamic Access

The Dynamic Access extension is available as of the Shopware Evolve plan.


Since Shopware version 6.4.6.0 you can use the following feature. In cooperation with the Rule Builder, the dynamic Access extension offers you the option of hiding certain contents of your shop depending on the rules. For example, you can display specific categories or products only for selected customer groups.

Installation

If at least the Shopware Evolve plan is stored for the store domain in the Shopware account, you can download and install the extension under Extensions > My Extensions.
It is important that you are logged in with your account in the Shopware Account tab.
After the extension has been installed, you can activate it using the button on the left side.

The installed extension does not have it's own menu item in the administration but is embedded in the respective configurations for which you want to create rules. Currently this is the case in the categories and products.

Categories

With the extension enabled, Dynamic Access is available to you under Catalogues > Categories in each category. You can find it in the General tab in the General section.

In the Rules drop down menu you can select one or more rules from the Rule Builder. The category will only be displayed to the visitor in the frontend if all the rules you have defined here apply. If no rule is selected here, the category is always visible. How to create a new rule, you can read here.

In order to hide a category (using the dynamic access rule in the category), it is not sufficient to only store the rule for the category. This must also be done for the products it contains, otherwise the products can be found using the search and you end up in the hidden category.

Be careful not to select rules that are mutually exclusive, or the category may never appear.

Products

With the extension enabled, Dynamic Access is available to you under Catalogues > Products in each product. You can find it in the General tab in the Visibility & structure section.

In the Rules dropdown menu you can select one or more rules from the Rule Builder or you can create a new rule. The product will only be displayed to the visitor in the frontend if all the rules you have defined here apply. If no rule is selected here, the product is always visible. How to create a new rule, you can read here.

Be careful not to select rules that are mutually exclusive, or the product may never appear.

If a customer has a product in the shopping basket that is subsequently hidden by a rule (e.g. a shopping basket rule that takes effect from a certain shopping basket value), the checkout process is blocked until this product has been removed from the shopping basket.

Variants

You can also set the visibility by rules for each variant individually. To do this, open the variant configuration of the respective product variant and navigate to the visibility & structure section.

The purple chain icon next to the rules item indicates that this setting is inherited from the main product. To make an individual setting here, you can click on the chain symbol to cancel the inheritance. Now you can select rules of the Rule Builder as usual from the main product, which then only count for this variant.

Variants are not hidden if they are not available, but they can no longer be selected on the product detail page. Only when all variants of a product are no longer available due to rules, the complete product is hidden.

Assigning multiple products

Using the Import/Export module, multiple products can be assigned to a Dynamic Access Rule at the same time.
To do this, go to Settings > Import/Export > Profiles tab. There you can duplicate the default product profile (1).

When you open the copy, you can add a new mapping (2) in the mappings tab (1) and assign the Database entry "swagDynamicAccessRules" (3).

Then start the Export with the newly created profile, as described here in our documentation.

Now you can add the Rule ID to the column "dynamic_access" (1) in the CSV file.

Afterwards, the customized CSV file (1) is imported again via the newly created product profile (2). You can find more information about the Import here.

After successful import, the Dynamic Access Rule was assigned to the products as previously edited in the CSV file. 


 

Was this article helpful?