Showing posts with label Opencart. Show all posts
Showing posts with label Opencart. Show all posts

Wednesday

Opencart How to change Default Currency from USD to other currency?

「Long龙儿Er小编の話Prologue」The logic of changing default currency is 1. Add new currency, 2. Set it as default.

Q. How to add new currency in opencart?
Q. How to change default currency to Singapore Dollar in opencart?
Q. How change default currency from USD to SGD?

Step 1. Admin -> System -> Localisation -> Currencies

Click "+" button at right top corner to add our wanted currency. Fill in all info and save.



The system doesn't seem smart enough to auto set we newly added currency as default although we set 1 in value. Hence,

Step 2. Admin -> System -> Settings -> Store edit -> Local -> Currency
Choose the auto update currency if needed as the default exchange rate must set manually.

Monday

How to install Opencart on AWS

Do not waste time on watching those wordy youtube videos. Do not listen to those "IT monkey" who bluff you how technical it is to install a CMS. It's easy to install the basic CMS on AWS. Just follow a few steps.

1. After logging in AWS account, look for EC2 under Compute in dashboard.



2. Click EC2 and click Launch instance. (AWS terms are generally weird.)



3. Look for AWS marketplace on left hand side bar, click it and key in opencart in search bar.



4. Select the opencart version you want and then continue.



5. Click free tire option.



6. Until this step you may just click Review and Launch button to launch your website as the main procedures are finished. You may continue with steps 456 as preference.



7. Create a new key pair



8. What's opencart admin user name and password in AWS.



In the instance tab, you can view the opencart you've launched just now. Key in the public IP into browser to view website front end. Add "/admin" to view back end.

User name: oc_user
Password: instance ID (starts from i-)
After logging in the back end, you may edit whatever you'd like to do.

Tuesday

How to edit or delete powered by opencart add edit delete copyright footer

If you mean this footer, there are 2 files which could be edited.



1. Find footer.tpl file in cPanel file manager /catalog/view/theme/default/template/common/footer.tpl. Open it by code editor and edit or delete this line.2. Or Find footer.php file under /catalog/language/english/common/footer.php
Open in code editor and modify this line.

Friday

OpenCart how to increase / set the Admin session timeout

Opencart admin timeout is really short. When you add content half way and back to continue after arranging the stock, all the unsaved content will be lost if you click save. And there is no cache to retrieve. This is super annoying.

Admin timout can most likely be solved by changing the value of session.gc_maxlifetime.
Fine this file in cpanel -> file manager -> public_html -> admin -> php.ini
After opening this file, you will see session.gc_maxlifetime = 12000000;
Change the value to whatever you prefer.

Wednesday

How to change color of menu bar in OpenCart

Step 1. Log in Cpanel or server
Step 2. Look for catalog/view/theme/yourtheme/stylesheet/stylesheet.css
Step 3. Search for class #menu

#menu { background: #9F9F9D; <--change this
border-bottom: 1px solid #BFB7B5;
}

[opencart] How to change featured module color

How to change title bar color of "Featured"?
How to change background color of "Featured"?

Step 1. Log in Cpanel or server
Step 2. Look for catalog/view/theme/template/module/featured.tpl
Step 3. Add code style="background:#DDD7C9;"
1) to heading class to change bar color
2) to content class to change body background color
Pink any hex color code to match your design.

Sunday

How to reset opencart password

Step 1. Approach to your website hosting tech support for help.
If your tech support is an idiot who keep asking for your cpanel username and password then you may follow step 2 onwards.

Step 2. Log into cPanel and click on phpMyAdmin

Step 3. Open the database that your OpenCart store uses and look for  "user" table (ignore prefix)

Step 4. Edit the user with the username "admin" (or the one you defined) and change the password field to 5f4dcc3b5aa765d61d8327deb882cf99. This string will overwrite the old password to password and click go (save)

Step 5. Now go to your OpenCart back end site to log in by using new password password (sounds like a tongue twister).

Step 6. Go to system->users->users and update the corresponding username with the desired password.

Tuesday

How to change opencart site/template width?

Step 1. Log in Cpanel or server

Step 2. Look for catalog/view/theme/yourtheme/stylesheet/stylesheet.css

Step 3. Search for class #container

#container {
width: 1080px;  <--- change this
}

Wednesday

[opencart] How to change default background color

How to change title bar color of "Featured"?
How to change background color of "Featured"?

Step 1. Log in Cpanel or server

Step 2. Look for catalog/view/theme/yourtheme/stylesheet/stylesheet.css

Step 3. Search for class body

1) Change background color
body {
background-color: #ffffff;
}
2) Change background image
body {
background: #ffffff url('../image/your_background.jpg');
}

