Jump to content

Recommended Posts

Hello,

when I want to setup module I have this error: Do you know whats wrong please?

 

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/user00830/havita.cz/www/modules/blockadvertmulti/blockadvertmulti_bo.tpl" on line 14 "{include file="./blockadvertmulti_cfg.tpl" }" - Unexpected " }", expected one of: "}" , " "' in /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:431 Stack trace: #0 /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_templateparser.php(2855): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_templateparser.php(2920): Smarty_Internal_Templateparser->yy_syntax_error(10, ' }') #2 /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(51): Smarty_Internal_Templateparser->doParse(10, ' }') #3 /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(82): Smarty_Internal_SmartyTemplateCompiler->doCompile( in /home/user00830/havita.cz/www/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 431

Share this post


Link to post
Share on other sites

Hi all!!! And TY felibv for the module!

I have a problem, when I want to configure the module i get a blank page. (same for 0.10.1 and 0.10.0 no with the old 0.9.1).

Prestashop version is 1.4.8.2, italian language, dir with 777 attribs.

 

Please help me...i love this module!

Share this post


Link to post
Share on other sites

Hi all,

 

I was having the same issue reported by havita, which i resolved by myself. There is an extra space before the closing '}'. removing the extra space will resolve the error. How ever i'm facing another error. It gives me following error:

 

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file './blockadvertmulti_cfg.tpl'' in D:\VertrigoServ\www\prestashop147\tools\smarty\sysplugins\smarty_internal_template.php on line 163

 

I'm installing this on Windows system so there could not be any issue of permissions.

 

Any help would by appreciated.

Share this post


Link to post
Share on other sites

Hi all,

 

I was having the same issue reported by havita, which i resolved by myself. There is an extra space before the closing '}'. removing the extra space will resolve the error. How ever i'm facing another error. It gives me following error:

 

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file './blockadvertmulti_cfg.tpl'' in D:\VertrigoServ\www\prestashop147\tools\smarty\sysplugins\smarty_internal_template.php on line 163

 

I'm installing this on Windows system so there could not be any issue of permissions.

 

Any help would by appreciated.

 

Salil et PEPPE83

 

You can get ride off this error by changing in blockadvertmulti_bo.tpl lines 14 and more this way:

{include file="../modules/blockadvertmulti/blockadvertmulti_cfg.tpl"}

instead of {include file="./blockadvertmulti_cfg.tpl"}

 

Same thing in blockadvertmulti_cfg.tpl on line 13

;)

Share this post


Link to post
Share on other sites

Salil et PEPPE83

 

You can get ride off this error by changing in blockadvertmulti_bo.tpl lines 14 and more this way:

{include file="../modules/blockadvertmulti/blockadvertmulti_cfg.tpl"}

instead of {include file="./blockadvertmulti_cfg.tpl"}

 

Same thing in blockadvertmulti_cfg.tpl on line 13

;)

 

TY but my problem is not solved....when i click on "configure" on the module i get a blank page....i think is a language problem... :(

how i enable a debug mode?

Edited by PEPPE83

Share this post


Link to post
Share on other sites

Hi all,

Now available for download the new module for Prestashop "blockadvertmulti v0.10" that incorporates improvements over my previous module "bannermanager v0.9.1".

Blockadvertmulti development will continue to improve with the help of the community.

 

Excellent module, thank you very much for this! :)

Share this post


Link to post
Share on other sites

HI Felibv,

 

First of all great module that save made my whole day googling worth. :rolleyes:

 

Just One thing to confirm haven't you resize the images while uploading them?

 

For the quick work i have modify following css rules in "blockadvertmulti.css "

 

 

p.advmulti img {

display:block;

max-width: 150px;

margin-bottom: 10px;

max-height: 100px;

}

 

 

Also i am getting this error

 

 

"[PrestaShop] Fatal error in module 421fa0b23be53bb582c6491dbdb9ce27dc8a22a1.file.blockadvertmulti_cfg.tpl:

Trying to get property of non-object"

 

FYI I am using prestashop1.5.3.1

Share this post


Link to post
Share on other sites

This module is great, the only problem is that i get this error:

Warning: Function addCSS() is deprecated in /home/xxxx/xxxx/xxxx/public_html/modules/blockadvertmulti/blockadvertmulti.php on line 260

in /home/xxxx/xxxx/xxxx/public_html/classes/Tools.php on line 1777

 

