An extension help me to display the delivery time as attribute in product page
(its above the price, but is´s look like... )
How to display the attribute under the " Auf die Wunschliste Auf Lager"
An extension help me to display the delivery time as attribute in product page
(its above the price, but is´s look like... )
How to display the attribute under the " Auf die Wunschliste Auf Lager"
It would really help to know which extension you are using. But let's see how we can load attributes and solve your problem without an extension.
Magento allows you to load product attributes out of the box. The code to do this is slightly different depending on the attribute type. First of all, you can load any attribute that has its option Display on Front-end
set to Yes
with the following code.
echo $_helper->productAttribute($_product, $_product->getDeliveryEstimate(), 'delivery_estimate')
Mind you; it assumes that you have the variables $_helper
and $_product
set to $this->helper('catalog/output');
respectively $_product = $this->getProduct();
at the top of your view.phtml. getColor is a magic function and refers to the attribute name camelcased.
There is one problem with the line above. It correctly displays the content of a text field, but not that of a drop down. For a dropdown it would merely display the attribute ID. In order to get the attribute's text value we do the following.
echo $_product->getAttributeText('delivery_estimate');
Now that you know how to load any value entered in the product backend we could create an attribute that serves your purpose. I assume you know how to create an attribute. Let's call is delivery_estimate
. The attribute is going to be a dropdown value. Next, assign some attribute options that match your delivery windows. E.g. "Between 4 and 5 days".
For each product, select the appropriate delivery window and load it with getAttributeText('delivery_estimate')
.
Obviously this does not allow for dynamically changing delivery windows based an ERP system or warehousing backend. You could however play around with stock levels / backorder status to display two different delivery estimates ;-).
Good luck!