Thursday, February 4, 2016

How Digital Nomadism Turned Me Into a Highly Motivated Designer

Many of us dream of quitting our full-time roles to work from home, citing that they’d be able to work harder and ultimately earn more money. Plus it’d be real fun.

But it’s never quite as easy as that, is it?

It could be, but you’re simply not willing to stop watching those Ugly Betty re-runs or taking afternoon naps.

I’m completely willing to admit that I’m not one of those mature adults that can muster up the motivation to start work in the blink of an eye. It’s not for the lack of enjoyment either, the average household simply has too many tempting distractions: television, video games, Hulu, Netflix, comfy couches and more television.

Procrastination and Distractions

Being a Nomad, the First Two Months

No matter how many “How to Be a Super-Duper Motivated Designer” articles I read, I wasn’t strong-willed enough. I’d already quit my employment and the “just in case” money that I’d saved up was beginning to disappear. So we (my wife and I) booked a flight to Barcelona and there our digital nomad journey began.

It was one of those “now or never” type situations.

As I quickly realised, working from home in a new country is no different to working at home where you were born. Airbnb hosts can be very accommodating, offering the very best of Netflix and so on, and I’d even begun to justify my naps because everybody in Spain takes “siestas” in the afternoon. Whether that’s a myth or not, I don’t know, but I was inclined to believe it.

After a month in Lisbon, in what I would regard as a better apartment with lots of natural light and a huge, spacious work desk near the balcony, I found myself doing a little more work, but nonetheless, I was still very distracted and napping like a sloth.

Being a Nomad, the First Two Months

Returning Home

Because we had to celebrate a couple of family birthday’s, we came home for a month. I wasn’t disappointed with the digital nomad lifestyle, because in order to actually be a digital nomad you had to work, of which I did appallingly little of.

So I told everybody we had a smashing holiday – which we did.

I wasn’t happy being back in London – something about the weather, the impolite locals and the overall negative feelings associated with my experiences of growing up there weren't motivating me at all. In a matter of weeks, we sorted out our trip to Skopje, Macedonia; and that’s where things drastically improved.

Our Second Attempt

I’m one of those tourists that don’t speak a word of the local language (if I’ve been to your country, or it’s on my agenda, I sincerely apologize!), so we were delighted when everybody spoke English to us in Macedonia. With that in mind, and the fact that the cost of living was crazy cheap, we ate out almost every day.

We enjoyed sitting in the sun in their open-air restaurants, and I begun taking my laptop, remembering that I felt happy and somehow motivated when subjected to beautiful surroundings.

In our case, this was the famous Alexander the Great Fountain or the River Vardar. We would eat away, sip cocktails and to my surprise, I would design (and of course, write) some stuff.

Our Second Attempt

Returning Home, Again

My wife was offered a well-paying summer job and they wouldn’t take no for an answer, so we returned home for a lengthy two months this time. We took a holiday/detour to Venice and Paris for a few days and set our sights (to my dismay) on London.

I dreaded the thought of ruining my winning streak, but it was summer and a few local restaurants had opened up in the area. If I could do it in Macedonia, I could do it in London, I thought.

I even decided upon a 30-day writing challenge.

Continue reading %How Digital Nomadism Turned Me Into a Highly Motivated Designer%


by Daniel Schwarz via SitePoint

Foundation 6: The New Flex Grid

Last month I wrote posts covering what’s new in Foundation 6 as well a deep dive into Foundation’s new menu component.

Arguably one of the best parts of Foundation is the grid system. This system is the backbone of Foundation’s responsive design and gives you the flexibility to build anything from a simple two-column layout to a multi-level deep, intricate behemoth.

The grid is based on a responsive float system, with rows, columns, offsets, clearing (the standard elements you see across several frameworks). It’s worked great and overall is a great way to get up and running quickly with your designs, catering to the various device sizes and adapting your UI accordingly.

However, there’s a new system in play in Foundation 6.

[author_more]

Introducing: The New Flex Grid

In Foundation 6, Zurb has introduced the Flex Grid, an optional replacement for the standard grid.

Flex Grid, as you can guess, is powered by flexbox. Instead of using floats, offset positioning, and other tricks that the standard grid employs, the new grid system lets you take advantage of some of the powerful layout features of the flexbox model.

A word of caution before you jump in head-first: Since this new grid is powered by flexbox, naturally it will only work in supporting browsers. So if you need to support legacy browsers like IE8 and IE9 you will have to stick with the standard grid.

Flex Grid is Optional

Zurb doesn’t include the Flex Grid by default; it’s an optional component. If you’re using the Sass version of Foundation, start by finding the app.scss file inside your project and open it in your editor. Inside you will see the @include statements. You will need to remove or comment out the standard grid and add the flex grid, as shown below:

[code language="sass"]
// @include foundation-grid;
@include foundation-flex-grid;
[/code]

If you’re not using the Sass version and instead are creating your own custom build, you can include flex grid by choosing it from the customizer and downloading your combined CSS.

Choosing components for Foundation 6

The flex grid is meant to be used a replacement to the standard grid, so you can’t use both at the same time out of the box. This is because they share class names such as .row and .column.

If you want to use both, you need to employ the Sass build of Foundation 6 and define your own basic grid by using the mixin for the standard grid. This will let you define your own structure so you can keep both in the same project (for example you might call your rows .row-old and your columns .column-old).

Continue reading %Foundation 6: The New Flex Grid%


by Simon Codrington via SitePoint

