Hello community, :shopware: im trying to figure out how to add javascript “scrollintoview()” only into Product page. looking for advice, Best regards :thumbup:
bump up
The topic is still open :x Bets regards :thumbup:
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
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) More about that script. https://developer.mozilla.org/en-US/doc … llIntoView PS. Pretty sure its jquery Best regards :thumbup:
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
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: