Converting Data from Latin1 to UTF-8

First export the databases which you plan to convert. $> mysqldump -u root -p123 –default-character-set=latin1 shop > /root/shop.sql Second, convert the database to utf8 $> sed -e ‘s/SET NAMES latin1/SET NAMES utf8/g’ -i /root/shop.sql $> sed -i -e ‘s/CHARSET=latin1/CHARSET=utf8 COLLATE=utf8_unicode_ci/g’ /root/shop.sql $> vi /root/shop.sql (Check the convention is successful or not) Last step, import the […]

How to disable customers to register?

1) 1.1) Remove the ‘Register’ link in the top right corner 1.2) Remove the ‘Create account for this Email’ checkbox on the cart.php?mode=checkout page. 1.3) The tool https://help.x-cart.com/X-Cart:Using_Webmaster_mode will help you to localize the templates Index: include/register.php index b95b9c35f2..9170d8bb29 100644 — include/register.php +++ include/register.php @@ -286,8 +286,7 @@ if ( * Check if user have […]

How to Install Magento 2.3.2 with Sample Data Under Local Host?

Download magento2.3.2 at magento.com/tech-resources/download, Remember use 127.0.0.1, instead of using localhost to intall magento. Otherwise, you will meet an error when you login the admin panel. You may also meet a black page when you login the admin panel even if you use 127.0.0.1. How to resolve this issue then? Very easy, go to vendor\magento\framework\View\Element\Template\File, […]

How to Change Zen-Cart Homepage Big Banner and The Text Under It?

After we installed zen-cart v1.5.5f, the homepage  default big banner is zencart-book.png for dest top computer, and zencart-book-mobile.png for your mobile phone. How to Change Zen-Cart Homepage Big Banner and The Text Under It? First we need to prepare 2 images: 800×350.jpg, and 350×350.jpg.  Two methods to modify the banner and the text under it: Method One, log […]

How to Change “Congratulations! You have successfully installed your Zen Cart® E-Commerce Solution.”?

After we installed zen-cart v1.5.5f, how to change “Congratulations! You have successfully installed your Zen Cart® E-Commerce Solution.”? Go to includes\languages\english\responsive_classic, and edit index.php. Replace: define(‘HEADING_TITLE’, ‘Congratulations! You have successfully installed your Zen Cart® E-Commerce Solution.’); } elseif ($category_depth == ‘nested’) { // This section deals with displaying a subcategory /*Replace this line with the […]

Problems with the CURL extension While Installing Zen-cart Under Nginx

“Problems with the CURL extension – PHP is reporting that CURL is not present. Could not use CURL to contact a live server” How to deal with this issue? First you need to update your CURL, visit https://curl.haxx.se/download/, and check the latest curl, say curl-7.61.0.tar.gz; Login your hosting via SecureCRT or putty, and run: Download: wget https://curl.haxx.se/download/curl-7.61.0.tar.gz […]

php7.2: the each() function is deprecated

The each() function is deprecated under php7.2. If we run the following code we will get errors: <?php $arr=array( ‘glasses1’ => ‘reading glasses’, ‘glasses2’ => ‘bifocal glasses’, ‘glasses3’ => ‘progressive glasses’ ); while(list($key,$val)=each($arr)){ echo $key.’—>’.$val.'<br>’; } ?>   Deprecated: The each() function is deprecated. This message will be suppressed on further calls in E:\xampp\htdocs\index.php on […]

Sublime Text 3 – How Can We Add Our PHP Tags?

I want to add some custom tags for my development – but I don’t know how to do it. I have tried snippets but it doesn’t work because my tags have some special symbols. How can I add my tags so that the snippets work? Eg: when I fill pre in sublime text, it will […]

You can’t add that domain: you don’t have permission to add!

Today I tried to add web-design-world.com to my Dreamhost account, after I click ‘Add Hosting to a Domain / Sub-Domain’ under DreamHost admin Panel, and try to add this domain name, failed, and I got a message, says ‘You can’t add that domain: you don’t have permission to add!. I googled but did not find […]

Creating Multiple Single Posts for Different Categories

If each post only belongs to one category, and each category has different post template, just modify single.php, we can use the following code: if ( in_category(‘fruit’) ) { include ‘single-fruit.php’; } elseif ( in_category(‘vegetables’) ) { include ‘single-vegetables.php’; } else { // Continue with normal Loop if ( have_posts() ) : while ( have_posts() […]