Jump to content

[resolve]Combination images change with heavy lags


Recommended Posts

I found that when I click an combination at a dropdown list at any product page, the product images change with an obvious lag. At each click, the previous image flash and the right image does not show up until after 2-3 seconds.

 

My show domain is www.lingsmoment.com

 

Can anyone have a look at my site.

 

Thanks very much.

Edited by miskey (see edit history)
Link to comment
Share on other sites

The cause of the lag is too much going on within drop-down change event, in a non-optimised way.

 

Find /themes/prestashop/product.tpl. Locate line:

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};">

 

Change to:

 

<select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();">

 

Caveat: You will lose 'Display all pictures' which appears when a specific combination is selected (attached). Your call which one you want to live with.

 

Note to developers:

onchange="javascript...? This is not 1985. What happened to $('...').bind('change'...? And there is a spurious semi-colon at the end of that line.

post-103572-0-80631100-1341056571_thumb.png

Edited by phrasespot (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...