Description:
- Replace “Price” with text “Request Price”
- Replace “Add to Cart” with “Custom Button” (it will open email)
- Do this for products belong specific category
Ideal
- Assign a tag “request price” for these products
- Use CSS code to replace price with custom text: Request Price
- Edit these products > Edit Additional Info > Use Button Block with link to email. Use JavaScript code to replace Add to Cart button with Button Block.
#1. First, you need to assign a tag with name: request price to these products
#2. Next, edit Additional Info
#3. Add a Button Block
#4. Enter button text + click Attach Link
#5. Click Email, then enter your email, subject, body text. Since we will insert a Button Block for each product, you can change different subject and body text for each product.
#6. Use this code to Custom CSS box to replace Price with Custom Text.
/* custom price text */ .tag-request-price .product-price { font-size: 0 !important; } .tag-request-price .product-price:before { content: "Request Price"; font-size: 20px !important; font-family: monospace; }
We will have.
#7. Use this code to Code Injection > Footer to replace Add to Cart with Button Block.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('section.ProductItem-additional .button-block').appendTo('div.sqs-add-to-cart-button-wrapper'); }); </script> <style> .tag-request-price .sqs-add-to-cart-button-wrapper .sqs-add-to-cart-button { display: none !important; } </style>