Page 1 of 1
template error
Posted: Mon Mar 16, 2009 7:24 am
by removed331062
Bug report at bug tracker in case other people are having trouble installing. Just open config.php and change to something similar to:
Code: Select all
define('DIR_TEMPLATE', 'C:\htdocs\opencart/catalog/view/theme/default/template/');
Re: template error
Posted: Mon Mar 16, 2009 8:09 am
by fido-x
starchy wrote:Bug report at bug tracker in case other people are having trouble installing. Just open config.php and change to something similar to:
Code: Select all
define('DIR_TEMPLATE', 'C:\htdocs\opencart/catalog/view/theme/default/template/');
Actually, it should be more like
Code: Select all
define('DIR_TEMPLATE', 'C:\htdocs\opencart/catalog/view/theme/');
The bug is in "install/index.php" at line 356, which reads
Code: Select all
$output .= 'define(\'DIR_TEMPLATE\', \'' . realpath(dirname(__FILE__) . '/..') . '/catalog/view/template/\');' . "\n";
should be
Code: Select all
$output .= 'define(\'DIR_TEMPLATE\', \'' . realpath(dirname(__FILE__) . '/..') . '/catalog/view/theme/\');' . "\n";
Re: template error
Posted: Mon Mar 16, 2009 8:39 am
by Qphoria
fido-x wrote:
Actually, it should be more like
Code: Select all
define('DIR_TEMPLATE', 'C:\htdocs\opencart/catalog/view/theme/');
Probably best to just keep them all going the same way:
Code: Select all
define('DIR_TEMPLATE', 'C:/htdocs/opencart/catalog/view/theme/');
Re: template error
Posted: Mon Mar 16, 2009 9:01 am
by fido-x
Qphoria wrote:Probably best to just keep them all going the same way:
Code: Select all
define('DIR_TEMPLATE', 'C:/htdocs/opencart/catalog/view/theme/');
You're right, but then, all I did in that particular case was copy the code from the previous post and delete the "default/template/" from the end of the line.
I'm not a Windows user myself. If you are using Linux (or a Linux-based hosting service) the line should read something like:
Code: Select all
define('DIR_TEMPLATE', '/home/username/public_html/catalog/view/theme/');
But, if you make the change I suggested to "install/index.php" BEFORE installing, you don't have to fix things up afterwards.
Re: template error
Posted: Mon Mar 16, 2009 10:53 am
by removed331062
fido-x wrote:if you make the change I suggested to "install/index.php" BEFORE installing, you don't have to fix things up afterwards.
That is probably the easiest way.
Qphoria: The direction of the slashes are automatic.

Re: template error
Posted: Mon Mar 16, 2009 12:14 pm
by fido-x
There are more bugs related to this particular issue in the administration. Here are the fixes:
In "install/index.php", insert (at line 405)
Code: Select all
$output .= '// CATALOG' . "\n";
$output .= 'define(\'DIR_CATALOG_TEMPLATE\', \'' . realpath(dirname(__FILE__) . '/..') . '/catalog/view/theme/\');' . "\n";
Then change line line 177 in "admin/controller/setting/setting.php" to:
Code: Select all
$directories = glob(DIR_CATALOG_TEMPLATE . '*', GLOB_ONLYDIR);
If you don't wish to re-install, you can insert:
Code: Select all
// CATALOG
define('DIR_CATALOG_TEMPLATE', '/opt/lampp/htdocs/catalog/view/theme/');
into "admin/config.php", but you will still need to make the change to "admin/controller/setting/setting.php".
Re: template error
Posted: Mon Mar 16, 2009 12:48 pm
by fido-x
Follow up -- you will also need to change line 63 in "admin/view/template/setting/setting.tpl" from:
Code: Select all
<?php if ($template['name'] == $config_template) { ?>
to
Code: Select all
<?php if ($template['value'] == $config_template) { ?>
Re: template error
Posted: Mon Mar 16, 2009 3:32 pm
by removed331062
I found one more for /admin/config.php if you have full error reporting turned on. You'll need to add this line:
Code: Select all
define('DIR_CATALOG', 'yourpath/opencart/');
It's called somewhere but it's not defined. Gives a notice and messes with the admin menu among other things.
Re: template error
Posted: Mon Mar 16, 2009 3:46 pm
by fido-x
Like I said:
fido-x wrote:There are more bugs related to this particular issue in the administration. Here are the fixes:
In "install/index.php", insert (at line 405)
Code: Select all
$output .= '// CATALOG' . "\n";
$output .= 'define(\'DIR_CATALOG_TEMPLATE\', \'' . realpath(dirname(__FILE__) . '/..') . '/catalog/view/theme/\');' . "\n";
Then change line line 177 in "admin/controller/setting/setting.php" to:
Code: Select all
$directories = glob(DIR_CATALOG_TEMPLATE . '*', GLOB_ONLYDIR);
If you don't wish to re-install, you can insert:
Code: Select all
// CATALOG
define('DIR_CATALOG_TEMPLATE', '/opt/lampp/htdocs/catalog/view/theme/');
into "admin/config.php", but you will still need to make the change to "admin/controller/setting/setting.php".
and
fido-x wrote:Follow up -- you will also need to change line 63 in "admin/view/template/setting/setting.tpl" from:
Code: Select all
<?php if ($template['name'] == $config_template) { ?>
to
Code: Select all
<?php if ($template['value'] == $config_template) { ?>
will get rid of that error.
Re: template error
Posted: Mon Mar 16, 2009 3:59 pm
by removed331062
I misread the notice
Re: template error
Posted: Mon Mar 16, 2009 7:05 pm
by Daniel
fixing this now.
Re: template error
Posted: Mon Mar 16, 2009 7:49 pm
by Daniel
pleae re-download the latest version.
Re: template error
Posted: Mon Mar 16, 2009 8:35 pm
by JNeuhoff
It seems your latest upload introduced another bug about the
non-empty config.php file.
Re: template error
Posted: Mon Mar 16, 2009 8:55 pm
by fido-x
This was missed as well
fido-x wrote:Follow up -- you will also need to change line 63 in "admin/view/template/setting/setting.tpl" from:
Code: Select all
<?php if ($template['name'] == $config_template) { ?>
to
Code: Select all
<?php if ($template['value'] == $config_template) { ?>
This needs to be done to show the selected template in the admin. It just shows "default" otherwise.
Re: template error
Posted: Mon Mar 16, 2009 9:45 pm
by Daniel
ok i uploaded again.