U365U365 MemberComments: 67 Received thanks: 2 Member since: November 2015 edited December 2015
Hello community, :shopware:

im trying to figure out how to add javascript "scrollintoview()" only into Product page.

looking for advice,

Best regards :thumbup: ;)

Comments

  • U365U365 MemberComments: 67 Received thanks: 2 Member since: November 2015
    bump up
  • U365U365 MemberComments: 67 Received thanks: 2 Member since: November 2015
    The topic is still open :x

    Bets regards :thumbup:
  • EikeBrandtWarnekeEikeBrandtWarneke AdministratorsComments: 3032 Received thanks: 694 Member since: June 2013
    Im afraid nobody knows what you actually want to do. What exactly is scrollintoview()?! Is this your own custom javascript method?! Is it a jquery plugin?

    Kind regards
  • U365U365 MemberComments: 67 Received thanks: 2 Member since: November 2015
    Oh that could be one of the possibilities.

    Ok so i want to add javascript only into Product view page, so when someones get rediricted to product page the script would scroll the page view exactly at the point i want, for example skipping the header and going direkt to page-wrapper. :)

    the idea came because i use little big header, so costumers need to scroll first to view product (and i find it little frustrating) :D

    More about that script.
    https://developer.mozilla.org/en-US/doc ... llIntoView

    PS. Pretty sure its jquery

    Best regards :thumbup:
  • ShopwareianerShopwareianer MemberComments: 3624 Received thanks: 646 Member since: November 2013
    yeah its a DOM Method - But you have this in your own js script correct?

    So you would add this js to the index.tpl in your detail view e.g frontend/detail/index.tpl
    {extends file="parent:frontend/detail/index.tpl}
    {block name="frontend_index_header_javascript_jquery_lib" append}
    YOUR JS
    {/block}
    
    You may also use smarty literal function for your js: http://www.smarty.net/docsv2/en/languag ... iteral.tpl
    Thanked by 1U365
  • U365U365 MemberComments: 67 Received thanks: 2 Member since: November 2015
    Ye, i was looking for the folder where i needed to attach the script.
    So its details :oops:


    Thank you sir :thumbup:

    Problem solved, Best regards :thumbup:
Sign In or Register to comment.