Installation & Setup
What does the extension do?
The PureClarity Magento 2 extension does the following:
- Allows you to sign up for a free trial.
- Gives you guidance on the initial setup of PureClarity in your store.
- Sets up the Zones for the Home Page, Product Page, Basket Page and Order Confirmation Page.
- Ensures data integrity between your store and PureClarity through cron jobs and indexing.
- Tracks events on your stores frontend to ensure up to date information is used in recommendations.
To get started you’ll need to install the extension.
How to install the extension
Alternatively you can install PureClarity via Composer:
$ composer require pureclarity/pureclarity-magento-2 $ php bin/magento module:enable Pureclarity_Core $ php bin/magento setup:upgrade $ php bin/magento setup:static-content:deploy
Setting up an account
With the extension now installed, go to the Magento admin panel. You should see a notification at the top of any page and a new menu item under the content menu. Click the link in the notification or the menu item to go to the PureClarity Dashboard page.
Signup from within Magento
If you do not yet have an account with us you can sign up, by clicking the sign up button. When you click the signup button on the PureClarity Dashboard, the sign up form appears.
It requires you to fill in some basic details that we need in order to set up your account within PureClarity.
When you submit the form, the request will be submitted to PureClarity and processed as soon as possible, usually within a couple of minutes.
If you stay on the waiting page your Magento site will be configured as soon as it is processed, but you can also navigate away and come back later as a background process will check the progress of your application and configure your Magento site once it’s complete.
Already have an account
If you already have an account with us, you can fill in the details on the dashboard page after install:
You’ll need the following details from your account:
You can find these under the My Account > Integration menu within the PureClarity admin site.
You’ll also need to choose the region (USA / Europe) that your application is on.
If you have multiple language stores you will need an application per store, and thus multiple Application Access Keys. Please contact our Support Team to create additional PureClarity accounts for you at email@example.com.
Once PureClarity has set up your account, or you provided your account details, then your Magento store will have the following automatically happen:
- PureClarity plugin configured:
- Module Enabled.
- Access Key.
- Secret Key.
- Daily Feeds Enabled.
- Data Indexing Enabled.
- Data Feeds requested:
- Historic order information.
Completed setup display
Once the PureClarity signup has completed and your store is configured, the dashboard page will change to show the next steps to take, information about data feeds and links to help & documentation
STEP 1 – configure Zones & Templates
Step 1 – Configure your Zones and style your templates using the Recommender Designer within the PureClarity Admin area
STEP 2 – Setting up Zones within Magento
Step 2 – Set up the Zones within your Magento 2 site. A number of default Zones will be installed.
Before PureClarity can show content on your site you need to install Zones in the relevant areas on your site. This can be done either automatically using the [Set up Zones] button or installed manually using Magento Widgets.
We recommend that you initially install your Zones automatically and then add additional Zones as Widgets as you grow your PureClarity implementation.
Set up default Zones
Click the [Set up Zones] button from the “Step 2” section to display the Install Zones popup:
Be sure to select the current theme of the site that you wish to install Zones on and click the [Install Zones] button.
Once widgets have been created you will be shown a status of the installation, and a list of the unique Zone Ids that have been created.
The list of BMZs installed through the automatic installation process are as follows:
- HP-01 (content.top)
- HP-02 (content.bottom)
- HP-03 (content.bottom)
- HP-04 (content.bottom)
- PP-01 (content.bottom)
- PP-02 (content.bottom)
- BP-01 (content.bottom)
- BP-02 (content.bottom)
Order Confirmation Page
- OC-01 (content.bottom)
- OC-02 (content.bottom)
Install custom Zones
You may want to add additional Zones on other areas of your site. This can easily be done by adding Magento Content Widgets. See the Zones section of this documentation for more information.
STEP 3 – Customize your campaigns
Step 3 – Customize your Campaigns and Segments within the PureClarity Admin Area to optimize the performance of your Zones
Types of data feed
“Data Feeds” are the mechanism by which Data is sent data from your store to PureClarity. The data feed cron processes within the plugin generate the data for each type of feed.
Once the feeds have been generated, they will be submitted to PureClarity. To see when the data has been processed you can log into the PureClarity admin console, select Settings > Data Feeds to see a list of the feeds along with their import statuses. If there are any issues with the feeds, see the F.A.Q section.
There are 5 types of feeds that the Magento plugin can send:
This feed will contain data for all visible & enabled products in your store. It will send data for all product attributes and will send default pricing.
This feed will contain data for all visible & enabled categories in your store. It will send data for all category attributes.
This feed contains data for all Magento Customers within your store. It will send basic information about each customer that can then be used to Segment them within PureClarity.
When enabled, this feed will send “Brand” information. This could also be a Vendor or Manufacturer. A brand under most circumstances requires a name and an image in order to activate the brand recommender and search functionality in PureClaritySee the “Enabling Brand feed” section for more information.
A set of data regarding the last 12 months of orders, including which customers ordered what products. This helps to activate and kick start the data that PureClarity collects by allowing the system to begin mining common purchase patterns and associating buying activities to users.
Orders should only be imported only once. If orders are imported a second time they are dropped by the system so as to not duplicate data.
When are feeds run?
By default, Product, Category and User feeds are run nightly at 3am. This is done via a cron process and full feeds of each type are sent.
The PureClarity plugin has an indexer for Product & Category data changes. When a Product or Category is changed within Magento, a record of the ID that has changed is made and a cron process runs every minute to collate and send the updated data to PureClarity. This means that changes within Magento should be reflected in PureClarity within minutes. This is enabled by default.
As outlined above changes to data are updated automatically by the PureClarity extension. However, should you wish to manually submit a full feed to PureClarity you can follow this process at anytime.
1) On the PureClarity Dashboard page within Magento, click the “Run Feeds Manually” button within the “Data Feeds” panel.
This will bring up the feed selection popup:
Choose types of feeds you want to send, then click the “Run feeds now” button. This will request that the selected feeds are run asap. A cron process runs every minute to check for these requests and then generates and sends the feeds to PureClarity.
Feed status on dashboard
A panel on the dashboard page gives you an overview of the status of each of the types of feed.
If no feeds have yet been sent from your store, then this status will show.
Waiting for feed run to start
If feeds have been requested, but the cron job that runs them has not started yet, then this status will show.
In Progress: x% / Waiting for other feeds to finish
If the feed runner cron job has started, and is processing a feed, then this status will show.
Last complete run – dd/mm/yy
Once feeds have run successfully, this status will show.
Error, please see logs for more information
If an error occurs when transmitting the feed to PureClarity, then this status will show. See troubleshooting section for more info.
If PureClarity is disabled on your store, or the Brand feed is not set up, then “Not Enabled” will show.
How to enable the Brand feed
The PureClarity Magento extension handles brand feeds through the use of Magento categories. This is done by creating a parent category, for example with the name “Brands”, that will have a list of subcategories for each of your brands. This will allow you to give each brand a name, an image and add the products that belong to that brand. The parent category and subcategories can be set to hidden from menus, but they must be enabled
Once your brand categories are configured and you’ve added your products to them,you can set the parent category, such as Brands, under the “Brand Parent Category” drop down box under the Data/Feed Indexing section on the PureClarity configurations page. This tells PureClarity to treat all the first level children of this category as brands.
How to install custom Zones
You may want to add additional Zones on other areas of your site. This can easily be done by adding Magento Content Widgets.
As an example of how to add your own Zone widgets to your site, let’s add a Zone to the Search Results Page.
- Navigate to Content > Widgets. Click [Add Widget].
- Choose “PureClarity Zone” from the Type drop down.
- Choose your current theme from the Design Theme drop down.
- Click [Continue].
- Input a Widget Title such as “PC Zone SR-01” to represent a Search Results Zone.
- Set where your Zone will be placed:
- Add “Layout Update” button
- Select “Specified Page” from the “Display on” dropdown menu
- Choose the page where you’d like your Zone to be displayed. In this example choose “Quick Search Form” and “Before Main Columns” from the Container drop down.
Now we we need to configure the Zone specific values:
- Select “Widget Options” from the left menu.
- Enter SR-01 into the Zone Id box.
- Leave the Fallback Block Id text box blank. You may want to set this to a custom static block in future should you wish. This also applies to any of the widgets that were installed automatically too, just find the widget and edit it. Type in the Id of another static block, and if a Zone isn’t populated by PureClarity when the page is rendered, your custom static block will be insert instead. Note, you can’t fallback to another Zone.
- Zone Display Mode: If you want to show a Zone on a specific device type, this setting tells the Zone when to render using CSS Media queries. Default will show on all devices.
- Applying a margin will set a 10px margin above and below the Zone content area.
- CSS Custom Class: You can add your own CSS classes that will be added to the Zone html element for greater control of how it’s displayed.
- Click [Save].
Your Custom Zone Widget is now configured, and can be seen on the search results page!
How to debug Zones
If you want to see the location of your Zones when they’re not being populated, navigate to the PureClarity configuration page and set the “Debug Mode” under the Advanced section to “Yes”. Zones will then be rendered with their name and id.
Environment & Credentials
By default, when you sign up or configure from the dashboard page, your account details will be populated here already.
If you need to turn PureClarity off for any reason, you can do so by changing “Enabled” to “No” and clicking [Save Config]. This will stop the PureClarity extension from displaying Zones on the frontend, stop sending daily feeds and stop indexing from sending Product & Category updates.
Data Feeds & indexing
You can disable daily feeds or product and category indexing within the “Data Feeds & Indexing” section of the PureClarity Magento configuration.
There is also an option to enable “Send Customer Group Pricing” within the Product feed. When this is enabled, the feed generation process will go through each customer group and send the prices for each one along with the default pricing it normally sends. This allows Customer Group pricing to be shown in recommenders rather than default pricing.
You can set fallback image URLs to be used where a product, category or brand doesn’t have any images set. To do this navigate to the PureClarity Configuration Page from the left hand menu, and set each URL using the text boxes under the “Placeholder images” section.
Additional product information
You can augment each product with additional information, sent in the data feed, to control how PureClarity displays products.
Go to Catalog > Products and select a Product to edit. Scroll down towards the bottom of the page and expand the PureClarity section and you’ll see the PureClarity attributes you can set against the product:
Search Tags are used in recommenders based on Search. You can add search tags to products, e.g. ‘Summer’, to boost the relevance of products based on visitors’ search terms. Enter a comma separated list of words or phrases that you’d like to be sent to PureClarity as Search Tags.
Exclude from recommenders
Set this to yes to stop a product from being included in PureClarity recommenders. You may want to do this for small priced items.
Set if a product should be treated as a new arrival by PureClarity. This enhances recommenders and helps to target customers by showing hot new arrival products that may interest them.
Set if a product should be treated as an on-offer product. This enhances recommenders and helps to target customers by showing them products that are on promotion. PureClarity will do this automatically if products are on sale, however, you may want to override this if a product doesn’t currently have a special price, but you’d like it to be treated as a promoted product.
Additional category information
You can set an additional option for PureClarity against each category. To do this go to the PureClarity section on a categories properties page. The options available are:
This allows you to set an additional category image should you wish to set one specifically for PureClarity category recommenders. To use this, you will need to alter the PureClarity template under the PureClarity admin console. In the most common cases PureClarity will work and use the categories’ standard image.
Exclude from recommenders
Set this to yes to stop a category from being included in PureClarity recommenders.
Here are some Troubleshooting tips for our Magento 2.x FAQs.
Why are my feeds failing?
- Ensure your server can talk to the PureClarity servers and your AccessKey, SecretKey and Region is correct.
- You can activate Debugging under System > Configuration > Developer > Debug and enable “Log Settings”. See the var/debug.log for additional information as to why the feed may not be working.
Why are the Zones not showing?
- Check that everything is enabled, and they are being rendered to the screen. Enable Debugging by switching Debug Mode from the Advanced section on the PureClarity Configuration page, to see if the BMZs show the BMZ Ids on the front end.
- If Zones are being rendered, but are still not being populated by PureClarity, ensure that the Zones are configured in the PureClarity admin console, under settings. Check that you have active merchandising campaigns set up.
- If the Zones are not being rendered at all, check that other types of Widget can be displayed on the site (e.g. a CMS Static Block). If not, there is likely to be an issue with the theme. Try removing any content from the Layout and Default fields at System > Configuration > General > Design, and re-testing a basic Widget against different themes you have listed. If the Widget now displays, it indicates an issue with the theme you were using. An alternative approach to displaying Zones would be to embed them directly within the theme.
My products/categories aren’t updating.
- Ensure that Daily and Index feeds are enabled on the PureClarity Configuration page.
- Ensure that your Index Management contains the PureClarity Indexes, and that your indexing Cron jobs are running.
How do I show Customer Specific Prices?
At present PureClarity does not support customer specific pricing out of the box, but you can intercept the HTML from the PureClarity using the callback feature. See the “Callback events” section in our bespoke integration documentation
We also support customer group pricing in Product feeds, see the “Data Feeds & Indexing” section for more information.