Memory exhausted with custom product view

Hello,



Thanks in advance for any help you could offer me on this issue:



In the store I’m working with, I’ve created a block that renders all of the stores items, which are about 100 items or so. The objective is to have a single-page listing, with options, pricing and checkout buttons.



I’ve successfully modified the file in customer/blocks/list_templates/product_list.tpl so that it displays options, quantity pricing, etc., but now am encountering memory issues on since migrating servers.



I realize that this operation could be memory intensive, but exhausting over 128MB seems like something else is wrong.



I’ve narrowed down the section that causes the memory issue to the prices area, lines 85-144: [url=“{if $products}{script src="js/exceptions.js"}{if !$no_pagination} {inc - Pastebin.com”]http://pastebin.com/wvXere9B[/url] – when I remove them, I’m able to render the page just fine.



Does anyone know how I can avoid this memory issue? Is it do to the nested foreach loops in this template in conjunction with the large data set? I’m finding difficulty in debugging where exactly this leak is occurring and appreciate any guidance.



Thanks

I had this problem too, a result of trying to show too many products. Try showing fewer products to see if the solves the memory issue.

This is not an option for my project, unfortunately.

Turns out this issue of mine does not occur when using PHP 5.3 instead of PHP 5.2