clamor Posted January 22, 2014 Share Posted January 22, 2014 Hi I am not sure if this is the right forum to ask this question. I would like to place Adsense ads in the sidebar of the shopping cart. Is there a mod developed (compatible with CC5) that would allow me to do this? Alternatively, is there a mod developed that will enable HTML in the sidebar? I have read on the forum about coding that allows images to be put in the sidebar but I do not have the technical skills to do this. For the time being, I have activated Adsense on the right hand side of my landing page, which is separate to CC. I have also placed Adsense at the bottom of a few of my document pages. I am a bit concerned that the Adsense script may conflict with Smarty but so far it seems to be okay. I will test the checkout over the next couple of days just to be sure there are no issues. I don't expect to make a fortune from Adsense but I am hoping it will help to increase traffic and raise my ranking in Google and other search engines. Thanks for any advice you can offer. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 22, 2014 Share Posted January 22, 2014 Hi! If you have basic HTML skills you can add the HTML code to the skins/mican/templates/main.php file. Don't be worried by the PHP file type. It can be treated like a regular HTML file. Quote Link to comment Share on other sites More sharing options...
clamor Posted January 23, 2014 Author Share Posted January 23, 2014 Thanks, I'll back up the file and give it a try. Feeling a little perplexed about how to put the Adsense code into the sidebar but I will check the earlier post I mentioned above. I managed to set this up on my landing page and a WordPress blog so if I can view the source code for those it might help. I will log back on in a few days and update on my progress. Quote Link to comment Share on other sites More sharing options...
clamor Posted January 31, 2014 Author Share Posted January 31, 2014 Hi again I tried to edit the main.php file to include the Adsense code in the right sidebar as follows but it did not work. The content text simply dropped down lower in the page and the ad did not appear at all. Can anyone see what I am doing wrong? <div class="sidebar" id="sidebar_right"> {if isset($POPULAR_PRODUCTS)}{$POPULAR_PRODUCTS}{/if} {$RANDOM_PROD} </div> <div> {literal} <script type="text/javascript"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> plus the rest of the adsense code </script> {/literal} </div> <div id="page_content"> Thanks for any advice. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 31, 2014 Share Posted January 31, 2014 Allow me to suggest putting the new code between these two lines: {$RANDOM_PROD} </div> Quote Link to comment Share on other sites More sharing options...
clamor Posted January 31, 2014 Author Share Posted January 31, 2014 Hi I tried that. The page content did not drop down but the ad did not appear either. Cleared cache and checked on other computers but no luck. I also tried removing the literal tags but that just caused the content to drop down again and still no ad. Quote Link to comment Share on other sites More sharing options...
clamor Posted January 31, 2014 Author Share Posted January 31, 2014 Hi Tried again and you were right about the positioning of the script. There was an additional problem caused by <script type="text/javascript"> before the script - I removed this, kept the literal tags and then it worked! Thank you so much again for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.