Skip to main content
For Dev - How to Shorten URL (App Lib V2)
Thomas Ta avatar
Written by Thomas Ta
Updated over 5 months ago

⚠️ This instruction is appropriate for App Lib V2 only from Boost Commerce. Please read this document first to know if you are using the latest version. For other versions, kindly contact [email protected] for support.


Instruction

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 directly
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

    • 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

If you have any questions or need further assistance, please do not hesitate to contact our dedicated support team at [email protected].

Did this answer your question?