How do i solve this?

Edited by DrankenWebshop

Share this post


Link to post
Share on other sites

Hi felibv, Love the Module!! It works great. Is it possible to post ads side by side instead of

beneath each other in de homebanner?

Share this post


Link to post
Share on other sites

@peppe83

 

try to this patch: unzip and change the original

 

-blockadvertmulti_cfg

-blockadvertmulti_bo

 

in the module folder, with this in attachment

 

Ciroco05

 

GRAZIE Ora funziona correttamente!

TY Now it work!

 

Please write your modification for future update!

Share this post


Link to post
Share on other sites

Hi i have Presta Shop 1.5.3.1

 

and i got following error:

 

Warning: Function addCSS() is deprecated inC:\webserver\htdocs\www\pinocchio\amriswil\modules\blockadvertmulti\blockadvertmulti.php on line 260

in C:\webserver\htdocs\www\pinocchio\amriswil\classes\Tools.php on line 1777

 

can anyone help me ?

Thx

Share this post


Link to post
Share on other sites

Hi i have Presta Shop 1.5.3.1

 

and i got following error:

 

Warning: Function addCSS() is deprecated inC:\webserver\htdocs\www\pinocchio\amriswil\modules\blockadvertmulti\blockadvertmulti.php on line 260

in C:\webserver\htdocs\www\pinocchio\amriswil\classes\Tools.php on line 1777

 

can anyone help me ?

Thx

 

I have the same problem, I think it is because it is designed for 1.4... The next update will include PS 1.5 compatibility. Altough, I can't find anymore where I read that...

Share this post


Link to post
Share on other sites

ok bad :-( is there another free module to display a banner as jpg for 1.5 ?

Edited by Noise

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for making this free :).

 

I just updated to prestashop 1.5.4 ( Newest version)... And I'm having this error every time I try to add in a new banner. Can anyone direct me how to fix this?

 

Thank You

 

Error Message, when adding a new banner:

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this great module.

I have a problem with displaying the block (see img), because it is floating when height of the page is smaller than height of the sidebar. Could you pls help me?

screenshot.jpg

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for making this free :).

 

I just updated to prestashop 1.5.4 ( Newest version)... And I'm having this error every time I try to add in a new banner. Can anyone direct me how to fix this?

 

Thank You

 

Error Message, when adding a new banner:

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

 

I have the same problem:

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

 

What can be done?

Thanks!

Share this post


Link to post
Share on other sites

Awesome Module! It was works fine in 1.4 now I have same problem like guys above:

 

[PrestaShop] Fatal error in module bannermanager:
Call to undefined function checkImage()

Share this post


Link to post
Share on other sites

Hello,

 

Same problem here on 1.5.4 :

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

 

Anyone knows if it works with 1.5.1 ?

 

Thank you.

Share this post


Link to post
Share on other sites

matros

 

 

Hi,

 

thanks for this great module.

I have a problem with displaying the block (see img), because it is floating when height of the page is smaller than height of the sidebar. Could you pls help me?

screenshot.jpg

 

Having the exact same problem here, I'm sure there is a simple fix to this. Can anyone shed some light?

Share this post


Link to post
Share on other sites

Regarding the problem with 1.5.4 :

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

 

I solved it by editing php file blockadvertmulti.php

 

Find and replace the word:

 

CheckImage

 

with:

 

ImageManager::validateUpload

 

 

 

It worked for me.

Share this post


Link to post
Share on other sites

I solved it by editing php file blockadvertmulti.php

 

Find and replace the word:

 

CheckImage

 

with:

 

ImageManager::validateUpload

 

It worked for me.

 

For me also ! Thank you so much for this trick !

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this great module.

I have a problem with displaying the block (see img), because it is floating when height of the page is smaller than height of the sidebar. Could you pls help me?

screenshot.jpg

 

Čauko,

 

skús to čo ja :

 

-najdi si priečinok "/modules/blockadvertmulti/css/"

-otvor si blockadvertmulti.css

-prepíš kód následovne:

 

div.blockadvmulti {
height: auto;
float:left;
padding-bottom: 400px;
}

 

... mne pomohle tak snad aj tebe ;-)

 

ENGLISH

 

rewrite code in blockadvertmulti.css to this:

 

div.blockadvmulti {
height: auto;
float:left;
padding-bottom: 400px;
}

Share this post


Link to post
Share on other sites

