Jump to content

braydentav

Member
  • Posts

    6
  • Joined

  • Last visited

braydentav's Achievements

  1. The code is showing under the nav bar even though it is hidden. .ProductItem .ProductItem-details .product-price, .ProductItem .ProductItem-details .afterpayString is the code that is showing. Any help to hide it is greatly appreciated. </style> .ProductItem .ProductItem-details .product-price, .ProductItem .ProductItem-details .afterpayString { visibility : hidden; } body.twc-spc-show .ProductItem .ProductItem-details .product-price, body.twc-spc-show .ProductItem .ProductItem-details .afterpayString { visibility : hidden; } </style> <script> ( ( ) => { // bail if no mutation observer available if ( ! ( 'MutationObserver' in window ) ) return; const initialize = ( ) => { const isDetail = twcsl.page.store.detail.is; const options = twc.x8af7a0e8; const keys = Object.keys ( options.searchReplaceText ); const changeText = ( node ) => { const walker = document.createTreeWalker ( node, NodeFilter.SHOW_TEXT ); while ( walker.nextNode ( ) ) { const node = walker.currentNode; let t = node.data; $.each ( keys, function ( i, s ) { const m = s.match ( /\/(.+)\/(.*)/ ); let r = options.searchReplaceText [ s ]; if ( m !== null ) { // m appears to be a regex pattern try { s = new RegExp ( m [ 1 ], m [ 2 ] ); } catch { return; // bail on error } if ( ! s.test ( t ) ) return true; // continue if text no match } if ( typeof r == 'function' ) { r = r ( node, isDetail, t, s ); if ( typeof r == 'boolean' ) return r; } t = t.replace ( s, r ); } ); node.data = t; } } const $productPrices = $( '.product-price' ) .each ( function ( ) { changeText ( this ); } ); const $afterpayPrices = $( '.afterpayString' ); if ( options.afterpay ) $afterpayPrices.each ( function ( ) { changeText ( this ); } ); if ( ! isDetail ) return; // bail if not detail const attribute = 'data-twc-spc-mo'; const observer = new MutationObserver ( mutations => { $.each ( mutations, function ( ) { // continue if no added nodes if ( ! this.addedNodes.length ) return true; const target = this.target; // previous change was forced if ( this.attributeName == attribute ) if ( $( target ).attr ( attribute ) == 'true' ) $( target ).attr ( attribute, 'false' ); else if ( this.oldValue == 'true' ) return true; observer.disconnect ( ); changeText ( target ); pricesObserve ( ); } ); } ); const pricesObserve = ( ) => { // listen for changes in product prices $productPrices.each ( function ( ) { observer.observe ( this, { attributeFilter : [ attribute ], attributeOldValue : true, childList : true } ); } ); // listen for changes in afterpay prices if ( options.afterpay ) $afterpayPrices.each ( function ( ) { observer.observe ( this, { attributeFilter : [ attribute ], attributeOldValue : true, childList : true, subtree : true } ); } ); }; pricesObserve ( ); $( 'body' ).addClass ( 'twc-spc-show' ); }; switch ( true ) { case twcsl.ss.is71 : $( initialize ); break; case twcsl.ss.is70 : Squarespace.onInitialize ( Y, initialize ); break; } } ) ( ); </script>
  2. Right now, I am not able to sort my orders based on product. It would be super nice not to have to go through and try and identify what product I have sold by the mini picture in the corner. Please help!
  3. I want to turn off the customer account email verification. There is plenty of information on how to do it for email campaigns/newsletter subscriptions, but nothing for customer accounts. Please help! Thank you!
  4. Navigation Bar login element goes from "account login" and then changes to "login" after page is done loading. It shifts the entire navigation bar over after loading the page. This is driving me nuts, and I would prefer and non-code solution. Any help is greatly appreciated!
×
×
  • 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.