Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Logo rotates on Holidays - Script

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-18-2008, 10:38 PM
 
1day2004 1day2004 is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 115
 

Default Logo rotates on Holidays - Script

I want to install the following script: http://www.rswr.net/hlogoz-holiday-logo-changer/ on our home page. The script allows you to show a different logo (or any image) for each holiday.

I have placed the php include in head.tpl.

Code:
{include_php file="/home/user/website-www/html/include/hlogoz/hlogoz.php"}

To make sure I used the correct path, I first placed a test file in the same location (include/hlogoz/testfile.php) and it returned successfully when I visited our website's home page. However, when I use the code that calls hlogoz.php, I received the following error message upon visiting the home page:

Quote:
"Can't launch template engine"

I searched my x-cart files and found this error message to originate from x-cart's config.php file:

Code:
# # Create Smarty object # if (!@include $xcart_dir."/smarty.php") { echo "Can't launch template engine!"; exit; } $smarty->assign("http_location",$http_location); $mail_smarty->assign("http_location",$http_location); $smarty->assign("https_location",$https_location); $mail_smarty->assign("https_location",$https_location); $smarty->assign("xcart_web_dir",$xcart_web_dir); $smarty->assign("current_location",$current_location); $smarty->assign("php_url",$php_url); $xcart_catalogs = array("admin"=>$current_location.DIR_ADMIN, "customer"=>$current_location.DIR_CUSTOMER, "provider"=>$current_location.DIR_PROVIDER, "partner"=>$current_location.DIR_PARTNER); $smarty->assign("catalogs", $xcart_catalogs); $mail_smarty->assign("catalogs", $xcart_catalogs); $xcart_catalogs_secure = array("admin"=>$https_location.DIR_ADMIN, "customer"=>$https_location.DIR_CUSTOMER, "provider"=>$https_location.DIR_PROVIDER, "partner"=>$https_location.DIR_PARTNER); $smarty->assign("catalogs_secure", $xcart_catalogs_secure);

What could be the problem?
__________________
Version 4.0.8 Live
Reply With Quote
  #2  
Old 03-18-2008, 10:45 PM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default Re: Logo rotates on Holidays - Script

make sure that you have assigned right template for this php file and called auth.php from your php file which will solve most of the authentication issues.
Reply With Quote
  #3  
Old 03-19-2008, 12:33 AM
 
1day2004 1day2004 is offline
 

Senior Member
  
Join Date: Dec 2004
Posts: 115
 

Default Re: Logo rotates on Holidays - Script

I have added
Code:
require "./auth.php";
in hlogoz.php.

Now I get the following error message:
Quote:
Warning: main(/config.php): failed to open stream: No such file or directory in /home/user/website.com/html/auth.php on line 44

Warning: main(): Failed opening '/config.php' for inclusion (include_path='.:/usr/share/pear') in /home/user/website.com/html/auth.php on line 44

Fatal error: Call to a member function on a non-object in /home/user/website.com/html/auth.php on line 81

My knowledge on php is limited. What else am I missing?

Thanks
__________________
Version 4.0.8 Live
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:01 AM.

   

 
X-Cart forums © 2001-2020