The user's favourites or prior purchases can be displayed on the Product page. Included products can also be sorted and filtered. 

Page Modes

The ProductDisplay.aspx page has two modes indicated by these two new query string arguments:

  • User Favourites
    • The query string argument "PriorPurchases=true" must be present to enable this mode. If the UserFavourites key is provided and the value is "true" (case-insensitive), then the page will render the user favourites, if the key is not there or the value is anything else, the page will obey any other flags or fall-back to the default behaviour
    • This scenario will always result in the User Favourites being returned.
  • Prior Purchases Mode
    • The query string argument "CustomerPriorPurchases=true" must be present to enable this mode. If the PriorPurchases key is provided and the value is "true" (case-insensitive), then the page will render the customer favourites, if the key is not there or the value is anything else the page will obey any other flags or fall-back to the default behaviour
    • This scenario will return no results unless one of the following conditions is true
      • The user is a sales rep and the "Display Customer Favourites for Reps" setting is enabled
      • The current user's role has its "Enable Customer Favourites" setting enabled. 

NOTE: If HideChildAttributedProducts=true, then Product Variants will not work in the Prior Purchases page.  

Please get in touch with Commerce Vision, to have this setting witched on/off .


On this page:

Supporting Query String Arguments

These two modes also support the following already existing supplementary arguments:

  • SortProduct - the value supplied for this query string argument will be considered the product field that the data will be sorted by. For example, if "SortProduct=Description" is put into the query string then the data will be sorted by the description field (ascending order)
  • FilterProduct - the value supplied for this query string argument is considered to be a complex filter condition. This condition allows filtering the product by those records who's field contains the value in question. For example the condition might be "FilterProduct=description:lk:paper" which would result in the favourites/prior-purchases being further filter down to those products that have a description that is like (lk) or contains the word "paper"
  • FilterFeature - the value supplied for this query string argument is considered to be a complex filter condition, which allows complex filtering based on separate meta-data associated with individual products. This functionality is far beyond the scope of this document.
  • PageProduct - the value supplied for this query string argument will be considered the page of data to get from the full product results. So if 2 is given as the value only the 2nd page of results will be shown.
  • Template - the value supplied for this query string argument will be considered to be an override template for the system to use. So instead of using the Role/System level templates (explained in Templates section below) the template will be overridden with the one in the value of this query string argument.

Templates

The templates can be configured at the system or Role levels.

The System level settings are on the zAllocate.aspx page and the Role level settings are on the zRoles.aspx pages Functionality tab.

If not set, the Role level templates will fall back to the System level setting.

On both pages the labels are:

  • Product Display User Favourites Template - configures the User Favourites mode template to use 
  • Product Display Prior Purchases Template - configures the Prior Purchases mode template to use

Step-by-step guide

System level:

  1. Logged into the website, go to Content → Assign Default Templates (zAllocate.aspx).

  2. Find the Product Display User Favourites Template or Product Display Prior Purchases Template settings.

  3. For each, select or create a template for the relevant (or both) of the settings as required.

  4. For each Role Favourites or Prior Purchases will display, go to the Functions tab for the role. (See Role Level below for a guide.)   

  5. Tick Enable Customer Favourites


  6. Setup a Menu Item (as an example) to point to the ProductDisplay.aspx page with the addition of a "PriorPurchases=true" or a "CustomerPriorPurchases=true" query string argument for the menu items. This will result in the menu-item/page rendering the user favourites or prior purchases on the ProductDisplay.aspx page


Role level:

  1. Logged into the website, go to UsersRole Maintenance (zRoles.aspx).

  2. Select the required role.

  3. Go to the Functions tab.

  4. Tick Enable Customer Favourites


  5. Find the Product Display User Favourites Template or Product Display Prior Purchases Template settings.

  6. Setup a Menu Item (as an example) to point to the ProductDisplay.aspx page with the addition of a "PriorPurchases=true" or a "CustomerPriorPurchases=true" query string argument for the menu items. This will result in the menu-item/page rendering the user favourites or prior purchases on the ProductDisplay.aspx page


Related help