Sunday, 20 March 2016

Call to undefined function token() in opencart 2

Check if in system/helper you have file general.php and inside function token.

If yes, open in system dir file startup.php and look for:


<code>
require_once(DIR_SYSTEM . 'helper/general.php');

</code>
If is not here add this line.
got this issue in opencart 2.0.1.0

Problem solved!

Wednesday, 10 February 2016

Awsome fonts suddenly don’t appear opencart




Look for path of css file means look url in config file and look if site url is same or not I mean if config has www in url use www in site url. I was banging my head for two days to fix it.

Json error undefined character on line 1 opencart

Well , this was problem I faced when I tried to edit language file in my encoding UTF-8 without BOM
And language was serbian which requires ISO -8859-2
So just use this ecoding and this will not appear.
Thanks

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource opencart

Well this was very simple case but annoying, due to new restrictions on browser I guess , my site was redirecting to www via htaccess and I didnt made change in url in config file so url was without www so it was not sending any of json ajax request.
Just fix url of site to as per redirection and you are good to go. I hope it helps

Has exceeded the 'max_questions' resource Journal theme used) : Opencart


Ans : This means that your web host has limited the number of database queries that you can execute (usually per hour). Each page that you view requires dozens, even hundreds of queries behind the scenes, and attributes are especially query-hungry.
In my Case culprit was Journal main menu module where I tried to add lot of categories in single dropdown adding one by one .