Skip to main content
For Dev - How to Shorten URL (App Lib V2)
Updated over 3 weeks 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 us via our live chat support for futher assistance.


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

Feel free to reach out to our dedicated support team via chat if you have any questions or require additional assistance.

Did this answer your question?