Jump to content

creedon

Circle Member
  • Posts

    9,499
  • Joined

  • Last visited

  • Days Won

    79

Posts posted by creedon

  1. Quote

    And then I found this dispiriting info (which I suspect you authored):
    https://sf.digital/squarespace-solutions/why-doesnt-my-code-work-until-i-refresh-the-page

    That is @paul2009's work.

    Quote

    I infer that the only remedy is the site-wide removal Ajax page load optimization.

    I suggest turning it off short term to see if that solves the issue.

    Quote

    except that we have lots of huge images (e.g., 171 on the product page in question) and I worry that they would be reloaded unnecessarily.

    I think Ajax doesn't help with images. It is designed to reduce the number of times structural elements, like the site header, are reloaded. The browser handles the caching of media, like images.

  2. 2 hours ago, KrisC said:

    I went back to change it again and for me it still says 'false'

    Not sure what is going on there but I've discovered a more fundamental issue.

    The name of the code is Change Unable to Add Item to Cart Alert for Out of Stock Variants. The code was designed to work with products that have variants. Your products have no variants and so the code is failing.

    I don't know of any code that works with products with no variants for v7.1.

  3. 2 hours ago, MTD said:

    Not sure why they are off but I redid the image map again using the image-map.net website.

    <!--
    
      responsive image map template
      
      Version     : 0.1d0
      
      SS Versions : 7.0, 7.1
      
      Note        : adapted from code on stackoverflow < https://bit.ly/3eIcJUB > by
                    hungerstar < https://bit.ly/3aMG6DU >
                    
      By          : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      -->
      
      <style>
      
        .image-overlay-wrap {
        
          display : inline-block; /* shrinks container to image size */
          fill : transparent;
          position : relative;
          
          }
          
        .image-overlay-wrap img { /* optional, for responsiveness */
        
          display : block;
          height : auto;
          max-width : 100%;
          
          }
          
        .image-overlay-wrap svg {
        
          left : 0;
          position : absolute;
          top : 0;
          
          }
          
        /*
        
          the following can be used for diagnostic purposes, uncomment the code and
          the target areas for the links will be shown in red
          
          */
          
        /*
        
          .image-overlay-wrap a {
          
            fill : red;
            
            }
            
          */
          
        </style>
        
      <div class="image-overlay-wrap">
      
        <img src="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631389ece3bb8d181406fac6/1662224879647/SA+Map+Background.png" />
        
        <svg viewBox="0 0 1224 1121">
        
          <a alt="Train Depot" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382f99bf3e53d3dc2d6f3/1662223098308/Train+Depot.JPG" title="Train Depot" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382f99bf3e53d3dc2d6f3/1662223098308/Train+Depot.JPG">
          
            <rect height="77" width="77" x="139" y="239" />
            
            </a>
            
          <a alt="Santa Rosa" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382d4563f5e2b328ba35d/1662223061574/Santa+Rosa.JPG" title="Santa Rosa" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382d4563f5e2b328ba35d/1662223061574/Santa+Rosa.JPG">
          
            <rect height="83" width="84" x="417" y="242" />
            
            </a>
            
          <a alt="St. Mary's" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382e7c6eb82111a63cbd5/1662223080140/St.+Mary%27s+.JPG" title="St. Mary's" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382e7c6eb82111a63cbd5/1662223080140/St.+Mary%27s+.JPG">
          
            <rect height="83" width="88" x="768" y="294" />
            
            </a>
            
          <a alt="Alamo Plaza" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382616bfb513f9048792f/1662222947127/Alamo+Plaza.JPG" title="Alamo Plaza" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382616bfb513f9048792f/1662222947127/Alamo+Plaza.JPG">
          
            <rect height="75" width="89" x="946" y="297" />
            
            </a>
            
          <a alt="Market Square" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/63138293a9a17d3dc0338d85/1662222996856/Market+Square.JPG" title="Market Square" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/63138293a9a17d3dc0338d85/1662222996856/Market+Square.JPG">
          
            <rect height="73" width="89" x="403" y="357" />
            
            </a>
            
          <a alt="Iron Bridge" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313827fbe442a69e8908ff5/1662222976491/Iron+Bridge.JPG" title="Iron Bridge" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313827fbe442a69e8908ff5/1662222976491/Iron+Bridge.JPG">
          
            <rect height="82" width="90" x="891" y="386" />
            
            </a>
            
          <a alt="Navarro School" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382a6c6eb82111a63bf56/1662223016248/Navaro+School.JPG" title="Navarro School" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382a6c6eb82111a63bf56/1662223016248/Navaro+School.JPG">
          
            <rect height="78" width="86" x="233" y="581" />
            
            </a>
            
          <a alt="Wasp's Nest" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313830c9bfffb06c8e2fedf/1662223117500/Wasp%27s+Nest.JPG" title="Wasp's Nest" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313830c9bfffb06c8e2fedf/1662223117500/Wasp%27s+Nest.JPG">
          
            <rect height="79" width="81" x="370" y="627" />
            
            </a>
            
          <a alt="San Pedro Creek" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382be9bfffb06c8e2fab7/1662223038791/San+Pedro+Creek.JPG" title="San Pedro Creek" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/631382be9bfffb06c8e2fab7/1662223038791/San+Pedro+Creek.JPG">
          
            <rect height="86" width="84" x="310" y="823" />
            
            </a>
            
          <a alt="Wesley House" href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313831f8f71a31aacfdf313/1662223135993/Wesley+House.JPG" title="Wesley House" xlink:href="https://static1.squarespace.com/static/5eb716e0863bca1e3322510f/t/6313831f8f71a31aacfdf313/1662223135993/Wesley+House.JPG">
          
            <rect height="85" width="82" x="367" y="954" />
            
            </a>
                                  
          </svg>
          
        </div>

    The output from image-map.net looks much better this time around.

    Let us know how it goes.

  4. 4 hours ago, paraselene said:

    if you wouldn't mind could you also help me?

    <!--
    
      responsive image map template
      
      Version     : 0.1d0
      
      SS Versions : 7.0, 7.1
      
      Note        : adapted from code on stackoverflow < https://bit.ly/3eIcJUB > by
                    hungerstar < https://bit.ly/3aMG6DU >
                    
      By          : Thomas Creedon < http://www.tomsWeb.consulting/ >
      
      -->
      
      <style>
      
        .image-overlay-wrap {
        
          display : inline-block; /* shrinks container to image size */
          fill : transparent;
          position : relative;
          
          }
          
        .image-overlay-wrap img { /* optional, for responsiveness */
        
          display : block;
          height : auto;
          max-width : 100%;
          
          }
          
        .image-overlay-wrap svg {
        
          left : 0;
          position : absolute;
          top : 0;
          
          }
          
        /*
        
          the following can be used for diagnostic purposes, uncomment the code and
          the target areas for the links will be shown in red
          
          */
          
        /*
        
          .image-overlay-wrap a {
          
            fill : red;
            
            }
            
          */
          
        </style>
        
      <div class="image-overlay-wrap">
      
        <img src="https://images.squarespace-cdn.com/content/v1/6301d5edd37a5f4f460fcdd2/acb9e38c-aef2-4f99-b985-fc5f71f79fa5/untitled2.png" />
        
        <svg viewBox="0 0 2500 1667">
        
          <a alt="Projects" href="/#projects" title="Projects" xlink:href="fox-chihuahua-df3j.squarespace.com/#projects">
          
            <polygon points="976,166,848,912,1798,1183,1917,437" />
            
            </a>
            
          <a alt="About" href="/about" title="About" xlink:href="fox-chihuahua-df3j.squarespace.com/about">
          
            <polygon points="2052,1157,1546,1426,1546,1477,1961,1623,2443,1360,2443,1285" />
            
            </a>
                  
          </svg>
          
        </div>

    Let us know how it goes.

  5. I don't speak for SS, I don't work for them.

    I think it's pretty clear that Developer Mode is not going to happen on v7.1. You can of course always hope and request the feature by contacting Customer Support.

    My perspective is that SS won't do it as it creates a level of support and customer dissatisfaction they are unwilling to deal with. Yes they can put all the caveats they want up front but you know what happens. A customer is handed a site that has developer mode enabled by a consultant. The consultant disappears. The customer has problems and contacts SS and is told to go away because of DM/custom code. The customer is unhappy, feels bad about SS and is frustrated that they have to find another consultant or they just give up and move onto another service.

    The other factor is probably the number of users of DM are too few to justify the investment in making the feature happen.

  6. Add the following to Store Settings > Advanced > Page Header Code Injection for the store page. Please see per-page code injection.

    <style>
    
      /* store product detail price move to right of title desktop */
      
      .ProductItem-details .product-price {
      
        order : 1;
        
        }
        
      @media screen and ( mix-width : 641px ) {
      
        .ProductItem-details:not( .ProductItem-details--mobile ) {
        
          display : grid;
          grid-template-columns : repeat( 5, 1fr );
          
          }
          
        .ProductItem-details > * {
        
          grid-column : 1 / 6;
          
          }
          
        .ProductItem-details h1.ProductItem-details-title {
        
          grid-column : 1 / 3;
          
          }
          
        .ProductItem-details .product-price {
        
          grid-column : 3 / 6;
          
          }
          
        }
        
      </style>

    This is for v7.0 using the Brine template family.

    It is not easily possible to achieve the effect you want on mobile because of the structure of the page.

    Let us know how it goes.

  7. 2 hours ago, MTD said:

    only I don't understand how to get the coordinates for the svg so that I can use your code pasted above.

    I've not gone into the details of how this is done as it can't be explained in a few easy to understand steps. You basically have to learn how HTML image maps work, learn how the SVG coordinate system works and then translate between the two. They are actually pretty compatible systems but how they each express a shape is different.

    I examined your image map and it appears that there are some issues with the shapes.

    1995677890_ScreenShot2022-09-07at8_55_33PM.thumb.png.0f7944bb62b3aab8e0de8854adfa7009.png

    The only tool I've found that works for image maps to svg based image maps is image-map.net.

    If you provide output from image-map.net I might be able to help with a conversion.

  8. 2 hours ago, Antiques_store said:

    your code worked great for one category but how would I do this across other category's

    The code can handle multiple categories. I suggest keeping the description text intact so that in the future you have a guide to how to format additional categories.

            categoryDescriptionMap : {
            
              /*
              
                the format of each line is a category and a description for the
                category
                
                for each category copy value from Store Settings >
                Categories > [category name] > Edit Category > NAME field for the
                store page. you only need exactly what can be selected from the
                field. if you want to add a description to the Store page ( i.e.
                grid/listing ) leave the category empty, i.e. ''
                
                if the description has single quotes in it then put a backslash
                before the single quotes. example: it's becomes it\'s
                
                following is an example line. copy the example line below and paste
                after the example line. remove '// ' at beginning of pasted line.
                repeat for as many categories as you want to add a description. this
                has been done once initially
                
                */
                
              // '[enter category here between single quotes]' : '[enter category description here between single quotes]',
              
              'Folk Art' : '[enter category description here between single quotes]',
              
              'Paintings' : '[enter category description here between single quotes]',
              
              }

    Let us know how it goes.

  9. 9 minutes ago, DevonHarris said:

    I'm hvaing trouble removing one section of the footer on the home page.

    Which section? Can you provide a picture?

    The usual way to hide a section on the homepage would be a selector that starts with .homepage. So you'd end up with something like the following.

    .homepage [data-section-id="62f6c16b4066023472778cdf"] {
    
      display : none;
      
      }

     

    Quote

    Also if anyone can figure out this weird footer situation that's happening in portrait ipad mode?

    The issue is probably related to overlapping min/max width values. When you are switching sections on and off the values should not overlap. The settings you have are saying at 780 px hide both sections at the same time.

    @media screen and (min-width: 780px) {
      section[data-section-id="62f2662e33a00e73740c9d72"] {
        display:none !important
      }
    }
    
    @media screen and (max-width: 780px) {
      section[data-section-id="62f1d59773499aedccb5d1c9"] {
        display:none !important
      }
    }

    Let us know how it goes.

  10. 10 hours ago, NinaNice said:

    Anyone any idea on why this is?

    It appears the code wasn't designed to deal with french formatted numbers. The original number format is 1 000,00 €. The code first removes the comma then removes .00 but as the original number didn't have a .00, nothing happens.

    I have pointed to my Store Price Change in this thread in several posts. It should be able to handle your need. Although my code is not specifically language aware it does provide fairly flexible text changing capabilities.

    The following search replace text settings should get you started.

            // search text and replacment text example line follows
            
            // '[enter search text here between single quotes]' : '[enter replacement text here between single quotes]',
            
            '/\\s*(.+)\\s*/' : '$1', // trim white space
            
            ',00 €' : ' €', // remove Deutsch and Français decimal
            
            '.00' : '',  // remove English and Nederlands decimal
            

    Let us know how it goes.

×
×
  • 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.