X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Logo rotates on Holidays - Script (https://forum.x-cart.com/showthread.php?t=38410)

1day2004 03-18-2008 10:38 PM

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?

Dongan 03-18-2008 10:45 PM

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.

1day2004 03-19-2008 12:33 AM

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


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

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.