Written by Graham Jones
It wasn’t long ago when we heard the words “I’ll be back,” strewn across the screens of millions. Where a black sunglasses and leather clad Arnold Schwarzenegger stands with a smoking shotgun. He came from a devastated and desolate future ruled by the cruel superintelligence of SkyNet with the steel fist of the Terminators. Is this what is waiting right around the corner for humanity in the years to come?
What is Artificial Intelligence (AI)
According to Merriam Webster:
- a branch of computer science dealing with the simulation of intelligent behavior in computers
- the capability of a machine to imitate intelligent human behavior
AI is the use of predictive algorithms that use social trends to come to outcomes and that account from previous interactions. Using these features to emulate human behavior and intelligence. See, it isn’t always a robot from the future with a shotgun!
When will Artificial Intelligence be in our Daily Lives
I hate to break it to the people out there terrified by the fact of Artificial Intelligence (AI), but it is already a part of daily life. Have you ever searched on Google and the drop down attempts to guess the search result. That is AI. When you use Siri or Google Assistant to see what the weather outside is. That is AI. When you get a fraud notification from your bank stopping a possible threat to your identity. That is AI. I know this might be frightening, or surprising information to some. However, this can possibly help your e-commerce site get to the next level.
How can AI Help Improve E-Commerce Sites
Chatbots allow a way to provide customer service while simultaneously freeing up human resources saving you money and employee frustration. They provide quality customer service 24/7 with quick responses that can satisfy the most frustrated of customers. Using Chatbot AI it can reduce user errors. Plus they can sprinkle some humor into any conversation, and they never are in a bad mood.
Through the use of Artificial Intelligence inventory has never been easier to manage warehouse inventory around the world. AI has the capability to predict demand based on algorithms and external data. It can sort through massive amounts of data to determine trends and help keep items in stock. Adding the fact that robotic automation is helping save costs, streamlining production, and eliminate user error. Keeping your customers happy and your profits up.
Through the collection of previous users and visits to a website, AI can determine trends and pinpoint products that a specific customers might want. This provides a personal touch to an immersive website experience that allows the customer to see the products they want. Not having to wade through products that are less desirable can make the shopping experience even more streamlined.
So about the Takeover…
AI contributes to our daily life constantly whether we notice it or not. The desolate future that we see in the movies is not an issue of today. It isn’t evil, but a beneficial tool. Why not let it be a solution or improvement to some of your e-commerce needs? Let Magento be the catalyst to improving your business. Contact Crimson Agility for your Magento needs “come with us if you want to live” and get even higher profits.
About the Author: Originally from Canada, My family and I moved down to Arizona when I was young providing me the great opportunity to grow-up in this beautiful state and country. I previously worked in the medical field as a Quality Assurance Manager, and was given the great opportunity to break into the field of eCommerce. I am excited to work for the Crimson Agility Team as a QA Analyst!
Written by Rich Samartino
One of the driving principles in software development is DRY – ‘Don’t Repeat Yourself’. This has led to the rise of package managers like PHP’s Composer, which is utilized by Magento 2 – one of the key differentiators between it and Magento 1.
In a similar way, Magento 2’s usage of the Less CSS preprocessor allows frontend developers to join the DRY movement. Instead of redeclaring font colors, page widths, or input border styles in multiple places, CSS preprocessors allow these values to be declared as variables.
An even more powerful feature is mixins, which allow entire blocks of styles to be declared as a kind of function, with or without arguments, that can then be used in multiple places. It is similar in concept to declaring a PHP abstract class which is then used as-is or modified by the implementing child class.
The Magento team built an extensive frontend library utilizing Less variables and mixins so that developers can customize the default theme with minimal amounts of custom code. Below, I’ll show some examples how to do this, and highlight some other useful features to make your frontend Magento 2 development a little easier.
Utilizing the Magento UI Library
As documented in Magento DevDocs, your custom theme can totally transform the look and feel of default Magento styles simply by redefining a few Less variables, as shown in this example:
Ideally, your variable redefinitions should go in
<theme_dir>/web/css/source/_extend.less (they can also go in
<theme_dir>/web/css/source/_theme.less, but this will override the parent theme’s
One question is, how do you know which variables to override? Consult the Magento UI Library docs, or inspecting default styles in the browser (made easier with CSS source maps and Grunt, covered below), will reveal which Less mixin is outputting the style, and inspecting that mixin will tell you which variable contains the value you want to change.
For example, the Luma theme styles primary action buttons here with a mixin defined here. Looking at that mixin, you can see that various button styles default to Less variables; for example the background color defaults to the
@button-primary__color variable. So, redefining the
@button-primary__color in your
_extend.less file will change the background color of those buttons throughout the website.
It’s worth reading through the DevDocs on this topic and familiarizing yourself with all of the different mixins and variables used by the UI Library because it will save you a lot of lines of code now and make your styles much more maintainable and extendable in the long run – unless you’re a WET programmer – ‘we enjoy typing’ 😉
Using Mixins Defined in _utilities.less
Some handy (and less documented, as far as I can tell) mixins are located in _utilities.less. Some styles, like flexbox, require vendor prefixes to maintain compatibility with older browsers. Magento wrote a mixin to save you from typing out these prefixes. There’s also a more generic
.lib-css() mixin that will output these vendor prefixes for any CSS style if the
@_prefix argument is specified.
Again, it could be worth spending a few minutes perusing
_utilities.less since some other handy mixins are included, like .lib-url which makes referencing asset urls a little easier (but mysteriously isn’t used in core code anywhere…)
All Styles Should Be Wrapped in Magento Media Query
Personally I don’t think this was a great idea by Magento, but all styles, even those which don’t target a certain screen size, should be wrapped in a media query, or else they will be output in both
styles-l.css, making browser debugging harder and file sizes bigger. You can find many examples of these media queries in core code, including here.
Compiling Styles with Grunt
Your frontend development will be made much easier by using Grunt to compile styles, rather than clearing pub/static and relying on PHP to process Less styles. Grunt compiles styles faster and produces CSS source maps, which allow you to see exactly which Less file styles are coming from in your browser. Grunt setup and usage is well documented here.
As you can see above, taking some time to investigate Magento’s Less-based UI Library will make writing styles for Magento much more interesting, less repetitive and more maintainable.
While this is all a great improvement over writing styles in .css files, technologies such as Less and Grunt, originally included in Magento during its development ~5 years ago, have been surpassed in popularity or technological superiority by Sass, Gulp, npm scripts, webpack and probably many other technologies I’m not aware of. Additionally, Magento might have chosen to base its default styles on a more actively developed library like Bootstrap, which can be included in a project’s build pipeline using Sass files and extended similarly to how I described extending Magento’s homegrown UI Library above.
So, try to master, but don’t feel limited by Magento’s default styles framework. Here at Crimson Agility’s Arizona office, our goal is to make your code as DRY as the Sonoran Desert 🙂
About the Author: Drawn to the open source, modern architecture of Magento 2, Rich has channeled his passion for technology into mastering the trade of E-Commerce Engineer. Originally an IT major, Rich spent several years away from technology exploring many ‘offline’ aspects of life, picking up skills such as knitting and guitar-playing, but eventually gravitated back to technology to build web applications for several nonprofits. With the seed of object-oriented web development planted, Rich continued to blossom as a web developer with an innovative sleep technology company, playing an integral role in launching its new Magento 2 website. Hungry for more Magento 2 experience, Rich has landed at Crimson Agility, where he looks forward to applying his talents to build you a great website!
Written by Erica Summers
What are you really getting out of a team of Magento experts? Why pay the extra fee to do something the “best practice” way, instead of the quickest or cheapest? And what will one approach versus another cost you in the long run?
If you ever hear from a development team about doing things to follow “best practice”, or are working on estimating different tasks or features and get a few different approaches and time estimates, there’s a very important reason why. It comes down to the versatility of Magento. For instance, Magento’s open source platform has been around for over a decade. It’s a large, complex piece of software that is continually growing and changing, with a large worldwide community of developers continuously improving it. With this never-ending change and growth, code ends up being refactored, standards change, and new features are added. All of this translates into one important takeaway: there is no one way to get something done.
In fact, for any given task or feature there’s probably tens or hundreds of different ways to do the exact same thing, and at one given point in time some of them were the “best practice” way, but that changed and has now become obsolete.
So what does this mean for you as a client?
In short, it comes down to picking the right team and knowing you can rely on their expertise.
There is a growing number of Magento-specific developers and each will have their own way of doing things. Often, you get what you pay for, with cheaper services getting the same thing done but in a way that’s inefficient, disorganized, and ends up costing more in the long-run to fix or upgrade when needs change. Sometimes you’ll lose inbuilt Magento features, or they won’t work as intended because updates were not completed in a way that is upgrade-safe working within Magento official guidelines.
The value you get when working with a certified Magento partner is knowing that not only will the work get done and things will be up and running, but that we will ensure we are working within best practices, keeping up with the standards. This means you have a reliable site that leverages all the exciting inbuilt Magento features and is easy to upgrade, customize, or change. It gives you more flexibility, ability to grow, and reduce cost over time. It also means that you’ll work with a team who won’t just hack at the code to get something done, but will think critically about what the best approach is to get the work done, and how it might need to grow in the long run.
You need a team focused on the big picture. A team that’s dedicated to high-quality service, keeping up with industry standards, and is always learning and growing.
That’s where we come in.
How Can Crimson Agility Help you Graduate to Magento Commerce 2?
We have migration options! We offer three MAGENTO QUICK START PACKAGES that are fixed-cost implementation solutions. Our packages offer great price points whether you are a small business or large enterprise wanting to move to Magento Commerce. Making the move doesn’t have to be hard and will result in improved security & performance, seamless shopping everywhere with PWA, increased conversion rates, more streamlined operations, and a better overall end-user experience.
Contact us today and learn more, we are here to help and love what we do.