Hi All,
I have a feedback module i would like to install but i am not very good with Zencart and when it asks me to add some code to the <head> and the <body> tags i don't know where i should put it.
Thanks,
Asher
Hi All,
I have a feedback module i would like to install but i am not very good with Zencart and when it asks me to add some code to the <head> and the <body> tags i don't know where i should put it.
Thanks,
Asher
What kind of code?
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
The header needs some javascript and the body some html/css
Put the javascript inside an appropriately-named file in the prescribed folder, according to this FAQ article, and Zen Cart will automatically load the code for you. No need to touch template files.
http://www.zen-cart.com/wiki/index.p...s_-_Javascript
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
what about the body?
anyone know?
What page are you wanting to put it on?
What's the code you're supposed to put in the body?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I need to put the following code into the <head> section of the home page:
This was a request from a company I'm using to do Google Analytics work for me. I didn't know how to convert this into a .js file. If someone can convert this to a form that can be used in a .js file, I can take care of it. But if not, is there a way to add this to the <head> section of the home page?Code:<script type="text/javascript"> __compete_code = 'dcafd398df98a9f097d0384b52d77295'; (function () { var s = document.createElement('script'), e = document.getElementsByTagName('script')[0]; s.src = (document.location.protocol.toLowerCase() === 'https:' ? 'https:' : 'http:') + '//c.compete.com/bootstrap/dcafd398df98a9f097d0384b52d77295/bootstrap.js'; s.type = 'text/javascript'; s.async = true; if (e) { e.parentNode.insertBefore(s, e); } }()); </script>
Thanks.
One quick way to do it would be to dump all that code into a new file and upload it to your site as: /includes/modules/pages/index/jscript_compete-com.php
If it truly needs to *only* appear on the home page, put these two lines in the file first, and then add your code between these two lines:Code:<?php if ($this_is_home_page) {?> put your code here <?php } ?>
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks, Dr Byte. I don't think it will hurt to have that code be available on other pages as well, but I don't know how to convert my code so that it can reside in a *.js file. I can't just copy it as is, can I? Or is it OK just as it is? I think I would at least take out the <script> tags, right?
Sorry, I'm not too savvy with java script.
Bookmarks