M
M
matveyboyko2015-10-01 16:56:43
Magento
matveyboyko, 2015-10-01 16:56:43

How to add a script to Magento?

Tell me, how to add the online consultant button code in Magento (for example)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Khodov, 2015-10-01
@matveyboyko

You can try it through "Different scripts" (Configuration -> Design -> various scripts and insert code).
I made it easier - through the script in the template in the "footer" of the main page ... The results will be the same, I think.

O
Oleg Batishchev, 2015-11-03
@z0rg

  • Directly to footer or head template (not header)
  • Via local.xml
    <?xml version="1.0"?>
    <layout>
      <default>        
        <reference name="head">
          <action method="addJs"><script>js/consultant.js</script></action>
          <action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
        </reference>
      </default> 
    </layout>

    Attention! This local.xml will add script and styles to all pages (default)
  • Or through the admin panel as indicated above.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question