Post by dfoshay » Mon Oct 27, 2014 3:18 am

I am new to open cart and have been installing and getting different errors I have been able to fix but this one. I did a fresh install as a test site when I log into the admin to view and edit an order place. When I hit continue I get the following error message:

SyntaxError: Unexpected token <

or

<b>Notice</b>: Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' in <b>/.... admin/controller/sale/order.php</b> on line <b>2342<b>

Has anyone come across this message before and not a fix?

Thanks

Newbie

Posts

Joined
Mon Oct 20, 2014 2:47 pm

Post by uksitebuilder » Mon Oct 27, 2014 4:08 am

HTTPS_CATALOG is defined in the config.php file

You should check that it exists

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by dfoshay » Wed Oct 29, 2014 12:06 pm

Thanks I do not see it in the config.php .. I am not sure how it should be added this is what my config.php looks like now.. I took out my personal info and website out of what is posted here

<?php
// BACKEND CONFIG

// HTTP
define('HTTP_SERVER', 'http://www.website.com/store/admin/');
define('HTTP_CATALOG', 'http://www.website.com/store/');
define('HTTP_IMAGE', 'http://www.website.com/store/image/');
define('HTTP_ADMIN', 'http://www.website.com/store/admin/');

// HTTPS
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);

// DIR
define('DIR_CATALOG', '/home/-----/public_html/store/catalog/');
define('DIR_APPLICATION', '/home/----/public_html/store/admin/');
define('DIR_SYSTEM', '/home/------/public_html/store/system/');
define('DIR_DATABASE', DIR_SYSTEM.'database/');
define('DIR_LANGUAGE', DIR_APPLICATION.'language/');
define('DIR_TEMPLATE', DIR_APPLICATION.'view/template/');
define('DIR_CONFIG', DIR_SYSTEM.'config/');
define('DIR_IMAGE', '/home/-----/public_html/store/image/');
define('DIR_CACHE', DIR_SYSTEM.'cache/');
define('DIR_DOWNLOAD', DIR_SYSTEM.'download/');
define('DIR_LOGS', DIR_SYSTEM.'logs/');
define('DIR_MODIFICATION', DIR_SYSTEM.'modification/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', '------);
define('DB_PASSWORD', 'G&[8s2~qn619^)7');
define('DB_DATABASE', ------');
define('DB_PREFIX', 'oc_');
?>

Newbie

Posts

Joined
Mon Oct 20, 2014 2:47 pm

Post by uksitebuilder » Wed Oct 29, 2014 4:47 pm

That seems to be a non-standard config.ph you have there. Anyhow, following the way it is set, simply add under the //HTTPS section

define('HTTPS_CATALOG', HTTP_CATALOG);

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by freyaxspec » Wed Oct 29, 2014 6:04 pm

I have the same problem as dfoshay, have already added the line

define('HTTPS_CATALOG', HTTP_CATALOG);

to //HTTPS in config.php at the root and config.php in admin folder.

but still have problem when I tried to edit the sales order record.

the error message become :

SyntaxError: Unexpected end of input

OK

any clue to fix ?

thanks ...

Newbie

Posts

Joined
Wed Oct 29, 2014 5:56 pm

Post by marmax » Wed Oct 29, 2014 6:12 pm

That seems to be a non-standard config.php you have there.
Hi,
Are you talking here about 2.0? Strange, in /admin/config.php I have only:

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://shop.......');
define('HTTP_CATALOG', 'http://shop........');

// HTTPS
define('HTTPS_SERVER', 'https://................./admin/');
define('HTTPS_CATALOG', 'https://........................./');

My site (finally) seems to be working, though.

New member

Posts

Joined
Fri Oct 10, 2014 4:34 am

Post by freyaxspec » Wed Oct 29, 2014 6:31 pm

have the same config.php as dfoshay , try to add the line
// HTTPS
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);
define('HTTPS_CATALOG', HTTP_CATALOG);
but still have problem when trying to edit the existing order.

any clue?

thanks

Newbie

Posts

Joined
Wed Oct 29, 2014 5:56 pm

Post by uksitebuilder » Wed Oct 29, 2014 7:02 pm

freyaxspec wrote:I have the same problem as dfoshay, have already added the line

define('HTTPS_CATALOG', HTTP_CATALOG);

to //HTTPS in config.php at the root and config.php in admin folder.

but still have problem when I tried to edit the sales order record.

the error message become :

SyntaxError: Unexpected end of input

OK

any clue to fix ?

thanks ...
That error generally means a missing } or ; somewhere in the code.

