Jump to content

Module to display random internal adverts/callouts


Paul C
 Share

Recommended Posts

Just updated my site with another nice Module for PrestaShop. On-Page promotion of your own products, categories and static pages allow you to guide your visitors shopping experience....

Random Adverts and Callouts displayed on your pages

This one includes an admin panel to configure your set of adverts/creatives and their associated links for display, and is slightly more complicated to install, although I've added the table creation code to the associated module install routine, which (if it works correctly!) should simplify things slightly. There's a readme.html contained in the archive.

Have fun with it,

Paul

Share this post


Link to post
Share on other sites

Hey Paul do i upload the files inside the directories to the appropriate folders for example inside your admin is tabs do i upload tabs into the admin or the entire admin? issue is it automaticaly wants to overwrite my current admin folder so thought i would ask before jumping LOL Been playing with my site so anxious i dont break it :)

Share this post


Link to post
Share on other sites

Yes you need to copy the files from the archive into the correct folder on your site. You can just upload each file instead of the whole lot if you prefer. I placed them in the correct directories to make it a bit easier!

Using your example you just need to upload the file AdminAdverts.php from the admin/tabs folder in the archive to you /tabs folder on your site. Same with the others, although uploading the whole lot shouldn't harm what's there already... all the files are new.

Once it's installed it won't do anyhting, of course, until you add some links & images from the Adverts admin panel. I would suggest using the two sample ones I've included in the media folder, just to test it out.

Paul

Share this post


Link to post
Share on other sites

There's two elements to the install. Well three if you count the database table additions, but they should be done by the module install routine.

If the Admin tab doesn't show then I suspect that the file from the installation is perhaps in the wrong place. The file AdminAdverts.php (which is in admin/tabs in the archive) needs to go in the administration tabs directory on your server. You 'll have renamed the actual "admin" folder to something else of course as this is required for the backend security, so make sure you locate your own admin section and place the file in the tabs folder.

The new Admin Tab has to be included in the menu system somewhere, This is done using the Tools-->Tabs option in the Back Office as per the diagram in the readme.html file.

At this point if you go to the Adverts Tab you'll just get a Bad SQL error, as the database tables haven't been created yet.

Once you've installed the module from the modules directory (it should be listed under "Advertising") the tables should be created, and returning to the Adverts tab in the Back Office should present you with an empty table, and the option to Add an item.

Add one, entering all the data:

Link: e.g. Http://www.ecartservice.net
Description: A link to ecartservice.net
Logo: [upload a suitable image to display for the above link]

Once all these steps are complete it should display the image you've uploaded on your front page. Once you have several links in the table, you should configure the adverts Module to display them at random.

Paul

You may also need to check that the /img/a directory has been created and is writable!

Share this post


Link to post
Share on other sites

  • 1 month later...

Hello,

This looks like a wonderful module, I have install it. All the files are in the right folders. but I have a problem :
there is no way to complete (Add new) since the only two boxes I get are Link and Description. Could it be the fact that I am running with version 0.9.7.2 ?

image : http://www.bleumarmelade.com/img/advert_error.jpg

Thank for any help / Merci pour toute aide !

Share this post


Link to post
Share on other sites

  • 3 weeks later...
  • 1 month later...

I've missed these posts obviously.

The answer to the placeholder question is that the file is required so that ftp creates a directory (which is used to store the images). If the directory in the archive was empty then FTP won't create it, which causes problems. The missing tab icon is down to the way the admin tabs work, and you need to upload an image for it - there's one in the /img/admin directory called adverts.gif which you can use for this purpose - the files are named depending on the record number of the tab, which could be anything depending on how may additional tabs you've added which is why it isn't done by default.

In answer to the question on different images per category, the answer is no, not currently. The images and links are displayed entirely at random throughout all the store pages.

Share this post


Link to post
Share on other sites

  • 3 weeks later...

A little change in 1.1 removed that functionality!

A quick fix is to edit AdminAdverts.php in the your-admin/tabs directory and make sure lines 20-26 are:

public function __construct()
   {
        $this->table = 'advert';
        $this->className = 'Advert';
        $this->view = false;
        $this->edit = true;
       $this->delete = true;



Paul

Share this post


Link to post
Share on other sites

  • 5 months later...
  • 1 month later...

The module uses the standard PrestaShop class to upload the images, so it's the same issue as that with the product images. I need to revisit this again anyway after the flurry of upgrades to the PrestaShop main version, so maybe the next time I'll do it slightly differently.

Paul

Share this post


Link to post
Share on other sites

  • 6 months later...

I installed everything, and the adverts shows under Home. I enter the link, description, and add pic without any problem. When i click save, an error comes up as the attached pic shows. Any help would be appreciated:)

20168_R657MVeIQCmm2pF6B8p6_t

Share this post


Link to post
Share on other sites

  • 2 months later...

Thanks for your module, it is great! But if i don't want random my advert that i want show all my advert when i am selec no random in my backoffice. Please, tell me how to do it?


Thasnk Paul!

Share this post


Link to post
Share on other sites

  • 1 month later...

Thanks for your module, it is great! But if i don’t want random my advert that i want show all my advert when i am selec no random in my backoffice. Please, tell me how to do it?

Thasnk Paul!

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

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