Jump to content

Code to remove button

Recommended Posts

Posted

Hello,I'm looking for someone who could write me a code to remove those 2 buttons "qty" and "add to cart" only on certains pages of an online shop ?thank yoooouu !

capture-decran-2019-07-18-a-125837.jpg.1dec987db5bd38a4122e2aa48964151d.jpg

  • Replies 22
  • Views 1.6k
  • Created
  • Last Reply
Posted

@Omesnage Can you share site url or template name?

or try CSS ( Home > Design > Custom CSS)

First, you need to find Page ID. See how to: https://beaverhero.com/squarespace-how-to/#HowtoFindPageID

Then, use


/* Remove Quantity */
body#collection-56099b55e4b0ec7b8a89d273 .product-quantity-input {
       display: none !important;
   }
/* Remove Add to Cart */
body#collection-56099b55e4b0ec7b8a89d273 .sqs-add-to-cart-button-wrapper {
       display: none !important;
   }




Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Hey tuanphan, thank you for your answer. It works, but all over the site. I want it only on certains pages... If I copy the code on the page I want, it doesn't work any more.Can u help ? Thank you so much

Posted

Hey tuanphan, thank you for your answer. It works, but all over the site. I want it only on certains pages... If I copy the code on the page I want, it doesn't work any more.Can u help ? Thank you so much

Posted

@Omesnage Each page will have different Page ID.You need to find Page ID. See how to: https://beaverhero.com/squarespace-how-to/#HowtoFindPageID

Then, use


 /* Remove Quantity */
body#collection-56099b55e4b0ec7b8a89d273 .product-quantity-input {
        display: none !important;
    }
 /* Remove Add to Cart */
body#collection-56099b55e4b0ec7b8a89d273 .sqs-add-to-cart-button-wrapper {
        display: none !important;
    }




Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

@Omesnage Each page will have different Page ID.You need to find Page ID. See how to: https://beaverhero.com/squarespace-how-to/#HowtoFindPageID

Then, use


 /* Remove Quantity */
body#collection-56099b55e4b0ec7b8a89d273 .product-quantity-input {
        display: none !important;
    }
 /* Remove Add to Cart */
body#collection-56099b55e4b0ec7b8a89d273 .sqs-add-to-cart-button-wrapper {
        display: none !important;
    }




Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

and for many pages


/* Remove Quantity */
 body#collection-56099b55e4b0ec7b8a89d273 .product-quantity-input, body#collection-56099b55e4b0sdfsd233453445 .product-quantity-input {
         display: none !important;
     }
  /* Remove Add to Cart */
 body#collection-56099b55e4b0ec7b8a89d273 .sqs-add-to-cart-button-wrapper, body#collection-56099b55e4b0sdfsd233453445 .sqs-add-to-cart-button-wrapper {
         display: none !important;
     }




Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 1 month later...
Posted

Hi Tuanphan,Hope you're going fine...I have a clone of a product page and I don't want the the products of this clone to appear when you use the search bar, do you think it's possible ?If not ok, I'd like to hide the price button, on certain page, like the code you gave me for the "qty" and "add to basket".Many thanksOlivier

Posted

@Omesnage (1) I think you need to use custom code (but it is complicated, out of my ability).

(2) To hide price, you should share url to check, or try this code (Add to Home > Design > Custom CSS).


body#collection-56099b55e4b0ec7b8a89d273 #productList .product-price {
   display: none !important;
}

Replace body#....273 with Product Page/Page ID. Each page will have different ID: https://beaverhero.com/squarespace-how-to/#HowtoFindPageID

(3) You should tag me when you have a new question. It seems that SS only sends email notifications, if someone tags me.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

My dear Tuanphan, I have another question...In the payement's step, I'd like to change the word "paiement" by "commander"Do you think it's possible ? It's the step before accessing to the paiement area.I join a screenshot of it.Many many thanks !

capture-decran-2019-09-17-a-210030.png.3ee772da4d7adba61e43fcec7dcad506.png

Posted

@Omesnage Yes. You can with custom code.

is it "check out text"? You can this code first, if it doesn't work, please share url to check.


.checkout-button span {
   visibility: hidden;
}
.checkout-button span:after {
   visibility: visible;
   content: "New Checkout Text";
   margin-left: -80px;
}

Reference: https://beaverhero.com/indigo-template-squarespace/#TranslateCheckOut

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

@Omesnage Yes. You can with custom code.

is it "check out text"? You can this code first, if it doesn't work, please share url to check.


.checkout-button span {
   visibility: hidden;
}
.checkout-button span:after {
   visibility: visible;
   content: "New Checkout Text";
   margin-left: -80px;
}

Reference: https://beaverhero.com/indigo-template-squarespace/#TranslateCheckOut

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Archived

This topic is now archived and is closed to further replies.

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