Jump to content

Advertising blocks?


Recommended Posts

This ad block is very basic.
You can change the image module/blockadvertising/advertising.jpg for this block there is no media manager and no ad zone manager...
This will change all banners to this image.
To add more banners you need to copy the module, rename it everywhere, install it and place it to another position.

  • Like 1

Share this post


Link to post
Share on other sites
In /modules/blockadvertising/blockadvertising.php

Change:

$smarty->assign('image', './modules/'.$this->name.'/advertising.jpg');



no i mean, the picture is now linked to prestashop.com How do i change that?

Share this post


Link to post
Share on other sites
  • 1 year later...

The advertising block has been updated in PrestaShop v1.3, so the advice in this thread is no longer relevant. In PrestaShop v1.3, you can go to Modules > Block advertising v0.1 (in the Blocks section) > Configure to change the image and link. To remove the advertising block from a position, go to Modules > Positions and click the X next to the module's name under the "Left column blocks" or "Right column blocks" section, depending on which column you want to remove it from.

The module still only allows you to have one ad though. To put more than one ad, you'll need to copy the module and give it a different name. For example, copy and paste the blockadvertising directory to blockadvertising2, then rename blockadvertising.php to blockadvertising2.php, change "class BlockAdvertising" on line 3 to "class BlockAdvertising2", change line 11 from:

$this->name = 'blockadvertising';



to:

$this->name = 'blockadvertising2';



and change line 17 from:

$this->displayName = $this->l('Block advertising');



to:

$this->displayName = $this->l('Block advertising 2');



You can do this again with different numbers (like 3 instead of 2) if you need more ads.

EDIT: If you are using PrestaShop v1.3.1, you will also need to replace 'BLOCKADVERT_LINK' in modules/blockadvertising2/blockadvertising2.php with 'BLOCKADVERT2_LINK'.

  • Like 2

Share this post


Link to post
Share on other sites
  • 1 month later...

When I change the line as descibed above and log into BO and check modules they dont load (see pic)

when i delete the module thats been renamed they (modules) load fine ??

Thanks,

Andy

27218_277ExbQ7Y0VqfJSvYpz9_t

Share this post


Link to post
Share on other sites

You must have made a mistake when renaming the files. Edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' to get an error message instead of a blank tab, which should help you identify the problem.

Share this post


Link to post
Share on other sites
You must have made a mistake when renaming the files. Edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' to get an error message instead of a blank tab, which should help you identify the problem.


Thanks




example;
The modules were added to replicate;

regards


Thanks

Share this post


Link to post
Share on other sites
  • 1 month later...

Go to Modules > Positions and click the X button next to advertising block in the "Left column blocks" or "Right column blocks" sections, depending on which column you want to delete the adveritising block from.

Share this post


Link to post
Share on other sites
Go to Modules > Positions and click the X button next to advertising block in the "Left column blocks" or "Right column blocks" sections, depending on which column you want to delete the adveritising block from.


Beautiful! Thank you very much. I'm so excited about my new store design!!!

Thanks!!!!!

Share this post


Link to post
Share on other sites
  • 1 month later...
  • 3 weeks later...
  • 2 months later...
  • 1 month later...
  • 3 weeks later...
  • 3 months later...
  • 1 year later...
  • 2 weeks later...
  • 1 year later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More