Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

PrismaVisual

Member
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

486 profile views
  1. This worked perfectly!!! It works on all instance: store pages, the summaries, the maps...everywhere! I am beyond grateful. Thank you so much! Can I buy you a coffee?
  2. @creedon Thanks so much for the reply! I tried adding that where specified but the entire page content disappeared and showed as "/undefined" up in the address bar. I'm way over my head here lol...it is my first time messing with javascript. Am I supposed to modify that somehow? I am adding properties/neighborhoods as "products" in "store pages" so that I can use them in conjunction with advanced map blocks plugin and universal filter from squarewesbites. These both work beautifully but then I realized that every instance of a product automatically links to the built in pages. 🤦🏻‍♀️ And of course I had already created all custom 40 property pages and 28 neighborhood pages. 🤡😩 I just need a way to change those links!! I figured javascript would be the quickest solution. I thought either having a script that would omit the "/rentals/p" part from the urls, placed in the sitewide header injection would be best. Or even a script to redirect the urls would be amazing. I got close but could only make it work for 1/40 of them. 🤣
  3. Hi Guys, I've been messing around with 2 different approaches since originally posting but haven't been able to work it out (it's been weeks 😑 lol). I know I'm doing something(s) wrong..I just don't know what I don't know yet! 😅 . I posted this in someone else's thread already but it seems like y'all probably know what you're doing!!! I'm trying to implement some javascript on my store page so I can redirect the product links. I want to redirect product urls like: https://mayellre.squarespace.com/rentals/p/130-water-street to urls like: https://mayellre.squarespace.com/130-water-street. There are currently 40 rental "products" (more to come eventually), but they will never be able to be added to a cart/purchased. I assume that may be why the first method below doesn't work. <script> window.customCartDrawer = { onUpdateFunction: function(drawer, data) { $(document).ready(function(){ $('a').each(function(){ this.href = this.href.replace('/rentals/p/', '/'); }); } } </script> I was able to get this second option to work for one redirect, however when I tried to implement it for all 40 product links, it only redirects 1 of them. Maybe im targeting them wrong or separating wrong? Single var set: <script> var fromUrl = '/rentals/p/1-west-street-listing'; var toUrl = '/1-west-street'; // do not edit below this line var fromRegex = "^\\" + fromUrl + "\\/?$"; var match = location.pathname.match(new RegExp(fromRegex, 'i')); if (match && !window.frameElement) { window.location.replace(toUrl); } </script> My best guess at multiple var (not working) 😕 <script> var fromUrl = '/rentals/p/1-west-street-listing'; var toUrl = '/1-west-street'; var fromUrl = '/rentals/p/2-gold-street-listing'; var toUrl = '/2-gold-street'; var fromUrl = '/rentals/p/2-water-street-listing'; var toUrl = '/2-water-street'; var fromUrl = '/rentals/p/8-spruce-street-listing'; var toUrl = '/8-spruce-street'; var fromUrl = '/rentals/p/10-barclay-street-listing'; var toUrl = '/10-barclay-street'; var fromUrl = '/rentals/p/10-liberty-street-listing'; var toUrl = '/10-liberty-street'; var fromUrl = '/rentals/p/15-broad-street-listing'; var toUrl = '/15-broad-street'; var fromUrl = '/rentals/p/15-cliff-street-listing'; var toUrl = '/15-cliff-street'; var fromUrl = '/rentals/p/15-park-row-listing'; var toUrl = '/15-park-row'; var fromUrl = '/rentals/p/15-william-street-listing'; var toUrl = '/15-william-street'; var fromUrl = '/rentals/p/19-dutch-street-listing'; var toUrl = '/19-dutch-street'; var fromUrl = '/rentals/p/20-exchange-place-listing'; var toUrl = '/20-exchange-place'; var fromUrl = '/rentals/p/20-pine-street-listing'; var toUrl = '/20-pine-street'; var fromUrl = '/rentals/p/20-west-street-listing'; var toUrl = '/20-west-street'; var fromUrl = '/rentals/p/21-west-street-listing'; var toUrl = '/21-west-street'; var fromUrl = '/rentals/p/21-23-south-william-street-listing'; var toUrl = '/21-23-south-william-street'; var fromUrl = '/rentals/p/30-park-place-listing'; var toUrl = '/30-park-place'; var fromUrl = '/rentals/p/37-wall-street-listing'; var toUrl = '/37-wall-street'; var fromUrl = '/rentals/p/40-broad-street-listing'; var toUrl = '/40-broad-street'; var fromUrl = '/rentals/p/40-broad-street-listing'; var toUrl = '/40-broad-street'; var fromUrl = '/rentals/p/45-wall-street-listing'; var toUrl = '/45-wall-street'; var fromUrl = '/rentals/p/50-west-street-listing'; var toUrl = '/50-west-street'; var fromUrl = '/rentals/p/55-liberty-street-listing'; var toUrl = '/55-liberty-street'; var fromUrl = '/rentals/p/55-wall-street-listing'; var toUrl = '/55-wall-street'; var fromUrl = '/rentals/p/63-wall-street-listing'; var toUrl = '/63-wall-street'; var fromUrl = '/rentals/p/67-wall-street-listing'; var toUrl = '/67-wall-street'; var fromUrl = '/rentals/p/70-pine-street-listing'; var toUrl = '/70-pine-street'; var fromUrl = '/rentals/p/71-broadway-listing'; var toUrl = '/71-broadway'; var fromUrl = '/rentals/p/75-wall-street-listing'; var toUrl = '/75-wall-street'; var fromUrl = '/rentals/p/80-john-street-listing'; var toUrl = '/80-john-street'; var fromUrl = '/rentals/p/85-john-street-listing'; var toUrl = '/85-john-street'; var fromUrl = '/rentals/p/88-greenwich-street-listing'; var toUrl = '/88-greenwich-street'; var fromUrl = '/rentals/p/90-west-street-listing'; var toUrl = '/90-west-street'; var fromUrl = '/rentals/p/90-william-street-listing'; var toUrl = '/90-william-street'; var fromUrl = '/rentals/p/95-wall-street-listing'; var toUrl = '/95-wall-street'; var fromUrl = '/rentals/p/100-barclay-street-listing'; var toUrl = '/100-barclay-street'; var fromUrl = '/rentals/p/110-greenwich-street-listing'; var toUrl = '/110-greenwich-street'; var fromUrl = '/rentals/p/114-liberty-street-listing'; var toUrl = '/114-liberty-street'; var fromUrl = '/rentals/p/123-washington-street-listing'; var toUrl = '/123-washington-street'; var fromUrl = '/rentals/p/130-water-street-listing'; var toUrl = '/130-water-street'; var fromUrl = '/rentals/p/180-water-street-listing'; var toUrl = '/180-water-street'; // do not edit below this line var fromRegex = "^\\" + fromUrl + "\\/?$"; var match = location.pathname.match(new RegExp(fromRegex, 'i')); if (match && !window.frameElement) { window.location.replace(toUrl); } </script>
  4. Hello, I'm hoping someone can point me in the right direction here. I've been messing around with 2 different approaches but haven't been able to work it out (it's been dayyyyysss 😑). I know I'm doing something(s) wrong..I just don't know what I don't know yet! 😅 I'm trying to implement some javascript on my store page so I can redirect the product links. I want to redirect product urls like: https://mayellre.squarespace.com/rentals/p/130-water-street to urls like: https://mayellre.squarespace.com/130-water-street. There are currently 40 rental "products" (more to come eventually), but they will never be able to be added to a cart/purchased. I assume that may be why the below doesn't work. <script> window.customCartDrawer = { onUpdateFunction: function(drawer, data) { $(document).ready(function(){ $('a').each(function(){ this.href = this.href.replace('/rentals/p/', '/'); }); } } </script> This is the other option I tried. I was able to get this to work for one redirect, however when I tried to implement it for all 40 product links, it only redirects 1 of them. Maybe im targeting them or separating wrong? Single var set: <script> var fromUrl = '/rentals/p/1-west-street-listing'; var toUrl = '/1-west-street'; // do not edit below this line var fromRegex = "^\\" + fromUrl + "\\/?$"; var match = location.pathname.match(new RegExp(fromRegex, 'i')); if (match && !window.frameElement) { window.location.replace(toUrl); } </script> My best guess at multiple var (not working) 😕 <script> var fromUrl = '/rentals/p/1-west-street-listing'; var toUrl = '/1-west-street'; var fromUrl = '/rentals/p/2-gold-street-listing'; var toUrl = '/2-gold-street'; var fromUrl = '/rentals/p/2-water-street-listing'; var toUrl = '/2-water-street'; var fromUrl = '/rentals/p/8-spruce-street-listing'; var toUrl = '/8-spruce-street'; var fromUrl = '/rentals/p/10-barclay-street-listing'; var toUrl = '/10-barclay-street'; var fromUrl = '/rentals/p/10-liberty-street-listing'; var toUrl = '/10-liberty-street'; var fromUrl = '/rentals/p/15-broad-street-listing'; var toUrl = '/15-broad-street'; var fromUrl = '/rentals/p/15-cliff-street-listing'; var toUrl = '/15-cliff-street'; var fromUrl = '/rentals/p/15-park-row-listing'; var toUrl = '/15-park-row'; var fromUrl = '/rentals/p/15-william-street-listing'; var toUrl = '/15-william-street'; var fromUrl = '/rentals/p/19-dutch-street-listing'; var toUrl = '/19-dutch-street'; var fromUrl = '/rentals/p/20-exchange-place-listing'; var toUrl = '/20-exchange-place'; var fromUrl = '/rentals/p/20-pine-street-listing'; var toUrl = '/20-pine-street'; var fromUrl = '/rentals/p/20-west-street-listing'; var toUrl = '/20-west-street'; var fromUrl = '/rentals/p/21-west-street-listing'; var toUrl = '/21-west-street'; var fromUrl = '/rentals/p/21-23-south-william-street-listing'; var toUrl = '/21-23-south-william-street'; var fromUrl = '/rentals/p/30-park-place-listing'; var toUrl = '/30-park-place'; var fromUrl = '/rentals/p/37-wall-street-listing'; var toUrl = '/37-wall-street'; var fromUrl = '/rentals/p/40-broad-street-listing'; var toUrl = '/40-broad-street'; var fromUrl = '/rentals/p/40-broad-street-listing'; var toUrl = '/40-broad-street'; var fromUrl = '/rentals/p/45-wall-street-listing'; var toUrl = '/45-wall-street'; var fromUrl = '/rentals/p/50-west-street-listing'; var toUrl = '/50-west-street'; var fromUrl = '/rentals/p/55-liberty-street-listing'; var toUrl = '/55-liberty-street'; var fromUrl = '/rentals/p/55-wall-street-listing'; var toUrl = '/55-wall-street'; var fromUrl = '/rentals/p/63-wall-street-listing'; var toUrl = '/63-wall-street'; var fromUrl = '/rentals/p/67-wall-street-listing'; var toUrl = '/67-wall-street'; var fromUrl = '/rentals/p/70-pine-street-listing'; var toUrl = '/70-pine-street'; var fromUrl = '/rentals/p/71-broadway-listing'; var toUrl = '/71-broadway'; var fromUrl = '/rentals/p/75-wall-street-listing'; var toUrl = '/75-wall-street'; var fromUrl = '/rentals/p/80-john-street-listing'; var toUrl = '/80-john-street'; var fromUrl = '/rentals/p/85-john-street-listing'; var toUrl = '/85-john-street'; var fromUrl = '/rentals/p/88-greenwich-street-listing'; var toUrl = '/88-greenwich-street'; var fromUrl = '/rentals/p/90-west-street-listing'; var toUrl = '/90-west-street'; var fromUrl = '/rentals/p/90-william-street-listing'; var toUrl = '/90-william-street'; var fromUrl = '/rentals/p/95-wall-street-listing'; var toUrl = '/95-wall-street'; var fromUrl = '/rentals/p/100-barclay-street-listing'; var toUrl = '/100-barclay-street'; var fromUrl = '/rentals/p/110-greenwich-street-listing'; var toUrl = '/110-greenwich-street'; var fromUrl = '/rentals/p/114-liberty-street-listing'; var toUrl = '/114-liberty-street'; var fromUrl = '/rentals/p/123-washington-street-listing'; var toUrl = '/123-washington-street'; var fromUrl = '/rentals/p/130-water-street-listing'; var toUrl = '/130-water-street'; var fromUrl = '/rentals/p/180-water-street-listing'; var toUrl = '/180-water-street'; // do not edit below this line var fromRegex = "^\\" + fromUrl + "\\/?$"; var match = location.pathname.match(new RegExp(fromRegex, 'i')); if (match && !window.frameElement) { window.location.replace(toUrl); } </script>
  5. After driving myself nuts, turns out no js needed! For anyone looking for a solution, put this in your code injection Source <!-- Custom URL Redirect --> <script> var fromUrl = '/initialURL'; var toUrl = '/newURL'; // do not edit below this line var fromRegex = "^\\" + fromUrl + "\\/?$"; var match = location.pathname.match(new RegExp(fromRegex, 'i')); if (match && !window.frameElement) { window.location.replace(toUrl); } </script> <!-- End Of Custom URL Redirect -->
  6. Hi, I'm not sure if this is what you are looking for but try going into your commerce settings>inventory and export as a csv from there (upper right of screen). It should have all corresponding the urls in their own column. Alternatively, you could also give these chrome plugins a try. Try running on your store page in your browser (outside of the sqsp console) https://chrome.google.com/webstore/detail/image-link-grabber/fpajdpibnnhcohnpmnbefdgkbddmpjif https://chrome.google.com/webstore/detail/link-grabber/caodelkhipncidmoebgbbeemedohcdma
  7. Site URL: https://mayellre.squarespace.com/rentals Howdy SQSP forum! I'm looking for a way to redirect or change the link of my products on my products page from the automatic product pages they link to, to other individual pages I have already created. I'm using products for the rentals because I will be using them with the "Advanced Map Block" plugin & "Universal Filter" from Michael at squarewebsites. These are not totally integrated yet though. I've done a lot of reading on the forum and I think it will require javascript?? 😅 Any and all help will be greatly appreciated!
  8. Site URL: https://mayellre.squarespace.com/ Hello, I've built a custom page with a drop down accordion section (neighborhood guide on page). It works perfectly, and displays 5 images neatly in a row (under the top fives section). Since that page turned out good, I wanted to duplicate it and use it as a template of sorts. My issue is that once the page duplicates, something happens that causes the spacing to get all messed up. It will only load 4 in a row and bumps the fifth below...driving me nuts! Any help will be greatly appreciated! the site password is: bennythejet https://mayellre.squarespace.com/guide-soho (original template page) https://mayellre.squarespace.com/guide-tribeca (duplicated page)
  9. Site URL: https://mayellre.squarespace.com/about Hello forum peeps ! Does anyone know of a way I can customize a gallery lightbox action using css (or any other way)? What I would like to happen is that when an image in the gallery is clicked, instead of showing that same photo in the lightbox, I'd like it to show a different photo. I've attached a screenshot for example. Note the text in the "new image" shown in the screenshot will be part of the image. Unless of course, you know how I can keep it live! 😄 the access password is: bennythejet
  10. Site URL: https://tomato-lynx-pzwm.squarespace.com/ Hello all, Does anyone know why a thin line shows up between page sections? And more importantly how I can get rid of them?
  11. Thanks so much Tuan! However I've not been able to get this to work. 😞 The content has since been relocated. I did identify and target the new block yui id's but nothing happens. The new environment is 7.1 (it was formerly 7.0) maybe that's why? Does this script have to go somewhere other than the Code Injection Footer when working in 7.1? The new url is: https://tomato-lynx-pzwm.squarespace.com/ password: bennythejet
  12. Hi Tuan! I am also looking to do this, however my pages will have multiple search boxes that all need to have different display text. For example, the left one could say "Search by Neighborhood" and the right one could be "Search by Address". How can I target them individually? I assume I need to reference the yui ids, but I'm not exactly sure how to tackle that. Maybe you can help? Please and thank you! The url is : https://crocodile-pigeon-9mmr.squarespace.com/scratch
×
×
  • Create New...