Sunday

How to speed up OpenCart store? Opencart optimization and Improving SEO

My website has 400 over products and it runs damn slow. The page speed testing site shows it takes average 14 second to load 1 page which is not acceptable at all. At the beginning I thought it was server problem as each time when I approached server tech support they say they won't help increase the loading speed unless I pay them extra.

Lucky I browsed some related articles in the internet before I hire someone or purchase any speed up extension which could easily cost 100-1000 dollars. One guy writes: Believe me you need not buy any of those silly extensions...just understand the below mentioned steps and you save almost $100.

Now let's take a look at how slow my website performed initially.

This is the snapshot from Google PageSpeed Insights. The 3 simple steps to Opencart optimization and Improving SEO are

1) Minify / gzip your css, javascript and jquery files
- increases 40-50% of Pagespeed points & reduces almost 40-50% of your 1st request data loading size and time
2) Enable browser caching
- increases around 5-15% of pagespeed points and almost 40-50% of your 2nd request onwards load time
3) Optimize images / image size
- increases 5-15% of pagespeed points and almost 20 - 30% of your 1st request data loading file size and time

As newbies, I roughly understand the meaning but how to do that.

1) Minify CSS, javascript and other files using gzip/ Enable GZIP Compression

This is the most important part of opencart optimization. To do this, we need to do 2 things which allow the site to work it’s magic on the files. Firstly, log into OpenCart store and go to: System->Settings->Edit->Click the "Server" Tab and set the "Output Compression Level" to between 4 and 6. The option offers a number between 0 and 9 but in my experience I’ve found that a more mid-range number works best as a high number compresses the file more but spends more time doing it which makes the whole thing pretty pointless.

Secondly, (most important step) is to add a few lines to .htaccess file which provide a second compression option in case the OpenCart default one has no effect (which has been reported before). So, open up the .htaccess file and add the following code underneath the ReWrite rules:

# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

You should notice there is 1 line writes # 2. In your opencart directory rename htaccess.txt to .htaccess.
Here is where you can find htaccess file. Need to log into cPanel->file manager

After adding in the code and saved the changes, let's run the analyze again:

Can see some improvement?

2) Enable browser caching

Once again we will be dipping into the .htaccess file to set cache lengths for browsers to keep images and external scripts. This time we will be specifying the browser to keep elements for 7 days before requesting everything again which should increase the load time considerably. Remember, this will make things very difficult for development so if you are making lots of development changes to your site then it is perhaps best to finish that up before using this to speed up your OpenCart store.

## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
ExpiresByType application/pdf "access plus 1 week"
ExpiresByType text/x-javascript "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresDefault "access plus 1 week"
## EXPIRES CACHING ##

After pasting this code to htaccess file, the analysis shows

3) Optimizing the images

Ideally each product image should be somewhere between 20 - 70 kb.
it is best if you optimize your images to a size no more than 50 KB.
you just need MS paint skills and try to keep the max product image attributes(height x width) to 500 x 500
Providing image width and height in the image tag will further help to efficiently load the page.

Saturday

[opencart] How to change banner width?

How to change slideshow/rotating banner width?

This part can be done at admin page.

Step 1. Log in to admin page

Step 2. Looking for Extentions -> Modules -> slideshow

In my opencart version 1.5.6.4, the top rotating banner is named as "slideshow". Know your module name and change accordingly.

Sunday

How to change copyright year in opencart

Copyright year is normally located at the very bottom line of website, eg.
Copyright 2008-2016 © Longer Vogue. All rights reserved.

Step 1. log into cPanel and click on "File Manager"

Step 2. Look for /catalog/language/english/common/footer.php


Step 3. Edit the last line in footer.php file

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php<br>
// Text<br>
$_['text_information']  = 'Information';
$_['text_service']      = 'Customer Service';
$_['text_extra']        = 'Extras';
$_['text_contact']      = 'Contacts';
$_['text_return']       = 'Returns';
$_['text_sitemap']      = 'Site Map';
$_['text_manufacturer'] = 'Brands';
$_['text_voucher']      = 'Gift Vouchers';
$_['text_affiliate']    = 'Affiliates';
$_['text_special']      = 'Specials';
$_['text_account']      = 'My Account';
$_['text_order']        = 'Order History';
$_['text_wishlist']     = 'Wish List';
$_['text_newsletter']   = 'Newsletter';
$_['text_powered']      = 'Powered By <a href="http://www.opencart.com">OpenCart</a> %s © %s';
?>

Change the Copyright year and rights to whatever you want.

$_['text_powered']      = 'Copyright 2008-2016 © <a href="http://longervogue.com/">Longer Vogue</a>. All rights reserved.';