Can anyone help with an issue I have when going to edit an order as an opencart administrator.
I get an error message titled 'Syntax Error: Unexpected token < in JSON at position 0'
The body of the messsage appears as per the attachment.
When I try to click on the other tabs on the screen such as 2.Products, 3. Payment Details, 4. Shipping Details I cannot go into them and a no entry sign appears as the cursor.
Thank you for any guidance anyone can offer.
Richard
Attachments
SyntaxError.jpg (119.7 KiB) Viewed 13410 times
Have you used our FREE search on: JSON at position 0.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Code: Select all
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
If you don't know about htaccess do a forum/google search
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Could you explain what this does?artcore wrote:Try this in your htaccessAjax needs same domain and with WWW is considered another domain.Code: Select all
<IfModule mod_rewrite.c> RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] </IfModule>
If you don't know about htaccess do a forum/google search
In my .htaccess I have this:
Code: Select all
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Mine removes WWW. It depends on your config urls and preferences. www is esentially a subdomain of the main. I like them clean. ajax requests don't work cross domain so they have to match!
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Thank you kindly for taking the time to assist. I have copied both of your codes into my htaccess file, however the same result occurs. My entire htaccess file in the root directory reads (I've also tried the other suggestion): (note I am using journal2 them - will this make a difference?) Any suggestions? Thank you.
htaccess:
AddType x-httpd-php54 .php
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
To solve your issue, try this:
Go to Admin > Settings > Users > API
Create a new API and enable it
Next, go to Store Settings
Under Option tab in the Checkout section > API user > select
Save
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Fix that and it should work.
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: No registered users and 139 guests