How do you change the picture and link for the Block Advertising?
How do you also add more than one with different settings?
Thanks
How do you also add more than one with different settings?
Thanks
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.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
And is it possible to have several (different) advertisements? So basically is it possible to duplicate the advertisement module?
Thanks a lot in advance!
Thanks a lot in advance!
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:
to:
and:
to:
You can do the same with number 3, for example, if you need three advertising modules.
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.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
Rocky, I had been struggling with this for hours. Your solution worked like a charm. Thank you very much!
From 1265201690:
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:
to:
and:
to:
You can do the same with number 3, for example, if you need three advertising modules.
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?
It works fine for me. I'll attach the updated module.
Attached Files
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
From 1267953469:
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?
Thanks
Regards,
Eileen
Sorry, my mistake. I've updated the above archive.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
Yes, but only the simple ones that don't rely on modified core code. The advertising block is one much module.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
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 BO
Regards.
I would also rename:
$this->displayName = $this->l('Block advertising');
to:
$this->displayName = $this->l('Block advertising2');
So you can distinguish them in the BO
Regards.
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)
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)
Attached Files
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.
Check out Nethercott Constructions for PrestaShop guides and modules. Like us on Facebook for news updates.
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!
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!
Attached Files
Sorry, everyone! I have solved my problem now! It was just something stupid that I have done.
The way rocky provided works perfect! Cheers!
The way rocky provided works perfect! Cheers!
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?
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.
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.



Back to top










