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.
Loading attributes on the Front-end
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');
Using magento attributes to display a 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!
Suppose package:Learning and module: Custom
Module.xml looks like
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Learning_Custom" setup_version="2.0.0">
<sequence>
<module name="Magento_Catalog"/>
</sequence>
</module>
</config>
And then create a layout xml following path -> app/code/Learning/Custom/view/frontend/layout/catalog_product_prices.xml
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/layout_generic.xsd">
<referenceBlock name="render.product.prices">
<arguments>
<argument name="default" xsi:type="array">
<item name="prices" xsi:type="array">
<item name="tier_price" xsi:type="array">
<item name="render_template" xsi:type="string">Learning_Custom::product/price/tier_prices.phtml
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</layout>
Create template inside your module or copy base template file inside your module path should be ->
app/code/Learning/Custom/view/frontend/templates/product/price/tier_prices.phtml
Best Answer
You have to give
referenceContainer"product.info.main"
instead of product.info.details