Monday, 8 August 2016

Remove Powered By Opencart


This tutorial will show you how to remove 'powered by opencart' from the bottom of your opencart store. I will be using cPanel file manager to do this.
Opencart Store.
To remove the powered by you need to edit the folder footer.php. You can find this in public_html/catalog/language/english/common/footer.php. 

Once you have found the file you need to search for the code 'Powered By <a href="http://www.opencart.com">OpenCart</a> </br> and remove it (mine is on line 17).
Once you have removed it the file should look like this:

<?php
// Text
$_['text_information']  = 'Information';
$_['text_service']      = 'Customer Service';
$_['text_extra']        = 'Extras';
$_['text_contact']      = 'Contact Us';
$_['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']      = '<br /> %s &copy; %s';

Once you have done this the powered by opencart should be gone from the bottom of your opencart store. This is the way I have found the easiest, some may do it a different way.
Finished Result.
Sam.



Change the Colour of the Menu Bar Opencart


For this tutorial I will be showing you how to change the colour of the menu bar in opencart.



Menu Bar.
For this I will be using my cPanel file manager. You will need to locate your stylesheet, to find this you need to go on cPanel file manager, FileZilla or what ever you are using. The location is public_html/catalog/view/YOUR THEME/stylesheet/stylesheet.css.
YOUR THEME is the theme you are using, so mine is default meaning I would put default instead of your theme. 

Once in the stylesheet you will need to find #menu { (mine is on line 192-204). 
This is what you should see:

#menu {
background-color: #F2F2F2;
background-image: linear-gradient(to bottom, #F2F2F2, #F2F2F2);
background-repeat: repeat-x;
border-color: #F2F2F2 #F2F2F2 #F2F2F2;
min-height: 40px;
}
#menu .nav > li > a {
color: #848484;
text-shadow: 0 0px 0 rgba(0, 0, 0, 0);
padding: 10px 15px 10px 15px;
min-height: 15px;
background-color: transparent;

To achieve the look i wanted i changed background-color, background-image, border-color. This changed the menu bar colour, however the text was too light to read and also has a shadow to it. To fix this i changed the text colour and set the text-shadow to 0. 

Result.

When you make these changes also check your mobile version of your website, currently mine looks like this.
Mobile.
The text 'categories' is barely visible and the drop down button is a different colour. To change this  you will need to find #menu .btn-navbar { (Mine is on line 247-265).
This is what you should see:

