hey
I have a button which sends a link with generated url parameters from a certain view, filtered by products sku:
the link is:
hidden link
if I paste this link in the web browser, it works fine, but when I try to share it in whatsapp, which is its only purpose actually, whatsapp takes the "%5B%5D" and transfroms then to "[]", which then results in toolset not recongnizing the parameters and not filtering properly.
If I try to send the url without "%5B%5D" (e.g hidden link), then toolset ignores the filtering too.
my code to produce this link is by identifying all existing sku's which are currently shown:
var skulinks = "";
jQuery('.compare-sku').each(function(){
skulinks += "sku%5B%5D=" + jQuery(this).text() + "%26";
});
jQuery(".share-compare").on("click", function() {
jQuery(this).attr("href", "<em><u>hidden link</u></em>?"+skulinks);
});
anyway I can force whatsapp to accept the brackets so that the link can be shared properly?
thanks!
Hello and thank you for contacting the Toolset support.
I am not really sure to understand the issue, below what I tested:
- Visit hidden link
- Click on the "Whatsapp" button. Check this screenshot hidden link
- It took me to the Whatapp web, and I selected one contact and clicked on send.
- Open the WhatsApp discussion and click on the link there hidden link
And I can't see any difference with the first page. There is a slight difference in the URL because one is encoded and the other is not. But the results of the page are identical.
Maybe I missed something. Can you give more details or record a short video to demonstrate the issue.
Hey Jamal, Thanks.
You see it the same because you didn't change anything in the initial display. Try pressing the X above some columns, it will remove them, and when you will be left with, say, 3 columns, press the send on whatsapp button. You will get the URL but whatsapp will convert %5B%5D into [] and then toolset will ignore this filtering and just take you to the initial stage where all products are there, no filtering.
I am very sorry, but I still don't understand the real issue.
Check this screenshot hidden link
I removed one column(the middle one), shared the URL via WhatsApp and open it again, I do not see any issues on the page, except that it still kept the 3 columns.
Can you, please, record a short video, using Loom or Screencastify that demonstrates the issue?
Jamal, in your screenshot you see that you removed some columns and left with only 2, but when shared, the link send you back to the page with ALL products in it, unfiltered - because toolset IGNORES the url parameters because toolset doesnt count the [] properly... it's in your screenshot.
let's try explaining this again like this:
the difference between this URL:
hidden link (what is sent to whatsapp)
and this URL (what whatsapp turns the url into):
hidden link
is that in the first, the products showing are only the three products which sku is in the url parameter. But in the second - ALL products are showing, it's the same as hidden link without filtering at all... or am i wrong?
Ok - there was an issue in the jquery code.... thanks and sorry for the trouble!