Jump to content

liamgv

Circle Member
  • Posts

    2
  • Joined

  • Last visited

Posts posted by liamgv

  1. On 8/30/2022 at 12:14 PM, paul2009 said:

    Hello 👋

    Squarespace started rolling out a 'Price Formatting' update on 23 August 2022 and this broke all existing custom code to modify prices on both Squarespace 7.0 and 7.1.

    If you're referring to my guide How to make some prices POA on Squarespace 7.1 then please take another look today. I've updated it in response to the 'Price Formatting' update 🙂

    I also tried using the code (with the cost of 321,000.00) and unfortunately the price was still showing and not as POA.

    This is the old code we used to use up until a couple of days ago, it changed the price to POA and hid the add to cart button:

    <script type='text/javascript'>
    //Where products have 321,000.00 price, change to POA
    window.onload=function(){
        var elements = document.querySelectorAll('.product-price .sqs-money-native');
            Array.prototype.forEach.call(elements, function (price) {
                  if (price.textContent === '321,000.00') {
                    price.parentNode.textContent = 'POA';
                  for (let el of document.querySelectorAll('.sqs-add-to-cart-button-wrapper')) el.style.display = 'none';
                   }
        });
    }
    </script>

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