Changing sold out tag

asafari
New Member
7 0 0

Hi!

I want to show a simple line of text that gives an indication for delivery times for my products.

I have already made a new product-template and used the code from the existing product-template but my experience only goes as far as HTML and CSS so I am not quite sure what I am looking for in the code.

I want to activate the 'sold-out' label when the product is in stock, then change the 'sold-out' text to for example 'delivery: 2-3 days' and then I want to edit the color and border of the label.

 

Could anyone point me in the right direction?

Thanks

Replies 11 (11)
Zworthkey
Shopify Partner
2535 301 634

Hii, @asafari 
Kindly share your store URL so,
I can solve it perfectly.
Thank You.

If helpful, please Like and Accept Solution.
if you Want to modify or Customize your theme ,
Hire us | Whatsapp. and we also help you to guide how to reach to your potential customers to increase brand presence, engagements and sales for your business or Want to know more. Read our Shopify Blogs.Email us: sales@zworthkey.com
LitCommerce
Trailblazer
257 61 67

Hi @asafari,

What theme are you using? Please send me the theme name.

Or send me the code of product-template.

I will check it.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
asafari
New Member
7 0 0
Hi,

I’m using the Supply theme
LitCommerce
Trailblazer
257 61 67

Hi @asafari,

Please go to product file, find 'products.product.add_to_cart' and change code: https://i.imgur.com/hMBuOwd.png 

<span id="addToCartText-{{ section.id }}">{{ 'products.product.add_to_cart' | t }}</span>

=>

<span id="addToCartText">delivery: 2-3 days</span>

Hope it helps!

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
asafari
New Member
7 0 0

Hi,

 

I'm so sorry, I am using Debut not Supply.

 

My bad!

LitCommerce
Trailblazer
257 61 67

Hi @asafari,

- Please go to product file, find 'products.product.add_to_cart' and change code: https://i.imgur.com/BMM2x6Z.png => https://i.imgur.com/PIdUqvu.png 

Code: 

<span data-add-to-cart-text="true">
  delivery: 2-3 days
</span>

- Go to assets/theme.js file, find '_updateAddToCart: function()' and add code: https://i.imgur.com/bhrnwGV.png 

Code:

if(this.addToCartText.dataset.addToCartText == 'true'){
  this._enableAddToCart('delivery: 2-3 days');
  return;
}

Hope it is clear to you.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!
Frank47
New Member
6 0 0

Kindly share me your store URL for help

asafari
New Member
7 0 0

beauforthardware.nl

LitCommerce
Trailblazer
257 61 67

Hi @asafari,

Have you tried following my instructions? I have tested it on my demo and it works fine.

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!