#menu #category {
float: left;
padding-left: 15px;
font-size: 16px;
font-weight: 700;
line-height: 40px;
color: #848484;
text-shadow: 0 0px 0 rgba(0, 0, 0, 0.0);
#menu .btn-navbar {
font-size: 15px;
font-stretch: expanded;
color: #848484;
padding: 2px 18px;
float: right;
background-color: #F2F2F2;
background-image: linear-gradient(to bottom, #F2F2F2, #F2F2F2);
background-repeat: repeat-x;
border-color: #F2F2F2 #F2F2F2 #F2F2F2;

To change the colour of the drop down button i changed background-colorbackground-image, color and border-color. To change the colour of the category text change color and again the text had a shadow to it so i changed text-shadow to 0. 
Result.


Like I have said in previous posts this is the way I found easiest, others may do this a complete different way.
Sam.





Mail Settings Opencart


For this post I will be talking about the mail settings in opencart. After I set up the email address I tried to send a test email through my website, that sent perfectly however i did not receive the email. I have spent a while testing different things and searching the internet for answers. I have found a solution that worked for me. 

My web hosting is through GoDaddy and I am using opencart 2.1.0.2.

Firstly, on your dashboard you need to click on system in the left panel, this will bring a drop down menu, click on settings. Click on edit settings, then the mail tab (my first post has more about this if you need help finding it).

That will bring you to this page.

Mail Settings


  • In the mail protocol box it is currently set to mail, this did not work for me, so i set it to SMTP.
  • The mail parameters i left blank.
  • SMTP hostname for me was smtpout.secureserver.net, this is through go daddy. To find yours go on host account settings and copy what is in the outgoing mail server field (SMTP).
  • Username is your SMTP username, mine is my email address. If your not sure this can also be found in your hosting account settings.
  • Password is your SMTP password, again if your user it should be in your hosting account settings. 
  • SMTP Port, this is automatically set to 25, this would not work for me at all. I changed this to 80.
I left the last two fields the way they are. 
Once you have filled all the information in it should look like this. (With your username and password added).
Mail Settings.
Save these settings. To test if my mail settings have worked I go to my website (as though I am a customer). Find the contact us page, then you will be directed to the contact form. 
Contact Us.
Fill in the form on the contact page and send. The email should come through instantly, I think the maximum time I have waited is 15 seconds. 
Contact Form.
Email.

This may not work for everyone and you might have a different method to test if your email system works. This worked for me and I found it the easiest way, so I thought I would share. 

Sam





Setting Up Opencart.


For this tutorial I will be showing you how to set up opencart for an ecommerce website. 



Mobile

I am using opencart 2.1.0.2 and the default theme to build my store, this works on desktop, tablet and mobile.

Desktop

                                                   








Firstly you need to access your opencart administration, to access this type www.yourwebsitename.com/admin or http://localhost/opencartstore/admin in to your browser, you will then be asked to login with the username and password you created when installing opencart. You will then be directed to the opencart dashboard.
On the panel on the left hand side of the page, you need to click on systems. This will show a drop down menu and you need to click on settings.
Dashboard

Once in the settings there will be a table your store name (default), your store url and a button for editing. Click on the edit button (pencil icon), you will be directed to this page.

Systems-settings-edit.

Now to edit the settings.You don't have to edit them all, just the ones with red stars next to them but I will go through them all. Most are self explanatory. 

General Tab:
  • Meta Title - Insert the name of your store, this will appear in the top left hand corner of a browser.
  • Meta Tag Descriotion - Enter a description of your store, this is often used on search engine result pages.
  • Meta Tag Keywords - Enter some keywords to describe your store, these keywords get your store listed in search engines (although not many big search engines use this anymore).
  • Template - Will be set at default, change to what template you want to use.
  • Default Layout - Leave at default or change to what suits your store best.
Store:
  • Store Name - Change to what you want to name your store.
  • Store Owner - Name of the store owner.
  • Address - Address of where your business is located.
  • Geocode - Enter geographical coordinated (longitude and latitude), this will display a map of your location.
  • Email - Enter the email address you will be using for your business.
  • Telephone - Enter the business telephone number.
  • Fax - Enter the business fax number. 
  • Image - Upload your store logo.
  • Opening Times - Store opening times.
  • Comments - Any information you want your customers to know.


Local:
  • Country - Which country you are located in.
  • State/Region - Which state or region you are located in.
  • Language - Preferred store language.
  • Administration Language -Preferred admin language.
  • Currency - What currency your store will be using. 
  • Length Class - Length measurement preference.
  • Weight Class - Weight preference. 


Option:
  • Category Product Count - Shows the number of products inside a subcategory.
  • Default Items Per Page (Catalog) - How many catalog items are shown on a page.
  • List Description Limit - The short description character limit.
  • Default Items Per Page (Admin) - How many admin items are shown on a page.
  • Allow Reviews - Product reviews from customers.
  • Allow Guest Reviews - Product reviews from guests.
  • New Review Alert - Receive an email when a product is reviewed.
  • Voucher Min - The minimum amount a customer can spend on a gift voucher.
  • Voucher Max - The maximum amount a customer can spend on a gift voucher.
  • Display Prices with Tax - Show product with or with out tax included.
  • Use Store Tax Address - Use the store address to calculate tax if no one is logged in.
  • Use Customer Tax Address - Use the customers default address to calculate tax when a customer is logged in.
  • Customers Online - Track your online customers.
  • Customer Group - What your default customer group is.
  • Customer Groups - Customers can select what group they are when signing up (wholesale, business).
  • Login Display Prices - Allow customers to view product price only when they are logged in.
  • Max Login Attempts - How many login attempts a customer has before they are locked out for an hour.
  • Account Terms - Customers to agree to terms before they can create an account.
  • New Account Alert Mail - Receive an email when a new customer creates an account.
  • Invoice Prefix - Invoice ID.
  • Display Weight on Cart Page - Show product weights on cart page.
  • Guest Checkout - Allow customers to check out without making an account.
  • Checkout Terms -  Customers must agree to terms before they can checkout.
  • Order Status - Status when order is being processed.
  • Processing Order Status - The status orders must reach before it is deducted from stock, vouchers are given or rewards.
  • Complete Order Status - Status an order must reach before a customer can access downloadable goods.
  • Fraud Status - What to do when a customer tries to alter the order payments.
  • New Order Alert Mail - Send an email when a new order is placed.
  • API User - API user the admin should use.
  • Display Stock - Show stock on product page.
  • Show Out Of Stock Warning - Display out of stock on cart page.
  • Stock Checkout - Allow customers to checkout even if stock is sold out.
  • Affiliate Requires Approval - Automatically approve new affiliates.
  • Automatic Commission - Automatically add commission when a order reaches  the completed status.
  • Affiliate Commission % - What percentage an affiliate receives in commission. 
  • Affiliate Terms - What a new affiliate must agree to before creating an account.
  • New Affiliate Alert Mail - Receive an email if an affiliate registers an account.
  • Return Terms - What terms a customer must agree to before they can return an item.
  • Return Status - What status to show when a return submission is made. 
  • Captcha - Captcha to use for registration, reviews, contact and login.

Image:
  • Store Logo - What logo to use for your store.
  • Icon - Image that shows on the browsers tab.
  • Image sizes can be set to own preference.
FTP:
  • FTP Host - Host.
  • FTP Port - Port number.
  • FTP Username - Username.
  • FTP Password - Password.
  • FTP Root - Directory (opencart is usually public_html).
  • FTP Enable - Enable FTP.
Mail:
  • Mail Protocol - Choose mail or SMTP (standard mail unless your host has disabled the php mail function).
  • Mail Parameters - When using mail additional mail parameters can be added (email@yourstore.com).
  • SMTP Hostname - SMTP Host name and add tls:// if security connection is needed.
  • SMTP Username - SMTP Username.
  • SMTP Password - SMTP Password.
  • SMTP Port - Port Number, typically 25.
  • SMTP Timeout - The time in seconds allowed before connection time out.
  • Additional Alert Emails - Other email address that you want to receive the alert, alongside the store email. 
Server:
  • Maintenance Mode - Stops customers browsing your store.
  • Use SEO URLs  Enable OpenCart's SEO keyword functionality for information, category, manufacturer and product pages. This requires a correct .htaccess file.
  • Robots Add or remove bot user agents from accessing shared sessions.
  • Output Compression Level The level of HTTP compresion to be used in your HTTP headers.
  • Use SSL Enable HTTPS on your store. This requires a valid SSL certificate installed on your web server.
  • Allow Forgotten Password Allows admin to request a new password if it is forgotten.
  • Use Shared Sessions Enables session information stored from the shopping cart to be shared between multiple domains/stores.
  • Encryption Key Enter a combination of numbers and letters to encrypt private information.
  • Max File Size - The maximum image file size you can upload in image manager.
  • Allowed File Extensions Add or remove the file formats that can be uploaded to your store's server.
  • Allowed File Mime Types Add or remove allowed mime types.
  • Display Errors Whether to display the PHP errors, warnings and notices produced by your store. This should be set to "No" for a live store.
  • Log Errors Whether to log PHP errors, warnings and notices produced by your store.
  • Error Log Filename If Log Errors is set to "Yes", the file where errors will be logged.
Hope this helps.