gmasso Posted November 24, 2020 Share Posted November 24, 2020 Hi, I modified the size selector that is inside 'product-variants.tpl' and it worked well for a while. But now it is loading very slowly, when I select another size it takes up almost 6 seconds to change the size and I don't know why is this happening. This is my size selector code inside product-variants.tpl: <div class="product-variants"> {foreach from=$groups key=id_attribute_group item=group} {if !empty($group.attributes)} {if ($group.name == 'Size') || ($group.name == 'Tamaño')} <div style="margin-top: 0;" class="clearfix product-variants-item"> <div class="control-label size product-size-text">{if $language.iso_code == 'es'}Guía de tallas{else}Size chart{/if}</div> </div> <div class="sizes-container" style="padding-left: 20%; padding-right: 20%; padding-top: 3px; margin-right: 25%; padding-bottom: 3px; border-top: 2px solid black; border-bottom: 2px solid black;"> <div style="display: flex; justify-content: space-around;"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <input type="radio" id="{$id_attribute}" data-product-attribute="{$id_attribute_group}" name="group[{$id_attribute_group}]" value="{$id_attribute}" {if $group_attribute.selected}checked="checked"{/if} style="display: none;"> <label class="product-size {if $group_attribute.selected}product-size-selected {/if}" for="{$id_attribute}" style="margin-top: auto; margin-bottom: auto;">{$group_attribute.name}</label> {/foreach} </div> </div> {/if} {/if} {/foreach} </div> Link to comment Share on other sites More sharing options...
gmasso Posted November 25, 2020 Author Share Posted November 25, 2020 Hi, is there anyone who can help? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now