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, 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

Magento Forum

Filter product by attribute in list.phtml page
Sr. Member
Total Posts:  98
Joined:  2010-04-09

Hi, I created two attributes for a product in Magento.
The two attributes are of type date.

An attribute is called: publish_start
The other attribute is called: publish_end

Now I would like the product categories, only exhibit products within the date range of the above attributes.

Chair -> publish_start: 13/3/26 18:00
Chair -> publish_end: 04/26/13 17:59

It can not be displayed when the page ~\app\design\frontend\default\default\template\catalog\product\list.phtml run because the publication date is greater than the current date.
Mesa -> publish_start: 04/13/26 18:00
Mesa -> publish_end: 26/05/13 17:59

Would something like:

Only products with date display publish_start> = current_date and publish_end <= current_date
Currently I filter these dates within the foreach on page ~\app\design\frontend\default\default\template\catalog\product\list.phtml

But it is very slow.

How can I do this with filters? Thank you.

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