Hi,

 

Thanks to felibv for this great module :) and thanks to dzpssq for the solution :

 

editing php file blockadvertmulti.php,
find and replace the word: checkImage
with: ImageManager::validateUpload

 

, it work very fine ^_^

 

Best regards,

Philippe

Edited by Graphileom

Share this post


Link to post
Share on other sites

Thanks for this great module!

 

I wondering if it is possible to add a custom .tpl file for the left column hook? I tried below code but it didn't work. Any suggestions?

 

From:

function hookLeftColumn($params)
{
   return $this->_processHook( $params, 2);
}

 

To:

function hookLeftColumn($params)
{
   return $this->_processHook( $params, 2);
   return $this->display( dirname(__FILE__), 'blockadvertmultileft.tpl');
}

Edited by piqsel

Share this post


Link to post
Share on other sites
That's beacuse the first return is stoping your line. comment or remove the _proccessHook to get your line to work.

 

Thank you for trying to help me!

 

I tried commenting out the the first return but it's not working. If you look at the original code below, I also tried to commenting out line "return $this->display( dirname(__FILE__), 'blockadvertmulti.tpl');" but thats not working either. Any suggestions? :)

 

function hookLeftColumn($params)
{
return $this->_processHook( $params, 2);
}

function _processHook( $params, $hook ) {
 global $cookie, $smarty;
 if ($this->countBanners($hook)) {
  $smarty->assign(array( 'hook' => $hook
	 , 'banners' => $this->getBanners($hook, false)
	 , 'img_path' => $this->img_wpath
  ));
  return $this->display( dirname(__FILE__), 'blockadvertmulti.tpl');
 } else return '';
}

Share this post


Link to post
Share on other sites

function hookLeftColumn($params)
{
return $this->_processHookLeft( $params, 2);
}

function _processHookLeft( $params, $hook ) {
 global $cookie, $smarty;
 if ($this->countBanners($hook)) {
  $smarty->assign(array( 'hook' => $hook
			 , 'banners' => $this->getBanners($hook, false)
			 , 'img_path' => $this->img_wpath
  ));
  return $this->display( dirname(__FILE__), 'blockadvertmulti_left.tpl');
 } else return '';
}

 

something like this then?

Edited by PhpMadman

Share this post


Link to post
Share on other sites

something like this then?

 

Sorry, that didn't work either, no images are showing. Could it be because of the other hooks? If you look at the code you see that every hook is using blockadvertmulti.tpl, but I would like to use a custom template for example the left and top hook. Maybe it's not possible?

 

function hookTop($params)
{
return $this->_processHook( $params, 1);
}

function hookLeftColumn($params)
{
return $this->_processHook( $params, 2);
}

function hookRightColumn($params)
{
return $this->_processHook( $params, 3);
}

function hookHome($params)
{
return $this->_processHook( $params, 4);
}

function hookFooter($params)
{
return $this->_processHook( $params, 5);
}

function _processHook( $params, $hook ) {
global $cookie, $smarty;
if ($this->countBanners($hook)) {
 $smarty->assign(array( 'hook' => $hook
  , 'banners' => $this->getBanners($hook, false)
  , 'img_path' => $this->img_wpath
));
return $this->display( dirname(__FILE__), 'blockadvertmulti.tpl');
} else return '';
}

Edited by piqsel

Share this post


Link to post
Share on other sites

I asume you have images on the left column. And you said no image was showing.

That makes me asume that it is working, but you ddidn't create the file needed.

Did you make a copy of blockadvertmulti.tpl called blockadvertmulti_left.tpl?

Share this post


Link to post
Share on other sites

I asume you have images on the left column. And you said no image was showing.

That makes me asume that it is working, but you ddidn't create the file needed.

Did you make a copy of blockadvertmulti.tpl called blockadvertmulti_left.tpl?

 

Yes, I did make a copy of the original blockadvertmulti.tpl and renamed it blockadvertmulti_left.tpl, I also reinstalled the module. Guess I'm doing something wrong somewhere, can't figure out what though.

Share this post


Link to post
Share on other sites

Regarding the problem with 1.5.4 :

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkImage()

 

I solved it by editing php file blockadvertmulti.php

 

Find and replace the word:

 

CheckImage

 

with:

 

ImageManager::validateUpload

 

 

 

It worked for me.

 

