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


Circle Member
  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. andreab's post in Redirect add to cart button was marked as the answer   
    @trekyourmarket Here is a more elegant solution that will not interfere with putting items into the Cart:You can run a script that will, after they click "Add to Cart", reveal a gallery of Add-Ons related to that product, that they can then click on and purchase. You can see an example here:https://amazing-andrea-533j.squarespace.com/shop/(When you reach the site, just click the [Visitor Access] button and follow the instructions. Note that when you arrive in the shop there are 4 items. Only 2 items are "Add-Ons". Click on the "Digital Rescue" product. Then click "Add to Cart". The Gallery featuring the two Add-Ons is now revealed. )
    To create this:
    A) Put all of the "Add-Ons" for an item in the same Category. For example, if you have Monograms for Blankets and Custom Packaging for Blankets (I'm making stuff up here!) put them both in the Category "Addon-Blanket".B) In the "main product" under "Additional Info" add a Summary Block (I used Carousel) and point it to the Shop, and Filter by the "Category" designed for this product's Add-Ons.C) Below that Summary Block, add a Code Block that has this code:
    <script> $(function() { var $button = $('.sqs-add-to-cart-button'); $button.on('click', function(){ $('div.sqs-block.summary-v2-block.sqs-block-summary-v2').appendTo('.Share-buttons'); $('div.sqs-block.summary-v2-block.sqs-block-summary-v2').css("display", "block"); }); }); </script>
    In the Shop's Page Settings, under Advanced, add this code to the Page Header Code Injection:
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <style> .sqs-block.summary-v2-block.sqs-block-summary-v2 { display: none; } </style>
    IMPORTANT, Under Settings > Commerce > Checkout make sure that "Enable Express Checkout" is NOT ENABLED or this won't work.
    NOTE: The Classes .sqs-add-to-cart-button and .sqs-add-to-cart-button-inner are how the script targets the "Add to Cart" button. There's a chance that the template you're using uses different Classes, but without a link to your site, I was unable to confirm that.
    Good luck!
  2. andreab's post in Tremont Template: How can I keep a white logo in the homepage and a black logo everywhere else? was marked as the answer   
    @camilacodino First, under the Design Menu, change your logo to the "black" logo since you'll be using that on the majority of your web pages.
    Then go to Design > Custom CSS and upload the "white" version of your logo there. Next, you'll need to discover the Squarespace-assigned URL for that image. Just click on a blank line in the Custom CSS window, then click once on your image, and the URL will automatically be written out for you.
    Highlight and cut that URL because you're going to need it for the next part of the code. Click the [Cancel] button and do not save any changes.
    In the Page Settings for your Home Page, go to the Advanced Tab and under "Page Header Code Injection", insert this code:
    <script> Y.on('domready', function(){ Y.one("#siteHeader img").setAttribute("src","https://static1.squarespace.com/static/whitelogo.png"); }); </script>
    BUT replace https://static1.squarespace.com/static/whitelogo.png with the URL you just cut from the Custom CSS window! Because that's the actual URL of your own image.
    Remember to click the [save] button to Save Your Changes.
    From then on, when people go to the Home Page, they'll see the "white" logo, and on every other page they'll see the "black" logo.
  • Create New...