Fpalarea Posted April 11, 2016 Share Posted April 11, 2016 I have add "More details" button but when I click it, doesn't work. It doesn't make scroll or anything. Could you help me? Thanks. Link to comment Share on other sites More sharing options...
endriu107 Posted April 11, 2016 Share Posted April 11, 2016 How you add this button? Did you put correct anchore? Link to comment Share on other sites More sharing options...
Fpalarea Posted April 11, 2016 Author Share Posted April 11, 2016 How you add this button? Did you put correct anchore? I have put it, delete display: none in Css and I have 2 files product.js and product.tpl that use it. Code product.js //catch the click on the "more infos" button at the top of the page $(document).on('click', '#short_description_block .button', function(e){ $('#more_info_tab_more_info').click(); $.scrollTo( '#more_info_tabs', 1200 ); }); and product.tpl code {if $product->description_short || $packItems|@count > 0} <div id="short_description_block"> {if $product->description_short} <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div> {/if} {if $product->description} <p class="buttons_bottom_block"> <a href="javascript:{ldelim}{rdelim}" class="button"> {l s='More details'} </a> </p> {/if} Link to comment Share on other sites More sharing options...
endriu107 Posted April 11, 2016 Share Posted April 11, 2016 Try change js to: $(document).ready(function (){ $("#moredetail").click(function (){ $('html, body').animate({ scrollTop: $("#short_description_block").offset().top }, 2000); }); }); and tpl to: {if $product->description_short || $packItems|@count > 0} <div id="short_description_block"> {if $product->description_short} <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div> {/if} {if $product->description} <p class="buttons_bottom_block"> <a href="javascript:{ldelim}{rdelim}" class="button" id="moredetail"> {l s='More details'} </a> </p> {/if} Link to comment Share on other sites More sharing options...
Fpalarea Posted April 11, 2016 Author Share Posted April 11, 2016 Try change js to: $(document).ready(function (){ $("#moredetail").click(function (){ $('html, body').animate({ scrollTop: $("#short_description_block").offset().top }, 2000); }); }); and tpl to: {if $product->description_short || $packItems|@count > 0} <div id="short_description_block"> {if $product->description_short} <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div> {/if} {if $product->description} <p class="buttons_bottom_block"> <a href="javascript:{ldelim}{rdelim}" class="button" id="moredetail"> {l s='More details'} </a> </p> {/if} Yeah, It's ok when I visit Item's page (http://goo.gl/rm1cXv) BUT doesn't work when I visit simply item view in the frontpage! : http://goo.gl/Sd8D4h Link to comment Share on other sites More sharing options...
endriu107 Posted April 11, 2016 Share Posted April 11, 2016 (edited) That is becouse popup didn't display full description, so hide button or show full description i poup view. Edited April 11, 2016 by endriu107 (see edit history) Link to comment Share on other sites More sharing options...
Fpalarea Posted April 11, 2016 Author Share Posted April 11, 2016 (edited) Well, I have desactived simply view! So, now it's working. Thanks! SOLVED! Thanks a lot! Edited April 11, 2016 by Fpalarea (see edit history) 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