Book Image

Instant E-commerce with OpenCart: Build a Shop

By : Murat Yilmaz
Book Image

Instant E-commerce with OpenCart: Build a Shop

By: Murat Yilmaz

Overview of this book

<p>For years, starting an e-commerce shop was considered a hard task with the need of a significant amount of money, time, and resources. OpenCart makes this process easier and enables anyone to create an attractive and profitable e-commerce solution. This concise guide will show you how to create a robust and striking online store with OpenCart.</p> <p>"Instant E-Commerce with OpenCart: Build a Shop" teaches you how to build your own online shop with step-by-step, easy-to-follow instructions. You will learn how to install, configure, and customize your own shop in order to create an attractive and fully functional store in no time. If you have always wanted to create an online shop, but don’t know how, then this book is for you!</p> <p>In "Instant E-Commerce with OpenCart: Build a Shop", you will be taken through the required steps to create an awesome e-commerce solution. This book starts by showing you how to correctly set up and install OpenCart, before moving on to creating products and their attributes.</p> <p>If the world of payment gateways and shipping options sounds complicated, don’t worry. This guide will take you through the essentials required to set up and manage how your customers are going to pay for and receive their orders! Finishing with vouchers, templates, and SEO, this book will ensure you end up with a powerful, attractive, and profitable online store.</p>
Table of Contents (7 chapters)

Configuring shipping methods (Intermediate)


There are many shipping methods that OpenCart supports. In the following pages, we will learn how to implement the most popular ones.

How to do it...

Let's learn how to limit the purchases from our shop to specific countries.

Accepting orders only from certain countries

We will now learn how to disable orders for the countries to which we don't want to ship items.

  1. Go to System | Localisation | Countries. You will see a list of all the countries of the world on the Countries page. Choose any one of them, set the Country Status to Disabled, and click on the Save button.

  2. We need to repeat this process for each country we don't want to ship to.

Shipping methods

The methods we will cover in this recipe are free, per item, weight-based, UPS, and USPS shipping.

Free shipping
  1. Let's go to the Extensions menu and click on Shipping. Then, click on the Install link next to the Free Shipping option. The following screen shows up after we enable it; here we will define that every UK Shipping geo zone order that exceeds 200 in total (that is, every order for which the total price exceeds 200 in the default currency) will have no shipping costs. The other customers will not even be able to see the free shipping offer.

Weight-based shipping
  1. Let's go to the Extensions menu and click on Shipping. We need to install and edit the weight-based shipping method. Open the General tab. The Status field has to be set to Enabled here for the Tax Class we use for the definition of our items in the store. Then, we will need to define the shipping rates for the geo zone we want, for example, UK Shipping.

  2. Let's fill in the Rates textbox with 1:10.00 , 2:17.00 , 5:35.00 , 10:60.00.

  3. Now change Status to Enabled.

  4. Now let's edit the weight of a product on the store. It is on the Data tab under Catalog | Products. The example shows a value of 1 kilogram:

  5. Let's log in to the system with a test user account that has an address from the UK. Let's add this product with quantities of one and two units separately and check the shipping options for each. The following screenshot shows the different weight-based shipping rates according to the total weight proposed to the customer:

UPS
  1. Let's visit the website https://www.ups.com/upsdeveloperkit.

  2. We need to register on this page. Upon successful completion of the registration, we will log in to the system and request an access key.

  3. The request would require a real UPS account. You can open a new account or connect an existing account now. After all these steps, we will get an access key that we can use in OpenCart.

  4. After this, we can go to Extensions | Shipping and activate the UPS method, and provide the access key along with our username and password on the developer system. Let's not forget to change the Status to Enabled and choose the mode correctly (test or live).

USPS
  1. Before starting, we need to open an account on the WebTools service web page. It is located at https://secure.shippingapis.com/registration.

  2. The account is opened on the test server by default. On completion of the tests, we will need to send an e-mail to USPS to activate production mode. After the change, we can offer this shipping method to the customers. Again, we provide the information for USPS using the Shipping section under the Extensions menu.

How it works...

By default, an OpenCart shop allows ordering for all the countries of the world upon installation. Generally, online stores accept orders only from a certain set of countries or regions. We have learned how to limit the purchases to specific countries.

Free shipping

It is possible to give customers the advantage of free shipping if their shopping cart value exceeds some predefined value.

Note

It is not possible to set different free shipping minimum totals for different geo zones for this OpenCart version at the same time. So we cannot offer, say, 200 for the UK, and 300 for Germany.

Weight-based shipping

This is one of the most popular shipping methods for online stores. The final shipping cost is calculated according to the weight of the products in the cart.

UPS

UPS (United Parcel Service) is the world's largest package-delivery company. OpenCart has a built-in shipping module for when shipping with UPS. Before we integrate UPS into OpenCart, we need to get a username, password, and a special XML key from the UPS Developer website.

USPS

USPS (United States Postal Service) is the official post office of the US government, so it is available only in the US.