Does the error specify a file and line nubmer ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by freyaxspec » Wed Oct 29, 2014 7:15 pm

before adding the line, the error message was
SyntaxError: Unexpected token <

OK

<b>Notice</b>: Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' in <b>/.... admin/controller/sale/order.php</b> on line <b>2342<b>
error log file :
2014-10-29 10:42:14 - PHP Notice: Use of undefined constant HTTPS_CATALOG - assumed 'HTTPS_CATALOG' in /home/....../admin/controller/sale/order.php on line 2342
After adding " define('HTTPS_CATALOG', HTTP_CATALOG); " in admin/config.php , the error message on screen becomes
SyntaxError: Unexpected end of input

OK
but no message in error log file. The order records cannot be edited or deleted .

any idea ?

thanks ...

Newbie

Posts

Joined
Wed Oct 29, 2014 5:56 pm

Post by marmax » Wed Oct 29, 2014 7:52 pm

Is your site in maintenance mode? Try to switch off.

New member

Posts

Joined
Fri Oct 10, 2014 4:34 am

Post by freyaxspec » Wed Oct 29, 2014 8:11 pm

marmax wrote:Is your site in maintenance mode? Try to switch off.
Maintenance Mode is always off ... any other clue ?

thanks...

Newbie

Posts

Joined
Wed Oct 29, 2014 5:56 pm

Post by marmax » Wed Oct 29, 2014 9:21 pm

I have had different, although a bit similar errors due to https / ssl configuration of shared hosting (they use reversed_ssl on 123-reg). May have nothing to do with your problem, though... GL.

New member

Posts

Joined
Fri Oct 10, 2014 4:34 am

Post by freyaxspec » Thu Oct 30, 2014 1:13 am

thanks for your reply. however, it seems that the problem was not solved yet. still can not edit the status of the order or delete the order .

I like the interface of new Opencart 2.0 and want to give it a try. however, the order status " pending " was failed to change after receiving paypal standard payment. I though it would still be fine if I could edit the order status manually to " processing " or whatever deem fit. Unfortunately , i encounter problem in doing so. Hope some experts would solve the problems soon.

thanks ...

Newbie

Posts

Joined
Wed Oct 29, 2014 5:56 pm

Post by dfoshay » Fri Oct 31, 2014 11:30 am

has anyone came up with any answer I am still looking for a solution.

i added

// HTTPS
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);
define('HTTPS_CATALOG', HTTP_CATALOG);

and maintenance mode has been off

not i get error message

SyntaxError: Unexpected end of in input

OK

Newbie

Posts

Joined
Mon Oct 20, 2014 2:47 pm

Post by Nesster » Fri Oct 31, 2014 9:48 pm

We have the same problem. We first thought it was a server setup problem, but the problem came back when we setup our virtualhost for the site.

So far we have this:
- if site is just a sub-folder of document root (default apache config), we don't have the error.
- as soon as we define a virtualhost for the site, we get the error.

the virtualhost is everything basic (sure we don't need the cgi-bin but it's something we tried) :

Code: Select all

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName devbranch.DOMAIN.com

        DocumentRoot /var/www/devbranch/site1
        <Directory /var/www/devbranch/site1>
                Options -Indexes FollowSymLinks Includes MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
We tried a lot of configs, including the simple:

Code: Select all

<VirtualHost *:80>
        ServerName devbranch.DOMAIN.com
        DocumentRoot /var/www/devbranch/site1
</VirtualHost>

Newbie

Posts

Joined
Tue Oct 21, 2014 8:09 am

Post by dfoshay » Sat Nov 01, 2014 2:04 pm

SOLVED for me ...

I was previously installing open cart through c panel installation. I decided I was going to go back to a previous version but instead installed opencart 2.0 with out c panel but by the instructions listed in the download of opencart 2.0 and so far this issue has been resolved for me.

Newbie

Posts

Joined
Mon Oct 20, 2014 2:47 pm

Post by Nesster » Sat Nov 08, 2014 2:32 am

In our case it was a DNS resolution problem:
http://forum.opencart.com/viewtopic.php ... 99#p522416

Frank

Newbie

Posts

Joined
Tue Oct 21, 2014 8:09 am
Who is online

Users browsing this forum: No registered users and 15 guests