The following code is causing a 8-9 second page load delay on our site and I’m trying to whittle this down however I’m not sure which conditionals to try to change in order to best affect the load times
I’ve tried using the ifelse addon from Devot:ee however it doesn’t seem to be helping at all (where I’veplaced it!)
There are about 80 categories and the code below picks out 4 of them. The channel that the products are pulled from has about 1000 entries
{exp:channel:categories channel="products" style="linear"}
{exp:ifelse parse="inward"}
{if hp-featured == "Yes"} <!-- select categories to show -->
<h2 class="hpH2"><a href="http://{path=products/l/c/{category_url_title}}">Best Selling {category_name}</a></h2>
{exp:low_reorder:entries set="product_order" category="{category_id}" dynamic="no" disable="member_data|pagination|primary_category|categories|category_fields|misc_content|news|homepage_adverts|about" limit="3" url_title="{embed:the_url_title}" }
<style type="text/css">
#MI{product_code} {position:absolute; z-index:2; visibility:hidden; width:215px; margin-top:195px; background:url(/images/bg-list-moreinfo.png); padding:3px 5px; text-align:center; font-weight:normal; font-size:11px;}
</style>
<div class="productSingle" >
<div id="MI{product_code}"><a href="http://{url_title_path=%27products/detail%27}" title="{title} Prices and Ordering">more info »</a></div>
<a href="http://{url_title_path=products/detail}">{product_image:thumbnail}</a> <a href="http://{url_title_path=products/detail}">{title}</a>
<!-- shows the price of the item depending on how many quantity breaks are listed -->
{if '{bulk_discounts:total_rows}' == 5}
{bulk_discounts}
{if field_row_count == 5}from {if saleprice}£{saleprice}<s> £{price}</s>{if:else}£{price}{/if} per item{/if}
{/bulk_discounts}
{/if}
{if '{bulk_discounts:total_rows}' == 4}
{bulk_discounts}
{if field_row_count == 4}from {if saleprice}£{saleprice}<s> £{price}</s>{if:else}£{price}{/if} per item{/if}
{/bulk_discounts}
{/if}
{if '{bulk_discounts:total_rows}' == 3}
{bulk_discounts}
{if field_row_count == 3}from {if saleprice}£{saleprice}<s> £{price}</s>{if:else}£{price}{/if} per item{/if}
{/bulk_discounts}
{/if}
<!-- end of product price display-->
</div>
{/exp:low_reorder:entries}
{/if}
{/exp:ifelse}
{/exp:channel:categories}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.