How to Shorten URL

Attention: The current document only works with the new front-end lib from Boost Commerce. Please read this document first to know if you are using the latest version.
For other versions, kindly contact support@boostcommerce.net for support.

In boost-pfs-filter.js, set these settings:

// Override Settings
var boostPFSFilterConfig = {
  general: {
    isShortenUrlParam: true,
    urlScheme: 2,
    /* This list is an EXAMPLE! Please don't copy this */
    shortenUrlParamList: [
      'pf_c_collection:collection', 
      'pf_t_tag:tag',
      'pf_opt_color:color',
      'pf_opt_size:size',
      'pf_r_review_ratings:rate',
      'pf_v_vendor:vendor',
      'pf_p_price:price'
    ],
  },
};
  • isShortenUrlParam: Enable shorten URL or not
  • urlScheme: the URL format when shortening:
    • 0: Don't change address bar URL
    • 1: Use one key & value pair for each filter value: color=red&color=blue
    • 2: Merge key & value pair for filter value with the same key: color=red,blue
  • shortenUrlParamList:
    • Check the filter options the store has
    • Make a list of URL params to shorten, for example:
      • pf_c_collection → collection
      • pf_t_tag → tag
      • ...
    • Make sure the params are unique and don't conflict with other apps
    • Make a list with this format