Tuesday, June 21, 2016

5 Bankable UX Lessons from Brick &Amp; Mortar Store Design

Psychology plays a pivotal role in interaction design. In order to offer an optimal user experience, you have to empathize with the user and understand their intentions before they do. With this information, you can conveniently pave a direct path to where they want to go and insert your best content in their line of sight.

Let's discuss 5 ways that brick and mortar stores increase their sales by making (sometimes very small) changes to their store layouts, changes that can also be made to e-commerce stores.

1. Point Of Sale Add-Ons

Generally speaking, retailers will often front you with their most expensive items first (to play on your sense of comparison), making the cheaper items towards the end of your shop seem like more of a bargain. In retail stores, this is the usually confectionary stand by the checkout, or the "one-time-only" discount on selected CDs and DVDs before being asked to pay.

In e-commerce stores this is the "would you like to add [item] to your basket for only $0.99"? It may seem like trickery, but if the user walks away with what they feel is a bargain, they'll walk away satisfied - and they didn't even have to browse for it!

Fun-fact: when asked if a customer wants to upgrade (for example medium to large fries in McDonald's), 47% will say yes.

Pizza Hut Online Point of Sale

2. Store Layouts and Your Line of Sight

Many stores invest time and money in user testing, both online and offline. As a result, they're more aware of how customers tend to navigate themselves in their store; they can insert advertising between where the customer is, and where they might be going. In brick and mortar shops, advertising appears in your line of sight as you enter the shop, wait for an elevator, use an escalator or queue to checkout - this isn't by accident.

As with brick and mortar shops, ads are sometimes used near the online checkout (basket, cart, etc) interface as well, so that the user is sure to see it as they pay for their items - let's take Amazon (UK) for example.

Amazon Logo Advert

When shoppers first enter a brick and mortar shop, known as the "transition zone", they tend to start on the right-hand side (based on US research). However, with e-commerce stores, users tend to start from the top-left corner according to eye-tracking studies.

Amazon has also taken notice of this and advertised their Amazon Prime service near the basket, as well as underneath the logo.

04-amazon-checkout

3. "Look Here, Look Here! Do This, Do This!"

You can't retain a user if you never acquired them, which is why "subscribe for more" modals as soon as you enter a website, or "table for two?" before you've barely laid eyes on the menu outside a restaurant is a terrible idea. Restaurants aren't strictly a brick-and-mortar establishment (or are they?) but this example certainly makes us feel awkward and/or annoyed.

Here are two ways that you can handle this user flow:

  • No: "request" that the user subscribes, reward them with access
  • Yes: offer content first, suggest to subscribe after

You shouldn't reward users with basic web content for subscribing to your newsletter, instead you should reward users for reading the web content and reward them even more for subscribing - create incentives to engage further, offering the user free/discounted items or a higher level of subscription over time.

Let the user trust your content and see value first.

H&M Subscribe Footer

Continue reading %5 Bankable UX Lessons from Brick &Amp; Mortar Store Design%


by Daniel Schwarz via SitePoint

Using PHP CodeSniffer With WordPress: Installing and Using the WordPress Rules

Create a Custom API in OpenCart

You'll need to create custom APIs for unique requirements in your project development at some point in time, and that's what we'll cover throughout the course of this tutorial. In our custom API module, we'll fetch the list of all products available in the store, and it'll be a JSON encoded output as required by the REST standards in OpenCart.

I assume that you're familiar with the basic module development process in OpenCart. Here's a nice article providing comprehensive insight into the subject just in case you would like to skip through it. Another important point: I'm using the latest version of OpenCart, that is 2.1.0.2 as of writing this, and you should do that too to ensure the compatibility of core APIs.

Without wasting much of your time, I'll straight away dive into the practical stuff, and that's what the next section is all about.

A Glance at the File Setup

Let's have a look at the list of files required for the desired setup.

  • catalog/controller/api/custom.php: It's a controller file, and most of our application logic resides in this file.
  • catalog/language/en-gb/api/custom.php: It's a language file that holds language variables.
  • common.php: This file holds the common code for reusability purposes.
  • login.php: It's a file that demonstrates how to log in to the store using the REST API.
  • products.php: It's a file that demonstrates how to fetch products using our custom API module.

So, that's all it takes to set up our custom API module and test it using PHP CURL library.

We'll start with the controller file, go ahead and create a file catalog/controller/api/custom.php with the following contents.

Probably, it should be pretty familiar stuff if you're aware of the structure of OpenCart module files. However, we'll discuss the important snippets from the products method.

First of all, we have to check the authenticity of the request, and it's checked by the existence of the api_id variable in the active session. In the case of a valid and authenticated request, we'll go ahead and fetch all the products using the getProducts method of the core Product model. Of course, it'll give a permission denied error message in the case of invalid login.

Next, there's a generic security check to protect against CSRF attacks. It's accomplished by checking the existence of the HTTP_ORIGIN variable, and adding appropriate headers if it does exist.

Finally, we've used the json_encode function to encode the $products array, and the result is passed as an argument of the setOutput method.

Next, we'll go ahead and create a language file for our module at catalog/language/en-gb/api/custom.php with the following contents.

So, that's it as far as the OpenCart-related file setup is concerned. From the next section onwards, we'll create the files that help us test our custom API using the PHP CURL library.

How It Works

Before we go ahead and test our custom API module, you should make sure that you’ve created API user credentials from the back-end of OpenCart.

If you haven’t done so yet, it’s pretty easy. Head over to the back-end, navigate to System > Users > API, and add a new API user. While doing so, it’s important to note that you also need to add an IP address from which you’re supposed to make API calls.

Go ahead and create a common.php file and paste the following contents in that file.

As you can see, it contains just one function, do_curl_request, which will make a CURL call to the URL passed by the $url argument. The second argument is an array of parameters in case you need to POST the data.

The other important things to note are the CURLOPT_COOKIEJAR and  CURLOPT_COOKIEFILE settings. These set the file in which the cookies will be stored and read from. As we'll need to make authenticated calls, it's a must! Of course, you want to change the path /tmp/apicookie.txt according to your system settings. Make sure that it's writable by the web server too!

Finally, the function returns the response by the CURL request!

Obviously, the first thing to do is to start the session, and you'll need to use the login method. Let's have a look at an example. Go ahead and create a login.php file with the following contents.

First, we've included the common.php file created in the previous section. Next, the $url variable defines the API login URL of the OpenCart store. Next, the $fields array holds the API user credentials created earlier. 

Finally, we call the do_curl_request method to log in. Importantly, you should see a token variable in the $json object. Note down the value of that variable as we'll need to pass it while making subsequent API calls.

Next, let’s create a products.php file with the following contents.

The important snippet to note in the above example is the route querystring variable. It’s set to the api/custom/products value, which by convention calls the products method defined in the custom.php controller file created at the beginning of this tutorial. Also, we've passed the token variable along with its value to make sure that we have access to the API.

Anyway, what we’re interested in is the proper JSON encoded output in the $data variable. And that’s what you should see when you run the products.php file! It should work out of the box if you’ve created proper user credentials and set up the files as explained.

This is just scratching the surface of what the REST API in OpenCart is capable of. In our case, it was a pretty simple yet effective example to demonstrate the topic. Having said that, you could extend it and implement tailor-made solutions according to your requirements.

That’s it for today’s article. Don’t hesitate to ask queries and leave your suggestions as they are valuable!

Conclusion

Today, we’ve discussed how you could create a custom API in OpenCart by creating a custom module. In the process, we went through the complete workflow to achieve the aforementioned functionality.

You could reach me via the feed section below, and I also spend a bit of time on Twitter if you prefer to contact me there!


by Sajal Soni via Envato Tuts+ Code

9 Time-Saving Tools for Social Media Marketers

ao-visual-content-improves-600

Do you need to spend less time on repetitive social media tasks? Are you looking for tools that let you balance automation with a personal touch? In this article, you’ll discover nine tools to help marketers save time while maintaining a human presence on social media. Relationship-building Tools Just like any relationship, connecting on social [...]

This post 9 Time-Saving Tools for Social Media Marketers first appeared on .
- Your Guide to the Social Media Jungle


by Aaron Orendorff via

4 Practical Laravel Courses for PHP Developers

Laravel is a PHP framework for modern web apps. Recently upgraded to version 5, Laravel is a mature system that continues to win support due to its elegance and stability. Laravel ships with built-in support for database migrations, object-relational mapping, routing, and authentication, making it easier for developers to start and maintain their work.

If you want to learn Laravel, or if you already use the framework and want to take your knowledge to a new level, check out these four courses, which will teach you to master Laravel 5, process payments with Laravel Cashier, build a CMS with Laravel, and understand Laravel Router.

1. Get Started With Laravel 5

In this course, you'll start with the basics of the Laravel framework. You'll begin by preparing a dev environment and learning how to configure Laravel. Then you'll move on to learn foundational topics such as routing and requests, responses, views, sessions, emails, forms, and using databases.

2. Process Payments With Stripe and Laravel Cashier

Stripe is a payment-processing service that comes with a suite of easy-to-use APIs and powers e-commerce for businesses of all sizes. 

In this course, Envato Tuts+ instructor Jason Lewis will show you how to process payments on Stripe using Laravel Cashier. You'll cover a number of key topics, including how to prepare your database for payments and pointers to the security concerns you should be aware of when handling cardholder data. 

You'll also learn how to process single, one-off payments for an online shopping cart, and even how to handle Stripe subscriptions.

3. How It's Made: Laravel Router

Laravel is known for its powerful and developer-friendly router. The router allows you to configure all the URL endpoints of your app with a concise syntax and all in one place.

In this quick Coffee Break Course, Envato Tuts+ instructor Matthew Machuga will take you on a deep dive through the implementation of Laravel Router. You will see how it works, and stop to analyze some of the decisions and nuances in its design. You'll also get a chance to see some of the awesome features that have been recently added to it.

4. Build a CMS With Laravel

In this course, Envato Tuts+ instructor Jason Lewis will show you how to build a functioning content management system (CMS) with the Laravel PHP framework. You’ll understand some of the tasks and problems that are common to so many web development projects and explore different possible solutions to them. You’ll be starting your CMS from scratch—a great way to expand your knowledge of the Laravel framework. This course will teach you the fundamentals required to develop top-notch Laravel applications.

Start Learning With a Free Trial

You can take all of these and more PHP courses with a free 10-day trial of our monthly subscription. So get started today, and start learning the practical Laravel skills that will take your PHP development work to a new level.


by Andrew Blackman via Envato Tuts+ Code

KM05 | KITAMURA MAKURA

Everyone, 30 rotations, a Night
by via Awwwards - Sites of the day

6 Publishing Tools From Facebook for Marketers

kh-facebook-publishing-tools-600

Have you explored the Publishing Tools section of your Facebook page lately? Wondering how the new features make marketing easier? Your page’s Publishing Tools section contains a lot of important features including video management, lead generation, and product sales. In this article, you’ll discover how to better manage your Facebook marketing with six Facebook publishing [...]

This post 6 Publishing Tools From Facebook for Marketers first appeared on .
- Your Guide to the Social Media Jungle


by Kristi Hines via