Paradox Posted February 2, 2010 Share Posted February 2, 2010 How do you change the picture and link for the Block Advertising?How do you also add more than one with different settings?Thanks Link to comment Share on other sites More sharing options...
rocky Posted February 3, 2010 Share Posted February 3, 2010 In Prestashop v1.3, you can go to Modules > Blocks section > Block advertising v0.1 > Configure and then select an image and change the URL. In Prestashop v1.2.5 and earlier, you must manually modify modules/blockadvertising/blockadvertising.tpl to change the URL and overwrite modules/blockadvertising/advertising.jpg to change the image. Link to comment Share on other sites More sharing options...
annunakiwww Posted February 3, 2010 Share Posted February 3, 2010 And is it possible to have several (different) advertisements? So basically is it possible to duplicate the advertisement module?Thanks a lot in advance! 1 Link to comment Share on other sites More sharing options...
rocky Posted February 3, 2010 Share Posted February 3, 2010 Unfortunately, simply transplanting the advertising module in multiple locations will just display the same ad, not different ads. You'll need to copy the blockadvertising module and change the folder name to blockadvertising2 and blockadvertising.php to blockadvertising2.php and in that file, change: class BlockAdvertising extends Module to: class BlockAdvertising2 extends Module and: $this->name = 'blockadvertising'; to: $this->name = 'blockadvertising2'; You can do the same with number 3, for example, if you need three advertising modules. 1 Link to comment Share on other sites More sharing options...
annunakiwww Posted February 3, 2010 Share Posted February 3, 2010 Rocky, I had been struggling with this for hours. Your solution worked like a charm. Thank you very much! Link to comment Share on other sites More sharing options...
eileensiow Posted March 7, 2010 Share Posted March 7, 2010 Unfortunately, simply transplanting the advertising module in multiple locations will just display the same ad, not different ads. You'll need to copy the blockadvertising module and change the folder name to blockadvertising2 and blockadvertising.php to blockadvertising2.php and in that file, change: class BlockAdvertising extends Module to: class BlockAdvertising2 extends Module and: $this->name = 'blockadvertising'; to: $this->name = 'blockadvertising2'; You can do the same with number 3, for example, if you need three advertising modules. I tried to follow the process above but there were no new advertising block appear. Am i missing something? Link to comment Share on other sites More sharing options...
rocky Posted March 7, 2010 Share Posted March 7, 2010 It works fine for me. I'll attach the updated module. blockadvertising2.zip Link to comment Share on other sites More sharing options...
eileensiow Posted March 8, 2010 Share Posted March 8, 2010 It works fine for me. I'll attach the updated module. The module you updated,i uploaded the blockadvertising2 folder and it appeared:"No template found" in my online shop.What could be wrong?ThanksRegards,Eileen Link to comment Share on other sites More sharing options...
rocky Posted March 8, 2010 Share Posted March 8, 2010 Sorry, my mistake. I've updated the above archive. Link to comment Share on other sites More sharing options...
matt123 Posted March 11, 2010 Share Posted March 11, 2010 I had been struggling with this for hours Thanks for the solution Link to comment Share on other sites More sharing options...
keiichi Posted March 31, 2010 Share Posted March 31, 2010 Is it posible to use modules from SP 1.3.1 beta in 1.2.5 like Block advertising v0.1? Link to comment Share on other sites More sharing options...
rocky Posted March 31, 2010 Share Posted March 31, 2010 Yes, but only the simple ones that don't rely on modified core code. The advertising block is one much module. Link to comment Share on other sites More sharing options...
pasko Posted June 2, 2010 Share Posted June 2, 2010 Thank you rocky!I would also rename:$this->displayName = $this->l('Block advertising');to:$this->displayName = $this->l('Block advertising2');So you can distinguish them in the BORegards. Link to comment Share on other sites More sharing options...
Emieliooo Posted July 9, 2010 Share Posted July 9, 2010 Hi folks, I followed the workaround and now I have four different folders:blockadvertising, blockadvertising2, blockadvertising3, blockadvertising4 so far so good. All four ads have different pictures but the links are all the same. I cant find a reason why all four ads link to the same site. What am i doing wrong? Can anyone help me. If you need more info, just tell me.Thanks in advance.I included blockadvertising"1" and blockadvertising3 (zip folders) blockadvertising3.zip blockadvertising.zip Link to comment Share on other sites More sharing options...
rocky Posted July 10, 2010 Share Posted July 10, 2010 The problem is that you forgot to change the BLOCKADVERT_LINK setting to BLOCKADVERT3_LINK so that they are writing to different database keys. At the moment, both the modules are sharing the same database key and overwriting each other's values. Link to comment Share on other sites More sharing options...
Emieliooo Posted July 10, 2010 Share Posted July 10, 2010 Thanks, why haven't I thought about that. It's so obvious. It works fine now, thanks thanks thanks! Link to comment Share on other sites More sharing options...
SandyW Posted August 5, 2010 Share Posted August 5, 2010 Hi,I have followed the workaround and made blockadvertising02.php. I got the new module kinda working and have it show an image. But same as eileensiow, blockadvertising02 is linked to the same website as the original blockadvertising module, even after I have changed the BLOCKADVERT_LINK setting to BLOCKADVERT02_LINK as rocky instructed. And I checked both of the files which eileensiow and rocky shared, they are quite a bit different from mine, even though mine states as version =0.1 as well.I have attached my file here. Would someone please give me some hint here. Thanks much! blockadvertising02.php Link to comment Share on other sites More sharing options...
SandyW Posted August 5, 2010 Share Posted August 5, 2010 Sorry, everyone! I have solved my problem now! It was just something stupid that I have done.The way rocky provided works perfect! Cheers! Link to comment Share on other sites More sharing options...
webmc Posted August 14, 2010 Share Posted August 14, 2010 Before I found this topic I had already cloned this module. It works perfectly on my local host but doesnt show up in the admin section or front page on live site. I also tried downloading this module off this thread and trying it - the same thing happened. Does anyone know what the problem can be? Link to comment Share on other sites More sharing options...
SandyW Posted August 15, 2010 Share Posted August 15, 2010 Hi webmc,Have you put the cloned module - blockadvertising02 - in your module file? If you do, you should be able to find it in the module page of your admin section. Link to comment Share on other sites More sharing options...
webmc Posted August 16, 2010 Share Posted August 16, 2010 hi SandyW,funnily enough i had actually tried that! I just installed this insead. SotEW's Adds v0.4Displays advertising filesand added this in the tpl:{if $page_name == 'index'}because i only want to show it on the index page.....It would be good if there was a module you could upload adds to for each individual category at the time of creating it.....(the site is ragamuffyns.co.uk - not finished) Link to comment Share on other sites More sharing options...
Tintarella Posted October 20, 2010 Share Posted October 20, 2010 Note that some anti-ad browser plugins automatically hides stuff called "advertising" and similar. Link to comment Share on other sites More sharing options...
juanv Posted June 23, 2011 Share Posted June 23, 2011 HiCan anyone help me please, iam running prestashop ver 1.4.2.5 using Block advertising v0.2 by PrestaShop, i have tried some of the other zip files but with no success! Can someone please share a Block advertising.zip file, Thank you Link to comment Share on other sites More sharing options...
smb Posted April 13, 2012 Share Posted April 13, 2012 Sorry, everyone! I have solved my problem now! It was just something stupid that I have done. The way rocky provided works perfect! Cheers! Just curious, what was it that you did? I'm having the same problem. I've changed the occurrences of BLOCKADVERT_LINK in the new php, however they still all go to the same link Link to comment Share on other sites More sharing options...
aytacg26 Posted July 23, 2012 Share Posted July 23, 2012 Dear Rocky; I would like to ask about how to add multiple links to advertisement blocks. In my website (www.mgsmarket.com), I have 5 ads banners and also I have 3 language options. For current structure of ads blocks, for any language option, when user clicks to a ads block, she/he is forwarded to the link on ads and hence, if she/he uses let's say Turkish language and link is forwarded to English, she/he will open an English page from ads and then she/he will need to change language again and again. Is there any code, which we can use for ads blocks to give them multiple links? In Turkish, it will open Turkish Link, in English it will open English link and in Greek it will open greek link when user click on ads block pictures. If there is any possibility, or way to do this please lead us. Looking forward to hearing from you soon Link to comment Share on other sites More sharing options...
sweet2nds Posted July 31, 2012 Share Posted July 31, 2012 Hi Rocky, I saw your how-to about adding more than one advertising block. I even downloaded the folder you provided. However, I seen the added module on the back end, but it gives me a black screen for my home page with the error... "Fatal error: Call to undefined method BlockAdvertising2::hookrightColumn() (it gives the directory name) on line 198 Any suggestions you may have will help. I am using version 1.4. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now