Create a new language for Magento 2 theme

When doing your business globally, having a multilingual store is a smart step to take.

By default, Magento 2 enables you to localize your store in multiple languages easily with the help of translation dictionaries and language packages:

  • A translation dictionary refers to a comma-separated value (.csv) file which is a convenient way to create translation for a custom module or theme.
  • A language package is a collection of translation dictionaries for all words and phrases in Magento 2 application.

This article will guide you through the process of creating a new language for your Magento 2 theme. For demonstration purpose, we will use our Magento 2 theme -- Crafts 2.0 -- as an example and explain how you can add the German language as well as the English language that is set as default in the theme. Continue reading

Magento 2 multi stores

This second article in the Magento 2 multi-stores tutorial shows how you can create multiple websites, stores, and store views in Magento 2. Check out Part 1 to catch up on the topic.

For the purpose of this tutorial, let’s assume that we need to create a Magento 2 multi-store structure including:

  • The 1st Website (samplefashion.com) with two store views -- English and German
  • The 2nd Website (samplekidstore.com) with one store view -- Kidstore

Set up Magento 2 multi stores

Set up Magento 2 multi stores

Continue reading

Magento 2 multi stores

One of the most exciting features of Magento 2 is the ability to set up multiple websites or store views from a single Magento 2 backend and codebase.

For example, you might have different sites per market -- a men’s clothing store, a woman’s clothing store, and a kid store; and each store uses different languages, domain names and categories as shown below: Continue reading

Manage Magento 2 cache

Magento 2 employs backend caching at many levels within the system -- File System (default), Database, Redis and Varnish, which is used to store web pages to speed up the load processes and improve your Magento 2 site performance.

In this post, we are going to introduce a couple of handy CLI (Command Line Interface) commands -- one of the simplest methods to manage your Magento 2 cache. We will also make a short overview of Magento 2’s default cache backend solution -- file system; the difference between cache:flush vs. cache:clean.

Let’s roll in. Continue reading

Compile LESS to CSS

Magento 2 utilizes the LESS preprocessor to simplify theming. This makes theme customization intuitive and promotes the writing of reusable and maintainable CSS codes through features like variables, mixins, and inline imports.

From standpoint of a frontend developer, LESS compilation (aka CSS preprocessing) is one of the most important part of M2’s static content deployment that you work most of the time on your Magento 2 custom projects.

To help you understand the context of this subject, this post will explain in brief about the LESS preprocessor for Magento 2, three types of LESS compilation. It also walks you through steps to compile LESS in server-side compilation mode for customizing your theme styles. Continue reading

Fixing URL Rewrites issue

You might be familiar with the option to add URL Rewrites in both Magento 1 and Magento 2, which is also referred to Search Engine Friendly URLs. Sometimes URL Rewrite issues arise when migrating data from Magento 1 to Magento 2. This guide will help you in troubleshooting when you encounter such issues.

What is URL Rewrite?

URL rewrites make it possible to make your existing Magento store URLs more ‘search engine friendly” and also easier for visitors to read.

Within Magento, the system URL looks similar:

  • For a Product URL: /catalog/product/view/id/10
  • For a Category URL: /catalog/category/view/id/11

The ‘catalog’ segment refers to the Catalog module of the Magento core, followed by other segments indicate that a product with ID 10 or a category ID 11 should be displayed on the page. No matter how often the URL changes, these ID remains the same.
Continue reading

Magento 2 CLI

Magento 2.0 has a Command-Line Interface (CLI) to help developers manage installation and configuration tasks. It saves a lot of time for developers during the development time. The new command-line interface can do many things, such as:

  • Installing Magento
  • Clearing the cache
  • Managing indexes, including reindexing
  • Configuring and running cron
  • Compiling code
  • Setting the Magento mode
  • Setting the URN highlighter
  • Creating dependency reports
  • Creating translation dictionaries and language packages
  • Deploying static view files
  • Creating symlinks to LESS files
  • Running unit tests
  • Converting layout into XML files
  • Generating data for performance testing
  • Creating CSS from LESS (CSS real-time compilation)

Let’s see how this feature works. Continue reading

Infographic Magento 1 vs Magento 2 Database

Starting from the early 2015 when our development team was working on the first instance of UB Data Migration tool, we had chance to dive in and explore Magento 2, especially the differences between Magento 1 and Magento 2 database. And we see there are a significant number of changes in the database structure that are worth highlighting.

It took us pretty much of time to update the changes in accordance with Magento 2 development process. However it’s beneficial to our internal product development indeed. And we think this would also be good to anyone new to Magento 2 who wants to become familiar with the key changes in Magento 2. So we end up with the idea to create an infographic that puts those findings together.

The infographic is formatted to give a quick overview of key changes in Magento 2 database structures, compared to Magento 1. Please note the comparison is for quick reference rather than detailing every aspect of the database. Continue reading

Effective landing page part 2

Knowing the difference between a landing page and homepage designs and when to use them can take the success of your Magento store to the next level. In here lies the effectivity of your company promotion and increasing conversions. To get you started, let us begin with a detailed and neutral comparison between these two important pages:

1. Two different types of visitors

Landing page

Visitors who end up here usually do not intend to get to your page. Often, these people do not even know you. However, they found something online that linked back to this page. The most common scenario before arriving in your landing page is that they might have been searching for items or services and you might just be what they need.

Homepage

Your homepage visitors, on the other hand, probably know you already. Most likely, they got to your page by intention, typing your web page address on their search bar. Whether through word-of-the-mouth advertising or they came across your company name from other sources, their common ground is that they have heard about you and what you do. Continue reading