Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Giving more details on availability ? 
 
Otaugames
Sr. Member
 
Total Posts:  101
Joined:  2007-10-07
Troyes, France
 

Hello,

With the version 1.0 Magento only show this two indications for availability : “Availability: in stock” or “Availability: out of stock”. It’s a bit limited in my opinion. Most of the time when a customer want to buy something he also want to know in how many days the order will be shipped.

I had the idea of creating an attribute that I will call “Availability informations” which contains for example, “In stock, ships in 24 to 48 hours”, “In stock, ships in 3 to 5 days”, and “Contact us to ask for the delivery times”, but then how to show this attribute on the page of the product ?

Putting this information in the bottom informations table with all the other attributes do not really have sense, it should be visible at the top of the page, near the price. That’s why I asked whether anyone knows the code to be used to display an attribute separately ?

Thank you,
Loïc.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Otaugames
Sr. Member
 
Total Posts:  101
Joined:  2007-10-07
Troyes, France
 

Any idea how to do this ? I’m surprised to see that no one else is looking to give more availability details to the customers gulp

 
Magento Community Magento Community
Magento Community
Magento Community
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

In the catalog > product > view > type > simple.php, line #46 and #48

<p><small><?php echo $this->__('Availability: In stock.') ?></small></p>
<?php else: ?>
<p><small><?php echo $this->__('Availability: Out of stock.') ?></small></p>

Change the “‘Availability: In stock” and “Availability: Out of stock” to your wordings.

If you like, you can also add a new line:

<p><small><?php echo $this->__('Availability: In stock.') ?></small></p>
<p><small><?php echo $this->__('shipping info for example.') ?></small></p>

If you have Configurable and Grouped products, then you need to make changes in another two phtml files too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Otaugames
Sr. Member
 
Total Posts:  101
Joined:  2007-10-07
Troyes, France
 

Thank you for your reply chinesedream.

But this is not really what I want to do. Here I will only replace the original text or add a text for the delivery times. The problem is that it will be the same text on each product page. What I want to do is to be able to set a different delivery time for each products, that’s why I thought using attributes would be the easiest way to do it. The only thing stoping me is that I don’t know the code to use to show this attribute below the price and stock informations.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chiaraweb
Guru
 
Avatar
Total Posts:  721
Joined:  2008-03-21
Aviano ~ Italy
 

The code is this

<table cellspacing="0" class="data-table" id="product-attribute-specs-table">
            
<?php foreach ($_additional as $_data): ?>
            
<tr>
                <
td class="label"><?php echo $_data['label'] ?></td>
                <
td class="data"><?php echo $_data['value'] ?></td>

maybe anyone can help you to put the name of the attribute, I’m not able sorry

why you don’t put the delivery time in short description? and put the short description under the name of product?

this

<div class="short-description"><?php echo nl2br($_product->getShortDescription()) ?></div>

under

<h3 class="product-name"><?php echo $this->htmlEscape($_product->getName()) ?></h3>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Otaugames
Sr. Member
 
Total Posts:  101
Joined:  2007-10-07
Troyes, France
 

Thank you chiaraweb for your answer. If I can’t manage to show the attribute where I want on my product page I will add my informations in the short description but it won’t be the most efficient solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ukdazza
Guru
 
Total Posts:  308
Joined:  2008-04-16
 

How did you get on Otaugames? We want to add our own comments too. Very interested in what you did and how it turned out.

**I have managed to add the “Dispatched Within 24 Hours” for all in stock products...thanks guys!

NOW...I am looking to re arrange the order of things on the product page...what file and where do I need to edit to re arrange the order of the description/short description etc etc

 
Magento Community Magento Community
Magento Community
Magento Community
 
Otaugames
Sr. Member
 
Total Posts:  101
Joined:  2007-10-07
Troyes, France
 

I have totally forget this topic. Now that I’m a bit more familiar with Magento I have managed to do what I was looking for. Here is how I did it :

1. I’ve created an attribute named “detailled_availibilty” where I’ve had all the differents availability details I need.

2. I’ve modified the templates in the folder “template/catalog/product/view/type/” by adding this line where I want the availability to be displayed : <?php echo $_product->getAttributeText('detailled_availibilty')?>

That’s the way I did it and it works fine for me.

If you want to re arrange the display of desc, short desc, price, image, ..., you need to edit the file view.phtml in “template/catalog/product/”. You will see that this file is calling some other one that you may need to edit to achieved the wanted result. You should activate the path hints in your admin to know the files to edit.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top