Skip to main content

Posts

Showing posts from March, 2017

List of mime types - config_file_mime_allowed for opencart

config_file_mime_allowed - useful when they are missing in your opencart installation/upgrade! text/plain image/png image/jpeg image/gif image/bmp image/tiff image/svg+xml application/zip "application/zip" application/x-zip "application/x-zip" application/x-zip-compressed "application/x-zip-compressed" application/rar "application/rar" application/x-rar "application/x-rar" application/x-rar-compressed "application/x-rar-compressed" application/octet-stream "application/octet-stream" audio/mpeg video/quicktime application/pdf

List of the robots and crawlers for opencart - config_robots

config_robots - useful when they are missing in your installation or upgrade. abot dbot ebot hbot kbot lbot mbot nbot obot pbot rbot sbot tbot vbot ybot zbot bot. bot/ _bot .bot /bot -bot :bot (bot crawl slurp spider seek accoona acoon adressendeutschland ah-ha.com ahoy altavista ananzi anthill appie arachnophilia arale araneo aranha architext aretha arks asterias atlocal atn atomz augurfind backrub bannana_bot baypup bdfetch big brother biglotron bjaaland blackwidow blaiz blog blo. bloodhound boitho booch bradley butterfly calif cassandra ccubee cfetch charlotte churl cienciaficcion cmc collective comagent combine computingsite csci curl cusco daumoa deepindex delorie depspid deweb die blinde kuh digger ditto dmoz docomo download express dtaagent dwcp ebiness ebingbong e-collector ejupiter emacs-w3 search engine esther evliya celebi ezresult falcon felix ide ferret fetchrover fido findlinks fireball fish search fouineur funnelweb gazz gcreep genieknows getterroboplus geturl glx

simple batch script to import sql file in mysql

@echo off SET mysqldir=C:\mysql\bin SET mysqlhost=localhost SET mysqldatabase=dbname SET mysqluser=user SET mysqlpassword=password if [%1]==[] goto usage IF NOT EXIST %1 GOTO nosuchfile @REM Change to mysqldir REM CD %mysqldir% @REM importing db "%mysqldir%\mysql.exe" -u %mysqluser% -h%mysqlhost% -p%mysqlpassword% %mysqldatabase% < %1 pause goto end :usage echo -How to use- echo EXAMPLE: echo %0 sqlfile.sql goto end :nosuchfile echo --ERROR-- echo no such file %1 :end

[FIX] opencart - Add the previously deleted english language

If you have previously deleted (in general not suggested) the English language supposing to solve the problem to have just one language in the backend you can try to add it again. Run this sql query to add with ID 1. INSERT INTO `oc_language` (`language_id`, `name`, `code`, `locale`, `image`, `directory`, `sort_order`, `status`) VALUES (1, 'English', 'en', 'en_US.UTF-8,en_US,en-gb,english', 'gb.png', 'english', 1, 1);

[solution] multiple collapse dropdown menu nav

Sometimes, with bootstrap, you need multiple collapsable Menus. change the data-taget to an ID example (mainmenu): <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#mainmenu"> use and ID for your navbar example (mainmenu): <div class="collapse navbar-collapse" id="mainmenu"> and do the same with all the other menus that you have with a different ID or a custom/different class.

Delete rows where id does not have a match from another table.

 This simple sql query deletes the all the records that don't have a corresponding ID in another table. #delete orphaned descriptions of the products DELETE b FROM `oc_product_description` b LEFT JOIN `oc_product` a ON b.product_id = a.product_id WHERE a.product_id IS NULL You can use it to delete orphaned product descriptions in opencart

Check for duplicate entries in the url aliases of opencart. Fix Subquery returns more than 1 row (products)

Check for duplicate entries  in the url aliases of opencart: (same query keyword) SELECT  `query`,`keyword`, COUNT(*) FROM  `oc_url_alias` GROUP BY  `query`, `keyword` HAVING COUNT(*) > 1 (same query) - Usually you can have errors related to the same queries SELECT `query`, COUNT(*) FROM `oc_url_alias` GROUP BY `query` HAVING COUNT(*) > 1 (same keyword) SELECT `keyword`, COUNT(*) FROM `oc_url_alias` GROUP BY `keyword` HAVING COUNT(*) > 1 Tip: In most cases I fixed this error Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in system/library/db/mysqli.php on line 18Notice: Error: Subquery returns more than 1 row by removing the orphaned entries/urlaliases (ex. the demo data). Do a backup before removing anything.

How to fix date(): It is not safe to rely on the system's timezone settings - php

When you use the date function sometimes, if there's no specific configuration, you will see this error: date(): It is not safe to rely on the system's timezone settings   How to fix date(): It is not safe to rely on the system's timezone settings Solution #1 configure date.timezone in your php.ini configuration file. If you have no access to php.ini check the 2nd Solution. Solution #2 Use date_default_timezone_set() or ini_set() inside your <?php  code Example: date_default_timezone_set('Europe/Rome'); The complete list of the supported time zones can be found on http://php.net/manual/en/timezones.php

[FIX] InsecurePlatformWarning - You can upgrade to a newer version of Python to solve this

Sample error that can occurr: _vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.   InsecurePlatformWarning To solve without wasting time just run: $  pip install requests [ security ]