0

I have Magento 1.9 with Fortis II theme. I need to change the "Availability: In stock" text to "Availability: Available. Will be shipped in 3 working days" and the relevant translations. I have found and changed accordingly all references of these phrase in Mage_Catalog.csv and in translate.csv which should be applied after the core settings, but nothing happened. Searching fo an answer in the forums I found a relevant topic with an answer about core_translation database table. I have searched this table but no reference found. So, ho am I going to set the availability text as needed? Further more, there are products that are available in stock, other products with an aailabity of 3 working days, other on 10 and other are available on order. How ca I set all those availability statuses?

Thank you

1

6 Answers 6

4
  • Go to frontend/YOUR_PACKAGE/YOUR_THEME/template/catalog/product/view/type/availability/default.phtml

  • Change Availability: In stock text to Availability: Available. Will be shipped in 3 working days

  • For translation, you can use Inline Translation


1
  • Thank you. It works (I've tested it although I had to discover that the IP I should enter was the router's IP). Then, all translations for this text must be done through inline translation because nothing else works. The core_translation table has priority over CSVs. Right? Feb 19, 2015 at 12:47
0
  1. Create an attribute in the name "availablity" in your magento admin panel. Create it as a dropdown.

  2. Set appropriate values for the products and call them in single product view page.

2
  • Thank you but this method requires to edit this attribute for each one product individually and change it manually when needed. Right? And where in the product page will appear? With the additional information? Because it has to function as the original "availability". Feb 19, 2015 at 13:01
  • Yes, This requires some phtml edits. You have to add the following code in your view.phtml. $_product = Mage::registry('current_product'); $_product = Mage::getModel('catalog/product')->load($_product->getId()); echo $_product->getAvailability();
    – Sundar
    Feb 20, 2015 at 13:13
0
  1. Go to /app/locale/xx_xx where xx_xx is the language folder for which the translation is needed e.g. El_Gr for Greek.
  2. Find the Mage_catalogue.csv file and edit it with calc of office.org or a simple text editor. You may need to download it first with FTP and then again upload the edited file (Filezilla is fine for the job). Or if your provider has the ability to edit via text editor online you don't need to download it (Plesk has this ability)
  3. Find the record(s) "in stock", and change the translation to whatever you like
  4. Refresh cashes
0

Yes, This requires some phtml edits. You have to add the following code in your view.phtml.

$_product = Mage::registry('current_product');
$_product = Mage::getModel('catalog/product')->load($_product->getId()); 
echo $_product->getAvailability(); 

This code will work. Get back to me..

0

full path:

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

in my case, if have following:

<?php if ($this->displayProductStockStatus()): ?>
    <?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; ?>
<?php endif; ?>
0

Magento does not support multiple custom stock statuses out of the box. You can modify app/design/frontend/[YOUR_PACKAGE]/[YOUR_THEME]/template/catalog/product/view/type/default.phtml and replace the text for 'In stock' and 'Out of stock' to obtain 2 custom variations. If you don't have that file in your theme, it will revert to use app/design/frontend/base/default/template/catalog/product/view/type/default.phtml, so you will need to copy it to the same folder in your theme by creating it.

If you need more, you need to modify the file above by replacing the conditional statements:

<?php if ($_product->isAvailable()): ?>
    <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
<?php else: ?>
    <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>

Add a custom attribute and set the value for each product. Then output the value for the custom attribute in place of the stock status code above like:

<?php echo $_product->getAttributeText('[SOME_ATTRIBUTE_ALIAS]') ?>

Alternatively, you could use this popular extension which does the work for you: Custom Stock Status

Your Answer

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

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