cancel
Showing results for 
Search instead for 
Did you mean: 

How to display custom product attribute in product list?

SOLVED

How to display custom product attribute in product list?

Hi All,

 

I am trying to display a custom attribute which works on the products page (view.phtml) but won't show up on the listing page (list.phtml) and I was hoping somone may have been able to resolve this or a similar issue previously.  The code I am using is below:

 

<?php echo $_product->getData('stock_due_date') ?>

 

The field is text (rather than date) and I am running v1.9 with the most recent security patches applied.

 

Any help will be greatly appreciated, thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to display custom product attribute in product list?

Hi ethantram,

If you set the attribute to be available in product listing via

 

Admin > Catalog > Attributes > Manage Attributes > find your Stock Due Date attribute

 

Then change Used in Product Listing to Yes.

 

Then do a full re-index and the attribute should now be available within your product list templates.

 

Hope this helps

Problem solved? Click Accept as Solution!
Magento Certified Developer Plus | www.iwebsolutions.co.uk | Magento Small Business Partner

View solution in original post

4 REPLIES 4

Re: How to display custom product attribute in product list?

Hi ethantram,

If you set the attribute to be available in product listing via

 

Admin > Catalog > Attributes > Manage Attributes > find your Stock Due Date attribute

 

Then change Used in Product Listing to Yes.

 

Then do a full re-index and the attribute should now be available within your product list templates.

 

Hope this helps

Problem solved? Click Accept as Solution!
Magento Certified Developer Plus | www.iwebsolutions.co.uk | Magento Small Business Partner

Re: How to display custom product attribute in product list?

Hi 

 

 

 

Re: How to display custom product attribute in product list?

Hello,

 

Where do you input that code below?

<?php echo $_product->getData('stock_due_date') ?>

 

I am trying to find a solution to show stock due date on a product fron page.

 

Thank you.

Re: How to display custom product attribute in product list?

.