0

In Magento (v1.9.3.1) I want to replace 'Out of Stock' to 'Sorry sold out' Which file I need to edit please? I want a solution that is not lost after migration.

3
  • change in Mage_Catalog.csv file of your store language folder in locale folder Commented Apr 11, 2017 at 8:12
  • Sorry this didn't work /app/locale/en_US. Line 468 / 469 changed to 'Sold Out'. Flush Magento Cache. Logged out & login.
    – LitM
    Commented Aug 16, 2017 at 5:18
  • SOLVED: I updated these files /app/design/frontend/mytheme/mychildtheme/template/catalog/product Files: list.phtml & view.phtml
    – LitM
    Commented Aug 16, 2017 at 8:13

5 Answers 5

1

If you did not change template setting, you should look for it in app/design/frontend/base/default/template folder. There are some places that you need to change:

  1. Product view: in catalog/product/view/type/default.phtml
  2. Product list: catalog/product/list.phtml
    You should also find different places for different types of products as well.

Or I think you can change by editing CSV translation file (app/locale/en_US/Mage_Catalog.csv).

1

The easiest solution which makes it possible to do things well and allowing to not modify the phtml file is to change the translation file app/locale/language_ISO/Mage_Catalog.csvIn the line about 465 "Out of Stock","Sorry sold out"

EDIT: If you haven't modified the phtml, check please if you have this piece of code:

<?php echo $this->helper('catalog')->__('Out of stock') ?>

4
  • Sorry what is the advantage of this over solution below? I don't want it to be overwritten after an upgrade.
    – LitM
    Commented Apr 11, 2017 at 8:24
  • Excuse me but I have given you the best way to do it, there is no other way I think, as for your changes you have to save the file that you modified then you make a merge. If you plan to modify the phtml it will be even worse and I advise against it. The translation functions are made for this.
    – PЯINCƎ
    Commented Apr 11, 2017 at 8:37
  • Thanks but I have this directory app/locale/en_US/Mage_Catalog.csv + it doesn't work. I have cleared cache as well.
    – LitM
    Commented Apr 11, 2017 at 9:23
  • Where you want to display this "Sorry sold out" in catalog/product/view/view.phtml right ? it should work and you should have <?php echo $this->helper('catalog')->__('Out of stock') ?> in the phtml If you have not modified it
    – PЯINCƎ
    Commented Apr 11, 2017 at 10:01
1

app/design/frontend/YOURTHEME/default/template/catalog/product/view/type/default.phtml

<?php if ($_product->isAvailable()): ?>
        <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Places Available') ?></span></p>
    <?php else: ?>
        <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('All Booked - Please Contact Us') ?></span></p>
    <?php endif; ?>
0

As you are saying you want to migrate then you can use database(inline) translation because database translation will migrate to migento2

so here is the example how you can translate the word in.

http://inchoo.net/magento/inline-translation-in-magento/

please check above tutorial will teach you how to use database(inline) translation.

-1

Thank you all for pointing me in right direction. After some trial I solved it by updating below files.

/app/design/frontend/mytheme/mychildtheme/template/catalog/product
Files: list.phtml & view.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.