Eric Schultz
10/10/2024, 3:33 PMCeligo AI
10/10/2024, 3:33 PMAI generated answer (using internal Slack threads):In SuiteCommerce Advanced (SCA), you can get the current URL query parameters in your custom extension using the
Backbone.history.getFragment()
function. This function returns the current URL fragment from the hash or pushState
. You can then parse this fragment to get the query parameters.
Here is a simple example:
javascript
var fragment = Backbone.history.getFragment();
var params = fragment.split('?')[1];
In this example, fragment
will contain the current URL fragment, and params
will contain the query parameters as a string. You can then parse params
as needed to get the individual parameters.
Please note that this method will only work if your SCA site is using pushState
or hash-based routing. If your site is using server-side routing, you may need to use a different method to get the current URL.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/10/2024, 3:33 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818963528
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.796215653
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.792575
Celigo AI
10/10/2024, 3:33 PM