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

Adding a custom field
 
StainesUK
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2007-10-26
Surrey
 

I have been playing around trying to work out how to add a “usually dispatched within .....” field and think I have worked it out can the community / megento team have a look and make sure I’m not making a mess of it. (I’m a noob at this kind of thing & PHP)
I created an attribute called usually_dispached and set visible on front end to no so it won’t show up as additional information in the product info. Then in the view.phtml file I added

<small class="product-Dis"><?=$_product->getusually_dispatched()?></small>

Under the call product
<h3 class="product-name"><?=$_product->getName()?></h3>

As far as I can see all is well, but am I re-inventing the wheel badly??

Advice would be welcome…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

The standard way is: <?=$_product->getUsuallyDispatched()?>

 
Magento Community Magento Community
Magento Community
Magento Community
 
StainesUK
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2007-10-26
Surrey
 

Cool thanks for your help

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