Action Cable and WebSockets: An in-Depth Tutorial

One of the highly anticipated feature of Rails 5 is the official solution for integrating web socket communication with Rails, dubbed Action Cable. As a Ruby on Rails agency, we are very excited about this upcoming feature release. According to their Github page, Action Cable: […] seamlessly integrates WebSockets with the rest of your Rails […]

Continue reading %Action Cable and WebSockets: An in-Depth Tutorial%


by Kyle Szives via SitePoint

Adding Social Sharing in a Node.js Single-Page Application

Get 2TB of Cloud Backup for Life for $49

Get 2TB of cloud backup for life for $49

Between selfies, pictures of your cat, and every episode of Golden Girls, you could probably use a little extra storage space for your files. Why not get a lifetime of it? We've got a lifetime subscription to Genius Rescue's 2TB cloud storage for $49 at SitePoint Shop.

Save 94% off the regular price of $900 when you grab this deal. Genius Rescue installs easily and runs in the background, backing up your files to multiple servers (keeping your data as safe as possible). Back up any file type and access your files any time—you can watch your movies and listen to your music right from your browser or phone. And don't panic if you get a little delete-happy—Genius Rescue allows you to restore deleted files (as well as access older versions of them).

Give your computer a break. Get a lifetime subscription to Genius Rescue's 2TB cloud storage for $49.

Continue reading %Get 2TB of Cloud Backup for Life for $49%


by SitePoint Offers via SitePoint

Startuprr Conversion Optimized Landing Page

Startuprr - Conversion Optimize Landing Page HTML Template

The 'Startuprr' conversion optimized landing page template has been crafted to lock down leads and convert your products or services. It's great to see how Take-Themes actually commissioned CRO, SEO, SMO industry leaders to help consult on these layouts. This layout being my favorite out the 8 layouts available. The templates is of course 100% responsive and good to know it's built on the Bootstrap Framework.

by Rob Hope via One Page Love

Explore REST APIs in OpenCart 2.0: Part Two

In this series, we're discussing the REST APIs in OpenCart. In the first part, we went through the setup of API user credentials from the back-end. In this part, we'll extend it and go through the rest of the examples, showing how to set shipping, payment and customer related data in the cart. Finally, we'll conclude the article by placing an order!

If you haven't gone through the first part yet, I would recommend that you go through it. Let's have a quick recap of what we've done so far in this series.

  • We created API user credentials from the back-end.
  • We set up the common file which is used in all the examples to make curl calls.
  • We went through the API usage by providing examples of "How to log in", "How to add a product in the cart", and "How to edit a product in the cart".

Today, we'll extend our journey and see a couple more examples which we'll need to create a complete order in OpenCart using the API. We'll start from where we left the last part, so I assume that you've created the common.php, login.php, add_product.php and edit_product.php files already.

How to Add Shipping Information

To start with, we'll first add the shipping address.

How to Add a Shipping Address

Create a file add_shipping_address.php with the following contents.

We're passing all the required fields for the shipping address in the $fields array. You should see a "Success: Shipping address has been set!" message in case of success!

How to Add Shipping Method

Create a file add_shipping_method.php with the following contents.

To set the shipping method of the order, we should know which shipping methods are available in the first place. Thus, we've retrieved the list of shipping methods in the first CURL call in above example. I assume that you've enabled the "Free Shipping" method in the back-end, as we're going to use it as our shipping method.

In the next CURL call, we've passed the shipping_method code as an argument which is required to set the shipping method.

Finally, you should see "Success: Shipping method has been set!" method as a success. One important thing to note here is that the order in which you set "Shipping Address" and "Shipping Method" is important. First, you'll need to set the "Shipping Address" and after that you should make a call to set "Shipping Method".

How to Add Payment Information

How to Add a Payment Address

Create a file add_payment_address.php with the following contents.

This is almost identical to the "Shipping Address" example, except that it'll set the payment address of the order. You should see "Success: Payment address has been set!" in the case of success.

How to Add a Payment Method

Create a file add_payment_method.php with the following contents.

Again, pretty similar stuff as we did for the "Shipping Method" example. In the first CURL call, we've retrieved the list of payment methods, and fetched the code of the "Cash On Delivery" payment method. In the next CURL call, we've passed the payment_method code as an argument which is required to set the payment method.

As a result, you should see "Success: Payment method has been set!"

How to Add Customer Data

Now, let's go ahead and set up the customer data. Create a file add_customer_data.php with the following contents.

Nothing extraordinary—we've just passed the required customer fields to the API! The message "You have successfully modified customers" should give you the confirmation of success.

So far, we've set up everything nicely for our order. The only remaining thing to complete our order is to make an API call to create an order, and that's the recipe of our next section!

How to Create an Order

Create a file add_order.php with the following contents.

Although it's pretty simple code to create a new order, the important thing to note here is that you need to pass the "Shipping Method" as an argument. Yes, it's a bit weird as we've already set up the shipping method in the earlier example, but that's how it works at the moment.

So, that's the complete process to create an order in OpenCart using REST APIs. There are a few other APIs as well to set up coupons, rewards and vouchers, but for brevity I'll leave them for you to explore!

Conclusion

In this series, we've discussed the REST APIs in OpenCart. We took a ride through the PHP cURL examples to see the usage of the APIs. I hope that it helps you to integrate third-party systems with OpenCart. Don't forget to checkout our offerings in the marketplace, and don't forget share your thoughts on this exciting feature!


by Sajal Soni via Envato Tuts+ Code