Product Assignments (Filter by Attribute)
This functionality allows customers to have catalogs that could display a different set of products depending on the web user that is navigating the site. Products can be configured to be public, that are products displayed to all web users, or with assignments to be displayed only to certain web users.
The functionality is based on the filtering that the user can do on the website using the product attributes. The same way a web user can filter the products to see only those with a specific attribute value, for example Color = blue, the website will internally use one of the product attributes to show only those that match one of the customer categories codes. The products displayed on the site will be those that are public and those assigned to the customer.
Configuration
This functionality requires the following configuration:
1. Turn on the functionality by configuring some settings in the SmarterCommerce Settings module.
2. Publish products to have them all marked as public.
3. Setup the attribute values that are going to be used to filter products.
4. Set the attribute values to the assigned products.
The following sections explain in detail these steps.
Step 1: SmarterCommerce Settings
The following settings must be configured in the SmarterCommerce Settings module:
Catalog > Product Filter Assignments
- Filter by assignments Attribute (ATTR_FILTER_NAME): when this setting is configured, an attribute is created with the name defined by the user.
- Address Book Category Code (FILTER_PROD_CATCODE): value must be greater than zero
- On the website these 2 settings are read to check if an additional filter must be applied to Elasticsearch/App Search queries. This additional filter validates that the attribute with the id “sc_assignment_attribute” has the following one of these values:
- “*” (To retrieve public products).
- The customer category code value corresponding to the category code configured in the FILTER_PROD_CATCODE setting.
- For non-authenticated users, the default customer is used to retrieve the category code value.
- For sales person customers, the client that was selected to work on behalf of.
- If the customer category code value is empty, the customer will see public products
Step 2: Publish products
Once the attribute is created and the category code is configured, the website will start filtering products using the product’s attribute value. At this point, it is recommended to initialize all products as public (an “*” is used as the default attribute value). This way we ensure that the products are still displayed on the website catalogs.
Note: This step can be skipped if all products will be assigned to specific customers. This means that there will be no public products.
There are two ways to initialize the products as public:
- Execute a “Rebuild Products Index” process.
- Publish all products.
Step 3: Setup the attribute values
In the attribute created to filter products, the user must add the attribute values corresponding to the values of a customer(s) category code that was configured in the FILTER_PROD_CATCODE setting.
When an attribute value is created make sure that the “Description” field has the category code which will be used to filter the products.
Note: Products that don’t have attribute values belonging to the configured filter assignments attribute, will have the value “*” to indicate that these products will be displayed to all customers. This is something that is managed by the application, there is no need to create an attribute value for the public products.
Step 4: Set the attribute values to the products
Final step is to assign the attribute values to the products that the user wants to configure as specific for certain customers. Once the values are assigned, the products must be published.
This Section Also Contains
- Ecommerce CMS MVC with Bootstrap 4
- Creating a New Sitefinity Custom Template
- How to Share Template in Multisite Instance
- How to Customize a Site with Resource Packages
- Theming Bootstrap
- Page Long Cache Considerations and Configuration
- Mappings Module
- Personalization Integrated with JDEdwards
- How to Add New Widget Template
- How to Include Local Web Font
- How to Use External Plugins Locally
- Sitefinity Authentication Expiration
- Sitefinity Images
- Internal Plugins Configuration in Update 6 - SC20220114
- Internal Plugins Configuration in Update 7
- How to Setup Pickup Instructions Page
- How to Setup Terms and Conditions Page
- Resource Manage Multisite
- Content Search Configuration
- Product Assignments (Filter by Attribute)
- Google Analytics Configuration
- Configure Azure Redis Cache (ASP.Net State Server Provider)
- Task Manager Email Notifications
- Configure Google Maps
- Catalog and Product Content Metatags (SEO)
- Cookies Configuration
- Change Password Configuration
- Recycle Bin
- Login Page Configuration
- Error Page Configuration
- Configure the SmarterCommerce Menu in Backend
- SmarterCommerce Settings Not Being Displayed
- Management Console Email Templates
- EPayments Modules
- Troubleshooting Errors
- Configure Kraken Image Optimization
- Sitefinity Health Check Integration