• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 08.06.21, 00:24
  • Opened by: So So
  • Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #21643 - Product availability message translation

Hello,

I can’t find where to update the product availability message.
{$product.availability_message}

Didn’t find it in the translations or modules.
Can you show me where?

Thanks

Comments

Fred 08 Jun 2021, 16:47

you can change the message here - https://take.ms/8hZ5n

So So 13 Jun 2021, 01:32

Hi Fred,
And in the case you want to deny orders?
Your example only works if you allow orders on out of stock products.
Thanks

Fred 13 Jun 2021, 10:25

Try also search in the theme translation

So So 14 Jun 2021, 00:59

Hello Fred,

If that can help others, i customized a new translation in the alysumchild folder:
\templates\catalog\_partials\product-add-to-cart.tpl

And replaced this part:
{$product.availability_message}

By this one:
{if $product.quantity == 0}
{l s=’No longer in stock’ d=’Shop.Theme.Actions’}
{/if}

Also added some tags and CSS, but that’s pretty much the gist.
Then go to the child theme translation.

Cheers!

Fred 16 Jun 2021, 22:05

Thank you for sharing the solution