Jump to content

Redirect default Product Detail page (Not Possible as per my devs)

Recommended Posts

Site URL: https://www.conflictgames.com/products

I want to redirect the product detail page for each of our products. We have created nice hero pages to replace the defaults generated by Squarespace. 

For example: Go to conflictgames.com/products and click on any of the first products to show. You will be sent to the default, not very attractive Squarespace page. 
 

Now, if you go back to the products page, and refresh the page so the code injection footer loads. You will find the link has changed to a better page with more of a hero page feel. 

 

The problem is the footer injection code does not load until after the refresh. Therefore, most customers won't see the hero pages. 

How can we fix this? 
 

For example, can we force a direct on the default page?

Or, move the injection code to a place that loads earlier?

My dev can't figure it out. 

thanks in advance for the replies.

 

Link to comment

paul2009 has a nice article on Ajax and some of the ins and outs.

Why does Squarespace code only work on refresh?

In the article he describes some ways to make code Ajax compatible. Assuming you decide you want to keep Ajax on.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
8 hours ago, ConflictGames said:

OMG. Turning off the ajax loading fixed the issue. The code is loading without a refresh! thank you Creedon. Is there any downside to turing off ajax? 

You can place your code inside squarespace ajax load event

Quote
<script>
document.addEventListener('DOMContentLoaded', init);
window.addEventListener('mercury:load', init);

function init(){
  // javscript goes here
}
</script>

 

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.