worked for me, thanks for the tip. It should really be updated with that by now. Such a simple change. Make it easier when we need to upgrade our prestashop's :P

Edited by closeupman

Share this post


Link to post
Share on other sites

Hi all,

Now available for download the new module for Prestashop "blockadvertmulti v0.10" that incorporates improvements over my previous module "bannermanager v0.9.1".

Blockadvertmulti development will continue to improve with the help of the community.

 

Changelog for Blockadvertmulti v0.10:

Added Features:
[+] BO/FO: Images in Top position
[+] BO/FO: Images in Footer position
[+] FO: One image rotator per position
Improved/changed features:
[*] BO: Treating load JS / CSS
[*] BO: Properly use the DB methods
Fixed bugs:
[-] BO: Changing the name of the module to prevent the action of adBlock

 

Regards

 

blockadvertmulti_v0_10_1.zip - zip installation fix

well cool, just what i was looking for (both thumbs up)

Share this post


Link to post
Share on other sites

Hi.

 

I made a v0.10.2

Here is the changelog. I used google translate for the other languages.

Added Features:
[+] BO: Option to update image
[+] Core/FO: Banner sections are now in their own file, allowing for different css on top/left/right/home/footer
Improved/changed features:
[*] FO: If banner link is empty, no link is created for banner
Fixed bugs:
[-] Core: Fixed CheckImage bug, now compatibility with both 1.5.3 and 1.5.4

 

*UPDATE*

Now fix really works in 1.5.4. Tested on 1.5.4.1 development version.

*UPDATE 2*

Removed some debug data

blockadvertmulti_0.10.2_fix2.zip

Edited by PhpMadman

Share this post


Link to post
Share on other sites

I use Prestashop 1.5.3 and 1.5.4

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkimage()

 

how to fix this bug?

Share this post


Link to post
Share on other sites

Tnks for re-attached file

I install it but when i add banner it shows me ERROR with file format (cannot idetrify banner format), but uploaded file was .png, another file i tested with .ipg

Share this post


Link to post
Share on other sites

Okey. Then you get Prestashops 'Image format not recognized, allowed formats are: .gif, .jpg, .png' error.

Is it on all your images? Or is it one one specific image?

And can you attach an image or two, so I can see if I can find out what is wrong.

And does this error affect both 1.5.3 and 1.5.4, or is it just one of them?

Share this post


Link to post
Share on other sites

now i test this module on presta 1.5.3

I test different images, with different sizes and allowed formats.

I made additional advertising block and upload image in it - image uploaded correctly (the same image as i try to upload in multiple one )

 

http://askori.pp.ua/ (on the right side)

Share this post


Link to post
Share on other sites

Hi.

 

I made a v0.10.2

Here is the changelog. I used google translate for the other languages.

Added Features:
[+] BO: Option to update image
[+] Core/FO: Banner sections are now in there own file, allowing for diffrent css on top/left/right/home/footer
Improved/changed features:
[*] FO: If banner link is empty, no link is created for banner
Fixed bugs:
[-] Core: Fixed CheckImage bug, now compatibility with both 1.5.3 and 1.5.4

 

*UPDATE*

Now fix really works in 1.5.4. Tested on 1.5.4.1 development version.

Thanks for the update and a great module! (should be integrated w/ prestashop 1.6 :P)

 

just one thing:

[+] Core/FO: Banner sections are now in there own file, allowing for diffrent css on top/left/right/home/footer

 

Should read:

[+] Core/FO: Banner sections are now in their own file, allowing for different css on top/left/right/home/footer

 

:D

Edited by closeupman

Share this post


Link to post
Share on other sites

He! Totally missed that. But I'm to lazy to make yet another upload ;p

 

*EDIT*

ugh... It's just not my week.

Changelog fixed, and removed some debug data from yesterday,

Edited by PhpMadman

Share this post


Link to post
Share on other sites

there is error in prestasop 1.5.4.1 with Block advertising multiple v0.10.2. It's look the same like in nastystyle post:

 

[PrestaShop] Fatal error in module blockadvertmulti:

Call to undefined function checkimage()

 

any idea to fix it? thanks for answers :)

Share this post


Link to post
Share on other sites

I used the lastes version of Your great plugin :) and Presta 1.5.2... i've got the same error like nastystyle:

 

error.png

Edited by Epredator

Share this post


Link to post
Share on other sites

Okey, that's weird.

To my knowledge 1.5.2 should use the same function as 1.5.3.

 

