We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Speeding up load times on this code

How Do I?

Jos Medinger's avatar
Jos Medinger
16 posts
10 years ago
Jos Medinger's avatar Jos Medinger

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}
       
emsolutions's avatar
emsolutions
2 posts
10 years ago
emsolutions's avatar emsolutions

Hello,

Perhaps ce_cache could be useful for you… check it out!

http://www.causingeffect.com/software/expressionengine/ce-cache
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.