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

Custom price.phtml for search results
 
Afura
Jr. Member
 
Total Posts:  17
Joined:  2010-01-04
 

Hey everyone,

I have two price.html files, one for product-view and one for category/grid view. I had to make this change as the way prices are displayed is different for both views. In addition, the product-view price.html includes an function that calculates the discount in percentage (%).

Example category view: http://www.afura.nl/shop.html
Example product-view: http://www.afura.nl/welcome-hat.html

I achieved this by making a change in catalog.xml, adding the following lines to the category/view block:

block type=\"catalog/product_list\" name=\"product_list\" template=\"catalog/product/list.phtml\">
                <
action method=\"addPriceBlockType\"><type>simple</type><block>catalog/product_price</block><template>catalog/product/list_price.phtml</template></action>
                <
action method=\"addPriceBlockType\"><type>grouped</type><block>catalog/product_price</block><template>catalog/product/list_price.phtml</template></action>
                <
action method=\"addPriceBlockType\"><type>configurable</type><block>catalog/product_price</block><template>catalog/product/list_price.phtml</template></action>

My problem is that it still uses the OLD price.html (the one intended for product view) for the SEARCH results. But I need it to grab the list_price.phtml file instead. I have been searching and working with the layout xml files just like I did before but I can not get it to work, I guess somewhere it grabs price.phtml as default which I need to override. Anyone has an idea how I can get t his to work?

Kind regards,

Victor

 
Magento Community Magento Community
Magento Community
Magento Community
 
cloudquarry
Guru
 
Avatar
Total Posts:  528
Joined:  2008-11-19
 

Have you made the appropriate changes in catalogsearch.xml and refreshed layout file cache?

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