I don't have any install of 1.5.2, do you mind providing me with ftp and login to your 1.5.2 site?

Then I can see if I find the error.

Share this post


Link to post
Share on other sites

Hi guys

 

I am getting the same problem, with the depreciated addCSS message. I am using PrestaShop™ 1.5.3.1 and blockadvertmulti_0.10.2_fix2.zip.

 

Hi i have Presta Shop 1.5.3.1

 

and i got following error:

 

Warning: Function addCSS() is deprecated inC:\webserver\htdocs\www\pinocchio\amriswil\modules\blockadvertmulti\blockadvertmulti.php on line 260

in C:\webserver\htdocs\www\pinocchio\amriswil\classes\Tools.php on line 1777

 

can anyone help me ?

Thx

 

Does anyone know what we have to do to resolve this issue?

Share this post


Link to post
Share on other sites

my fault ... i removed hookDisplayLeft from template and that is answer why your module cannot display any content...

now i tested blockadvertmult module and it works fine on presta1.5.2 and 1.5.4

Share this post


Link to post
Share on other sites

I am using Prestashop 1.5.4.1

blockadvertmulti v0.10.2

 

I add 2 banners to TOP, select rotate

The banners are displayed on top of my left, center and right columns.

 

If I add 2 banners to TOP dont select ROTATE

The banners are displayed correctly at the top, then the columns are displayed beneath

 

Any help much appreciated

Share this post


Link to post
Share on other sites

Hi.

 

I can't recreate this problem.

When I added 2 banners to rotate in top, it only display them there.

 

However, I'm using a top file that has a minor fix in it.

 

Give it a try.

 

If that still dosent work, please link to your page, so I can check it out.

I probably can't check today, need to do some bookkeeping.

blockadvertmulti-top.tpl.zip

Share this post


Link to post
Share on other sites

PhpMadman - I tried your fix - unfortunately - no luck

 

I tried changing the jquery.innerfade.js file line 60 i changed absolute to relative - the banners then appear in the correct location but the rotate from one banner to the next is not "smooth"

 

I put the jquery.innerfade.js file back to its original so now you can see in my store what the original issue I was having is.

 

www.glutenfreesmartstore.com/store

 

Thanks

Edited by vierullo

Share this post


Link to post
Share on other sites

Ah, I misunderstood. I see the problem now.

Yeah. Changing the position to relative, fixes the problem, but it screws the page when changing images.

I'll see what I can do to fix it.

Share this post


Link to post
Share on other sites

Okey. Quick hack that should get it working.

jquery.innerfade.js

$(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').hide();

to

$(elements[i]).css('z-index', String(elements.length-i)).css('position', 'absolute').css('left','50%').hide();

Adjust 50% if image is of center.

 

blockadvertmulti-top.tpl

$("#blockadvmulti{/literal}{$hook} .advmulti-rotate").innerfade({literal}{'containerheight': 'auto', 'timeout': 5000});

to.

$("#blockadvmulti{/literal}{$hook} .advmulti-rotate").innerfade({literal}{'containerheight': '100px', 'timeout': 5000});

Where 100px is height of your biggest image + 10 to 20px

Share this post


Link to post
Share on other sites

Okay New Issue.. When I am adding images and i click on the up/down arrows to control the order they appear, i get sent back to the main Module Page and my changes dont take effect. Similarly if i type the numbers in the Order Field, when I hit Update Banners the order goes back to what it was before.

 

How can I set the order?

 

Thanks

Share this post


Link to post
Share on other sites

Seems like the orignal author prepared the order system, but did not finish it.

The arrows don't work, beacuse the address is incorrect i belive. I does not contain text that links it to the module, that's why it redirects to module page.

And I atm do not know what the correct address should be.

However. The box Order i can fix.

It's a problem in the saveBanners function in blockadvertmulti.php file.

This line:

	 				   , 'image_link' => pSQL($bnr['image_link']), 'block_id' => (int)$bnr['block_id'], 'order' => $idx

Should be replaced with this.

   					, 'image_link' => pSQL($bnr['image_link']), 'block_id' => (int)$bnr['block_id'], 'order' => $bnr['order']

Actually it's just the $idx at the end that is replaced with $bnr['order']

 

And if you feel like it, you can delete all $idx stuff in that function, it's now useless.

Edited by PhpMadman

Share this post


Link to post
Share on other sites