Selling Bundles the Right Way on Magento 2

Magento has a variety of product types to help you find the right way to sell your products. There are downloadable products for digital items (such as ebooks), virtual products for items with no tangible deliverable (such as warranties), and configurable products for variations (such as a shirt that comes in different sizes). One of the most powerful types available is bundle products. In my experience, this is the least used product type, and I believe there are several factors influencing its sparse appearance:

  • External Integrations – Whether you’re pulling product data into Magento or pushing order data out, few systems match up with Magento’s concept of bundles.
  • Labor-Intensive Product Creation – Bundle products just take more time to set up than most other product types.
  • No Need – Many merchants simply find that they don’t sell any products in a bundle format.

Now let’s take a look at the upsides of bundle products by breaking down what they are and how you can leverage them to sell more in your store.

What is a Bundle Product?

In a nutshell, bundle products are a way of selling several products together as a single package. This is really a great opportunity for merchants since it’s a form of upselling. More than that, it’s a very targeted form of upselling, and Magento gives you the flexibility to really make it worth the customer’s while.

The bundle product is just a shell, and ultimately it contains the products that you’re already selling on your Magento store. Let’s say you sell musical instruments. You’d love it if that customer would add some cymbals and drumsticks to their drum set purchase. Rather than just showing related products and upsells during their purchase experience, you can create a bundle. By doing this, you encourage the customer to increase their order total, and you also give them confidence that the products they’re buying are compatible with each other.

You can read about creating and configuring bundle products in the official user guide, but I’m going to cover the basics of how bundles are put together.

Bundle Options

The basic architecture of bundle products is their options. Options are the components that make up the bundle. Each option offers a selection of products that can fill that slot. Let’s look at our drum set bundle. It’s going to have the following options:

  • Shell Pack (the drums themselves)
  • Crash Cymbal
  • Hi Hat
  • Drum Sticks

At a basic level, those are the things included in the bundle. For each of those options, there can be multiple products to choose from depending on your preference. My product represents a bundle around a Yamaha Stage Custom shell pack, so I’m only going to offer one product for the Shell Pack option. However, the customer will be able to choose from multiple brands to fill the Crash Cymbal, Hi-Hat and Drum Sticks options.

You can make each option required or optional, set default quantities for selections, and choose whether or not the customer can define their own quantities.

For my product, most of the options are required and have an unchangeable quantity of 1. However, the drumsticks are an optional add-on, and the customer can modify the quantity. This ensures that someone new to drum purchasing doesn’t accidentally buy things they don’t need, but they can buy a few extra pairs of sticks from the same product page.

Bundle Pricing

Pricing for bundle products is flexible. All of the simple products that can end up in my bundle have their own prices in Magento, but do I want to discount them when bundled?

In this case, I do. Depending on the products selected, the sum of the items in my bundle could range from $1,204 to $1,229. To encourage customers to buy my bundle, I’m going to price it at $1,100. The Shell Pack, Crash Cymbal, and Hi-Hat selections will be included at no additional cost. For the sticks (which are optional), I’m going to price them at $5 per pair. This is still a good deal, as the simple products for the drumsticks would be $8 if added to the cart separately.

To set up this kind of pricing, I set Dynamic Price = No when creating the bundle. This allows me to set a base price for the bundle, then optionally attach prices to each option selection. This gives the products specific prices in the context of the bundle, but the pricing of the simple products has no impact on my bundle.

If I don’t want discounts for my bundle, I can set Dynamic Price = Yes. Instead of manually setting prices on my option selections, the bundle will automatically sum the simple product prices. The user won’t save any money buying the bundle, but they’ll still benefit from a more guided shopping experience.

Bundle Data Architecture

You may be thinking that bundles sound great in theory, but how do they work out with other eCommerce elements? How does shipping calculation work? What does the data look like when orders are exported to an external system?

There’s some flexibility around the data. From a shipping perspective, bundles offer a Dynamic Weight option. If set to Yes, the weight of the bundle product in the cart will be the sum of all simple product weights in the bundle. This ensures that the final weight will be accurate for the purpose of getting shipping rates. If set to No, you can assign a static weight to the bundle that will be unaffected by the customer’s selections.

There’s also an option for Dynamic SKU. When set to Yes, the final SKU of the item will be a combination of the bundle product SKU and those of all the simple products included.

The final order data contains quite a bit of information about the bundle. It contains the bundle itself as well as a row for each product that ended up in the bundle. Those rows contain the SKU and quantity of the simple products. This is nice if you have an external integration consuming order data for things like inventory tracking, as it allows you to examine the tangible products that were sold.

Challenges with Bundles

Bundles are a complex concept, and every merchant will leverage them a little differently. I completely respect the logic that the Magento core uses with bundles, but it’s definitely not a “one size fits all” scenario. I’d like to look at some of the specific challenges I’ve seen merchants run into, and the solutions we implemented to get the logic just right.

The “Primary Product” Dilemma

Bundles work really well out of the box to sell several related products together. However, they don’t work as well to represent a primary product with add-ons. Last year, I had a merchant who sells espresso machines. They often include items with these machines, such as a bag of espresso beans or an extended warranty. They needed these freebies to be clearly represented on the product and cart pages, and they also needed them to be individual items in the order data for the sake of inventory updates. The problem was that they really didn’t want to offer the “Customize and Buy” interface that Magento provides out of the box. There was really nothing for the customer to configure. All options were required and only offered one selection. They really just needed the customer to see what’s included and have an add to cart button.

We were able to work around this with a few layout changes and some strategic CSS adjustments. Within the bundle configuration, we hid the option labels and form elements, leaving only the names of the selections and the prices. We also moved the master quantity input and the add to cart button above the bundle configuration. The end result was a product page that’s nearly as basic as a simple product. Here’s the same treatment on our drum set bundle if it only had one selection for each option:

Note that this removes all configuration mechanisms from the page, so it’s really only a good fit for bundles with static selections.

Shopping Cart Price Rules

When using shopping cart price rules, it’s important to be aware of the native behavior with bundle product children. Any conditions in a price rule will be triggered by the items in the bundle once it’s added to the customer’s cart. If this isn’t your intention with your price rules, you could get a nasty surprise when orders start coming in.

Let’s take our drum set bundle as an example. I have some surplus stock of Vic Firth drumsticks, so I want to offer a 50% off sale. I create a shopping cart price rule that takes 50% off of products where Brand is Vic Firth. This works great when customers go to the drumsticks category and purchase a matching simple product, but it’s less ideal when they add the drum set bundle to the cart. When configured to include the optional Vic Firth drumsticks, the 50% discount is applied to the entire bundle. In an effort to move some drumsticks, we’re suddenly giving away a $1,100 drum set for $550.

Unfortunately, there’s no configuration to change this behavior, but you can alter it with a small code change if necessary. The model responsible for this particular rule validation is MagentoSalesRuleModelRuleConditionProductCombine, and the relevant method is validate (defined in the superclass).

If we create a plugin for MagentoSalesRuleModelRuleConditionProductCombine, we can make sure that no bundle children are valid for shopping cart price rules.

public function aroundValidate(MagentoSalesRuleModelRuleConditionProductCombine $subject, callable $proceed, MagentoFrameworkModelAbstractModel $model) {
    if ($model->getParentItem() && $model->getParentItem()->getProductType() == 'bundle') {
        return false;
    }
    return $proceed($model);
}

Layered Navigation

Similar to the dilemma of shopping cart price rules, bundle children can also trigger unintended layered navigation behavior. Let’s say we put our drum set bundle in a Drum Sets category. Since the set is built around a Yamaha shell pack, we’ve set the brand on the bundle product itself as Yamaha. In layered navigation, we want the set to show up when Yamaha is set as the brand filter. Since we don’t expect customers to choose a bundle based on which drum sticks are included, we’d prefer that the bundle doesn’t show up when results are filtered to match a Brand value of Vic Firth.

Here’s the native handling of the bundle. Notice how every brand that’s available in our drum set bundle is present in the layered navigation:

Fortunately, we can exclude bundle child attributes from being considered in layered navigation with some minor code changes. The bundle child indexing occurs in MagentoCatalogModelResourceModelProductIndexerEavAbstractEav in the _prepareRelationIndexSelect method. Here’s the original code:

$connection = $this->getConnection();
$idxTable = $this->getIdxTable();
$linkField = $this->getMetadataPool()->getMetadata(ProductInterface::class)->getLinkField();
$select = $connection->select()->from(
    ['l' => $this->getTable('catalog_product_relation')],
    []
)->joinLeft(
    ['e' => $this->getTable('catalog_product_entity')],
    'e.' . $linkField .' = l.parent_id',
    ['e.entity_id as parent_id']
)->join(
    ['cs' => $this->getTable('store')],
    '',
    []
)->join(
    ['i' => $idxTable],
    'l.child_id = i.entity_id AND cs.store_id = i.store_id',
    ['attribute_id', 'store_id', 'value']
)->group(
    ['parent_id', 'i.attribute_id', 'i.store_id', 'i.value']
);
if ($parentIds !== null) {
    $select->where('e.entity_id IN(?)', $parentIds);
}

/**
 * Add additional external limitation
 */
$this->_eventManager->dispatch(
    'prepare_catalog_product_index_select',
    [
        'select' => $select,
        'entity_field' => new Zend_Db_Expr('l.parent_id'),
        'website_field' => new Zend_Db_Expr('cs.website_id'),
        'store_field' => new Zend_Db_Expr('cs.store_id')
    ]
);

return $select;

The query uses the catalog_product_relation table to identify parent / child product relationships, then joins the attribute index table on by child id.
This allows it to query the attribute values of child products of relevant parents. It also uses a left join to include the parent product.
It groups by the parent id, and the result is a list of parents that have children matching the filter criteria.

If we replace the method code with the following, we can instead limit the parent product join to products that aren’t bundles.
This will exclude bundle children from the query logic, producing layered navigation with no consideration of bundle child product attributes.

$connection = $this->getConnection();
$idxTable = $this->getIdxTable();

$select = $connection->select()->from(
    ['l' => $this->getTable('catalog_product_relation')],
    'parent_id'
)->join(
    ['cs' => $this->getTable('store')],
    '',
    []
)->join(
    ['i' => $idxTable],
    'l.child_id = i.entity_id AND cs.store_id = i.store_id',
    ['attribute_id', 'store_id', 'value']
)->join(
    ['p' => 'catalog_product_entity'],
    'l.parent_id = p.entity_id AND p.type_id != 'bundle'',
    []
)->group(
    ['l.parent_id', 'i.attribute_id', 'i.store_id', 'i.value']
);
if ($parentIds !== null) {
    $select->where('l.parent_id IN(?)', $parentIds);
}

/**
 * Add additional external limitation
 */
$this->_eventManager->dispatch(
    'prepare_catalog_product_index_select',
    [
        'select' => $select,
        'entity_field' => new Zend_Db_Expr('l.parent_id'),
        'website_field' => new Zend_Db_Expr('cs.website_id'),
        'store_field' => new Zend_Db_Expr('cs.store_id')
    ]
);

return $select;

Note that this method is in the abstract, so you’ll have to implement a di preference for each subclass that implements this method that you want to behave differently. When I implemented these changes, I included the following:

  • MagentoCatalogModelResourceModelProductIndexerEavDecimal
  • MagentoCatalogModelResourceModelProductIndexerEavSource
  • MagentoCatalogModelResourceModelProductIndexerEavSource

Here’s the resulting behavior:

Make a Bundle and Make a Bundle

Whether you’re looking to help customers identify compatible products, or just looking to increase your order totals, I think there’s a use case for almost every merchant to use bundle products. Even if you don’t want to create a lot of them, they can be a great promotional tool. So what are you waiting for? Get started with those bundle products. If you happen to need some customizations to get them just right, give us a call.

What does ROAS Really Mean?

ROAS (Return on Ad Spend) is a popular metric that can help businesses evaluate if their campaigns are successful. It’s a simple calculation of ad spend divided by revenue. It will tell you how much revenue you earned for every dollar spent. Try our ROAS calculator.

It can often be confused with ROI (Return on Investment), and too often marketers will rely on merchants using the terms superfluously to inflate their success. 300% ROI sounds great right? However, ROAS is much different. ROI takes into account other expenditures and gives you a much clearer idea of profit. Whereas ROAS does not give you any indication of what your profit is.

So how do you know at what percentage of ROAS you are making a profit? That’s where it gets a little fuzzy. Profit margin varies from company to company (and even product to product), but there is a general range that most eCommerce companies will fall into.

Danger!

0% to 399%

In this range, most eCommerce companies are seeing a loss.

For example:

Say your company is seeing an ROAS of 300% on your AdWords campaigns. This means that for $1 spent in AdWords, you received $3 in revenue. That leaves you with $2. If the product costs you $1, and your profit is 50% of that product, you are down to .50. But you also have to pay for the agency and/or employee fees, and any other business overhead expenses. In addition, in Google Analytics revenue includes shipping. Can your business cover all of that with .50 per product? Probably not. And what if the product costs you $2 or more? In this instance, you will need a much higher ROAS to make a profit.

Heads Up!

400%-799%

In this range, many eCommerce companies are breaking even, and/or beginning to see a bit of profit. However, as with the explanation above, it depends on your profit margin and other expenses. If you have a 20% margin, and high employee expenses/overhead you may still be losing money on your digital marketing. However, if you have a 100% margin and little overhead, this could be a good range for you.

Nice Work!

800%+

Beginning at around 800% ROAS we see very few companies that are not making a profit. At Classy Llama, our Marketing Services department views the floor at 900%. If we are only breaking even for our clients, then we do not feel we are doing our job, therefore we much prefer to see things in the 1,200%+ range.

Keep in mind that campaign objectives can skew what is an acceptable ROAS or ROI. Not all campaigns focus on driving direct revenue. Value extends far beyond directly trackable revenue. Branding awareness, engagement, and email subscriber campaigns would fall into this category. See our blog Why ROI Doesn’t Matter for more on this. In addition, some campaigns may have a revenue-driving purpose, but will not yield a high calculable ROAS. For example, a call-only campaign is a bit harder to track actual revenue, so the ROAS for these campaigns is low but could still be very valuable.

In the end, don’t accept an ROAS percentage at face-value. To truly discover the right ROAS for your business, it’s best to calculate your ROI first and work backward. By gaining a better understanding of what your marketing, and your marketing agency, is doing for you, you will know where you need to spend more or less of your dollars and what is truly benefitting you.

Don’t know what your ROAS is? Check out our handy ROAS calculator.

Meet Customers Where They are in the Buying Process – The Decision Path

Why Targeted Messaging Matters

You are looking for new ways to get more customers. If you could only find people at just the right moment with just the right message, then your product/service could almost sell itself. But the “right moment” and the “right message” can be somewhat mysterious and elusive at times.

Going through the process outlined in this post should significantly help you laser-focus your target market messaging; especially for writing emails, ads, social posts, page content, and more.

The Three Steps for Laser-Focused Messaging

  1. Know the decisions your potential customer needs to make.
  2. Identify the responses customers make for each decision (there are only six).
  3. Craft your message to speak directly to your shoppers’ situation based on their responses to the decision they need to make.

Step 1 – The Decision Path

When you take the time to consider the decisions your customers need to make, you gain the foresight to help guide them easily and quickly through conversion.

The Decision Path is simply the string of decisions buyers make when considering any product or service. For example, here are five choices all purchasers make before using your product or service:

  1. Do you have what I want?
  2. Does your product/service offer the benefits I need?
  3. Are you the best source to buy this product/service?
  4. Is your pricing reasonable?
  5. Should I buy from you?

Before their money gets to your pocket, they are answering these questions (whether they realize it or not). Discerning how they respond to these questions will help guide your writing.

Do you have an upcoming web project in mind? Go through a real-life decision path to see how Classy Llama does it.

The Three-Step Cycle That Makes A Decision Path

Before we get to writing we need to understand the three-step cycle every customer goes through when making a decision:

Realize: I need to make a decision. (ie. Do I get this here or on Amazon?)
Respond: What am I going to do? (ie. I’ll check on prices.)
Repeat: One decision leads to the next. (ie. Should I buy it now or next month?)

REALIZING

When consumers realize they have a problem or an opportunity to address, this first step is complete. This awareness may come from many different sources: sales, marketing, social media, word of mouth, or something more personal. Regardless of the source, after it presents the problem or opportunity, the consumer is now responsible for making a decision.

Are you realizing right now you could use some consulting or marketing help? Let us know how Classy Llama can help. (See what I did there?)

RESPONDING

There are six ways a customer can respond after realizing they need to make a decision:

  1. Stumped: I don’t even know where to begin. (i.e., I just started working in this industry and need more info.)
  2. Stopped: Something/someone is not allowing me to decide. (i.e., My boss re-prioritized my tasks, and this is now not a priority.)
  3. Sleeping: I don’t think this decision matters to me. (i.e., I haven’t used your service in months because I don’t need it for my current role at work.)
  4. Stalling: I’ll decide, but not now. (i.e., My budget will be increased next month.)
  5. Seeking: I’m working on making this decision now. (i.e., Our old website is not getting the conversion rate we want, and we need a fix.)
  6. Sold: I have decided. (i.e., I’ve done the research, and this is the best way to move forward.)

Once they’ve reached sold status, they are ready to take action and have completed the respond step in the cycle.

By the way, how did you respond when I asked you about needing marketing help above? Maybe you’re stalling because you want to see if you can figure it out before you spend money for someone else to do it?  If you clicked the link, you’re probably seeking or sold on needing help.

It’s possible to respond one way and later change your mind, but, for example, it may take more convincing and persuasion after they’re sold than if they’re still seeking.

It’s worth noting: some consumers may react (a more subconscious, automated response)  rather than respond (a more conscious, proactive engagement). Keep this in mind when targeting your audience and crafting your messaging. People who have reacted may be more willing to change their mind than someone who’s done their research and has many reasons backing their decision.

REPEATING

Once the consumer is sold on one decision, it frees their mind to start considering new problems and/or opportunities. You can help shorten the time between decision cycles by presenting the next decision to your consumer. You can get them through to conversion faster if you guide them along the decision path. Showcase the information users need to make one decision, and then present the next when they’re sold on a particular direction.

Live chat is one way to address all the questions a user may have. After they are satisfied with your help, you have the opportunity to lead them to their next decision. Be sure to pass along with the right information and resources required to make an informed decision.

A Couple Examples

JOE LLAMA WANTS WIDGET X

Joe Llama hears about the awesome Widget X. He realizes a decision must be made. He responds, “I’m sold. I have to buy one.” Then he asks himself, “Where can I get the best deal?” Joe realizes a decision must be made, so he responds, “I’ll look online.” …  “What do I search for?” … “Which website?” …  “What color?” … “What price?” … etc. This Realize, Respond, Repeat cycle continues until Joe has the awesome Widget X in his hands.

When you map out all of the decisions consumers make before they start using your product/service, you have a decision path.

Maybe you’ve never considered just how many decisions a consumer has to make before using your product/service. Don’t feel overwhelmed! Don’t worry—I’ll show you how to map your decision path easily later in this post. Before we start mapping though, let me clarify what the decision path is and what it isn’t.

YOU MAY BE AN EXAMPLE

Perhaps, you’ve been planning to make some changes to your website. See what Classy Llama’s decision path looks like in real-life by answering these questions. While you’re answering, you can think about all the decisions your customers need to make before they can use your product or service.

Decision Path Compared to Other Customer Journey Concepts

Beyond User Interface Flows

Way back in 2009, Basecamp wrote a great blog post about User Interface (UI) flows that has a very similar feel to the Decision Path concept.

Even though the decision path can include user interface interactions, it goes beyond what the user sees or does on your website.

For starters, some decisions are made IRL (in real life), not just when they are surfing your website. Also, sometimes users don’t do anything, but that doesn’t mean you’re off the hook. When you map your decision path, you can still deliver very specific (and effective) messaging to consumers that may be stumped, stopped, or stalling.

Add Clarity To Your Buying Cycle

If you’re not already familiar with the buying cycle, it can be summarized in three steps: 1) Awareness, 2) Consideration, and 3) Purchase. In some regards, it’s very similar to the three-step decision cycle. I would encourage you to explore the buying cycle more to see what other concepts (like “buying triggers”) may be able to help you find and communicate to your potential customers.

The decision path adds value to the buying cycle concept by adding clarity to the consideration and purchase stages.  Without understanding your decision path, you may be able to categorize consumers in the consideration or purchase stage, but you still may be giving the wrong message if you haven’t considered the decision they may be making currently.

An Addendum to The Evaluation Process

Our CEO, Kurt Theobald, wrote about the evaluation process in the first years of our company. It maps out the emotional roller coaster consumers ride as they constantly (and often subconsciously) evaluate the perceived cost and value of everything we interact with. The evaluation process is a great foundation for this article. You’ll see here again, the decision path simply adds clarity and definition to all the types of responses consumers have at different stages of the evaluation process. They’re constantly responding according to the perceived cost and value of your product or service. How will you direct your messaging to them throughout their evaluation process?

Step 2 – Target One of Six Ways Customers Respond to Decisions

Once you understand the decision path concept and grasp the six different responses consumers can make decisions, you can start developing your messaging strategy.

Each of the six responses reveals what that user needs from you. Identifying which of the six responses users are making allows you to write efficiently; with laser-focus.

Stumped users need base-level information

Your message doesn’t have to elaborate and ornate—just point them in the right direction.

Stopped users need to be equipped

If you can, offer information or resources that can unblock whatever/whoever blocking them.

Sleeping users need to wake up

If you care about these users, you’ll need very loud, noticeable, and enticing messages to wake them up. Maybe you can share some information with them that you’ve never released before—the more special they feel, the more they may engage. Maybe there’s a promotion or incentive that can shake them awake.

Stalling users need some motivation

These users require some nurturing. Be consistent to add value in their lives so they’re convinced you’re the best source for this product. Flash sales or extra incentives and promotions could give these users the boost they need to get moving on a decision.

Seeking users need details

You want to lay it all out for these users because they are ready to move. Show comparisons, terms and conditions, sizing charts, clear descriptions, product reviews and ratings, etc—give any details you think they may need.

Sold users need guidance

Either they’re sold in a positive way—to which you can give direction towards the next decision— or they’re sold in a negative way—which may require you to be more persuasive or lead them to a cross-sell decision path.

Identifying Responses Example

Imagine you’re sending an email to people who have abandoned their shopping cart. What will you do? It depends on what response they had when deciding whether or not to check out.

If they were confused/stumped about how to use your checkout page, you could send them some instructions on how your checkout works.

Some may be stopped, sleeping, or stalling for various reasons. You could add some incentive to your email to make them move on their abandoned shopping cart.

Someone seeking may need to know you have a reminder, save-for-later, or comparison feature.

If this gives you an idea for a feature you’d like to implement, check out our eCommerce Website Development service.

Step 3 – Write Response-Based Targeted Messaging

Now that you’ve identified some possible ways your users are responding to a specific decision, you can begin crafting your message.

Use the spreadsheet we made for you

We’ve created a decision path mapping template to help you with this process. After clicking the link to the spreadsheet we created, make a copy of it for yourself by going to “File > Make a copy.”

Organize your messages

Each page in the spreadsheet represents a different place you need messaging. For example, one can be the abandoned shopping cart email like described above; Another can be a Facebook ad or even a section of text on your homepage. Create a new page in your spreadsheet by clicking the drop-down arrow on the [TEMPLATE] tab and selecting “Duplicate.”

Write your messages

Each message goes in a new row of the spreadsheet.

Select a response

Think about users viewing these messages and what decisions they may be trying to make. Then, for each row in the spreadsheet, select a response they may have for that decision.

Explain their response

When you write why they may have that response, it makes it surprisingly clear and obvious how you should craft your message.

Write your message

So, you know where your users are, what decisions they are trying to make, how they’ve responded and why. Now, you can speak straight into their particular situation.

Target locked…

Laser-mode engaged…

Fire when ready.

Let us know if you need help laser-targeting your messaging.

Top 3 Tips for Making Holiday Shipping Easier

This post is contributed by Robert Gilbreath, Vice President of Marketing and Partnerships at ShipStation. ShipStation is the leading web-based shipping solution that helps e-commerce retailers import, organize, process, package, and ship their orders quickly and easily from any web browser. For a free trial, visit www.shipstation.com.

Are you excited about this year’s e-commerce holiday selling season? You’d have good reason to be. Online sales for the 2017 holiday season are projected to grow 18%-21% compared with the 2016 holiday season, with online sales reaching $111 billion to $114 billion, according to the recently-released Deloitte annual holiday forecast.

While sales are fun, sometimes shipping can be a challenge. The ShipStation team is committed to helping make things easier for you, especially during the busy fourth quarter. Here are our top three shipping tips:

1. Organize Your Shipping and Fulfillment Area or Warehouse

If you have an onsite shipping and fulfillment area, organizing it for maximum efficiency will make your holiday season much less stressful. Here are some ideas:

Organize your shipping station.

This is the heart of all your shipping and fulfillment activity. Make sure all of your supplies (scissors, tape, packaging material, etc.) are together and accessible. Are the scale, label printer and boxes nearby? Do you have enough space on tables or in the area to make boxes and pack and ship them? Do you have a place for orders that haven’t been packed, different from the area containing boxes filled and ready to be sent? Try a couple of test runs with different workers, and determine if tweaks can be made to streamline the process.

Make products easy to find.

While you may know where everything is, other people won’t. If you hire seasonal workers, this is critical. Using a visual system (such as clear bins), as well as a written one (labels or codes) will make the process easier.

Store items strategically.

Do what makes sense. For example, keep heavy items on lower shelves. Put best-selling items within easy reach. Keep items that are often bought together near each other.

Place shipping supplies near top-selling items.

Most sellers have consistent best-selling items. These should be kept near your packing and shipping station for easy access and packing. Even better, if these items sell all the time, pre-pack them.

2. Prepare for and Communicate Holiday Shipping Deadlines

Holiday shoppers (especially the lucrative ones that shop at the last minute) are only going to purchase from you if you’re able to fulfill and deliver by the desired date. That’s why it’s critical to know the cutoff dates that shipping carriers will guarantee Christmas delivery.

Our sellers have told us that this information is very important to them. So each year we create an annual ShipStation Holiday Shipping Deadline infographic with these dates at their fingertips.

While e-commerce sellers use these deadlines to make sure shipments get to their destinations before the holidays, it’s also important to let customers know how and when they need to order to make these deadlines. Two ways to do this include: providing countdown timers and pop-up shipping notifications. Here are examples:

A Christmas Countdown Timer from Fresh Relevance updates in real-time in webpages and at point of open in emails so your customers will know exactly how much time they have for Christmas delivery. 

Last-minute shoppers get an immediate nudge to buy with this pop-up shipping notification from Shwood Shop. In this example, shoppers are provided information on dates when they can take advantage of free shipping based on larger order volumes. It’s a savvy way to increase order size while still offering the powerful free shipping option. 

Note: Weather conditions in years past have led to carriers not meeting their guarantees. This will reflect badly on you as an online merchant, even though it isn’t your fault. That’s why it’s smart to build in a bit of extra time to those shipping cutoff dates.    

3. Use technology to save time and money on shipping during the holidays.

In addition to using a thermal printer to print your labels, shipping software can help save you time and money in the following ways:

  • Create a shipping label and packing slip, and email tracking information to the buyer and communicate tracking information to the sales channel with a single click
  • Use automation rules to automatically choose the least expensive way to ship, based on product, weight and geography
  • Process shipping labels in batches of up to 500 or more 
  • Offer a Branded Returns Portal and Branded Tracking Page to make the customer experience easier

These three tips will make your busy holiday season a lot easier. Best wishes for your most profitable fourth quarter ever!

Creating a Shipping Method in Magento 2

There are existing extensions available for many of the shipping carriers that you may choose to utilize on your Magento 2 site, but what about a shipping method of your own? Adding a custom shipping method like this is a straightforward approach that requires only a handful of files in order to implement – five, to be exact.

Let’s create a ‘Customer Pickup’ shipping method that is used to provide customers who are local to our warehouse the option of picking up their order as opposed to paying for shipping.

Our new shipping method will get its own extension, and as with other custom extensions, it will reside within a vendor folder in our site’s appcode folder. We will be using the following path for our new extension:appcodeClassyLlamaCustomerPickup For the remainder of this article, all file and path references will be in relation to the CustomerPickup folder.

We start by creating the two files that are required for all custom extensions: registration.php and module.xml. I will assume you are familiar enough with Magento 2 development to know what these two files are and why they are required, so I won’t go into depth about that here. If you are new to creating extensions in Magento 2, the DevDocs’ PHP Developer Guide is a must-read.

Configuration files

First, we have to tell Magento about our new shipping method’s existence; this is accomplished with the system.xml and config.xml files. The system.xml file will define the configuration settings available for our shipping method in the Magento 2 admin (in STORES > Configuration > SALES > Shipping Methods) and the config.xml file will set default values for those settings.

There are certain configuration settings for shipping carriers that are expected by Magento and thus should be included in all shipping methods:

  • active – This boolean value indicates whether this shipping method is active or not.
  • model – The path to the shipping method’s model.
  • title – The name of the shipping “carrier” that will be displayed in the frontend.
  • sallowspecific – This boolean value indicates whether this shipping method should be available for all countries or only those specified.
  • sort_order – This parameter tells Magento wherein the list of available shipping methods this method will display.

There are some additional settings we are including as well:

  • price – This shipping method will have a price of $0.00.
  • name – The name of this shipping method to be displayed to the customer.
  • showmethod – Whether or not to show this shipping method even when not applicable.

Our extension’s system.xml file has a default structure that should be followed:

  • Configuration elements must be created using the following node structure:
    <system>
    <section>
    <group>
  • The <section> node must have an id value of "carriers".
  • The <group> node must have an id value equal to our new shipping code, in this case customerpickup.

By building the XML file in this manner, Magento knows where to place the configuration settings in the backend (in this case with the other shipping methods) and how to retrieve them when called.

etcadminhtmlsystem.xml

<?xml version="1.0"?>
<!--
/**
 * @category    ClassyLlama
 * @copyright   Copyright (c) 2017 Classy Llama Studios, LLC
 */
 -->
<config xmlns_xsi="http://www.w3.org/2001/XMLSchema-instance" xsi_noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="carriers" translate="label" type="text" sortOrder="320" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="customerpickup" translate="label" type="text" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Customer Pickup</label>
                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Enabled</label>
                    <source_model>MagentoConfigModelConfigSourceYesno</source_model>
                </field>
                <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Title</label>
                </field>
                <field id="name" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Method Name</label>
                </field>
                <field id="price" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Price</label>
                    <validate>validate-number validate-zero-or-greater</validate>
                </field>
                <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Sort Order</label>
                </field>
                <field id="showmethod" translate="label" type="select" sortOrder="92" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Show Method if Not Applicable</label>
                    <source_model>MagentoConfigModelConfigSourceYesno</source_model>
                </field>
            </group>
        </section>
    </system>
</config>

Our extension’s config.xml (the file that defines the default values for the settings defined in system.xml) also has layout rules that must be followed:

  • Configuration elements must be created under the main node of <default> with a child node of <carriers> in a child node named with the shipping method code we’ve created, in this case <customerpickup>.

etcconfig.xml

<?xml version="1.0"?>
<!--
/**
 * @category    ClassyLlama
 * @copyright   Copyright (c) 2017 Classy Llama Studios, LLC
 */
 -->
<config xmlns_xsi="http://www.w3.org/2001/XMLSchema-instance" xsi_noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <carriers>
            <customerpickup>
                <active>1</active>
                <model>ClassyLlamaCustomerPickupModelCarrierCustomerPickup</model>
                <name>Customer Pickup</name>
                <price>0.00</price>
                <title>Free Shipping</title>
                <sallowspecific>0</sallowspecific>
                <sort_order>100</sort_order>
            </customerpickup>
        </carriers>
    </default>
</config>

The Shipping Method Class

At this point, we’ve created the extension, but it doesn’t yet do anything for us. To get the extension working for us, we need to create the model at appcodeClassyLlamaCustomerPickupModelCarrierCustomerPickup.php.

There are some specific items worth noting when creating our custom shipping method’s class:

  • Every shipping method’s class in Magento 2 must extend MagentoShippingModelCarrierAbstractCarrier and implement MagentoShippingModelCarrierCarrierInterface.
  • Every shipping method’s class must include a minimum of two methods: getAllowedMethods and collectRates.
    • The method getAllowedMethods:
      • Must return an array of the available shipping options for our shipping method (e.g. ‘Standard Delivery”, ‘Expedited Delivery’).
      • Can include as few or as many shipping options as are applicable to the method. In our example case, there is only the one – ‘Customer Pickup’.
    • The method collectRates returns either:
      • A boolean false, which effectively disables the shipping method, excluding it from a list of shipping options.
      • An instance of MagentoShippingModelRateResult instantiated via a Magento factory.
        • If returning an instance of Result, it can have as many, or as few, methods appended to it as is applicable; each appended method is a factory-generated instance of MagentoQuoteModelQuoteAddressRateResultMethod. This model represents a shipping method and has its details set within it (e.g. Carrier code and title, method code and title, Price). In our example below, we are only attaching a single method, but the process can be repeated as many times as necessary.
  • The $_code variable in the class must be set to the unique shipping code chosen for our custom shipping method, in this case customerpickup.
  • The method $this->getConfigData is used to retrieve the configuration settings that are defined in the extension’s system.xml file (e.g. $this->getConfigData(‘name’) will return the value set for the method’s name).

app/code/ClassyLlama/CustomerPickup/Model/Carrier/CustomerPickup.php

<?php
/**
 * @category    ClassyLlama
 * @copyright   Copyright (c) 2017 Classy Llama Studios, LLC
 */

namespace ClassyLlamaCustomerPickupModelCarrier;

use MagentoQuoteModelQuoteAddressRateRequest;
use MagentoShippingModelRateResult;

class CustomerPickup
    extends MagentoShippingModelCarrierAbstractCarrier
    implements MagentoShippingModelCarrierCarrierInterface
{
    /**
     * Constant defining shipping code for method
     */
    const SHIPPING_CODE = 'customerpickup';

    /**
     * @var string
     */
    protected $_code = self::SHIPPING_CODE;

    /**
     * @var MagentoShippingModelRateResultFactory
     */
    protected $rateResultFactory;

    /**
     * @var MagentoQuoteModelQuoteAddressRateResultMethodFactory
     */
    protected $rateMethodFactory;

    /**
     * @param MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig
     * @param MagentoQuoteModelQuoteAddressRateResultErrorFactory $rateErrorFactory
     * @param PsrLogLoggerInterface $logger
     * @param MagentoShippingModelRateResultFactory $rateResultFactory
     * @param MagentoQuoteModelQuoteAddressRateResultMethodFactory $rateMethodFactory
     * @param array $data
     */
    public function __construct(
        MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
        MagentoQuoteModelQuoteAddressRateResultErrorFactory $rateErrorFactory,
        PsrLogLoggerInterface $logger,
        MagentoShippingModelRateResultFactory $rateResultFactory,
        MagentoQuoteModelQuoteAddressRateResultMethodFactory $rateMethodFactory,
        array $data = []
    ) {
        $this->rateResultFactory = $rateResultFactory;
        $this->rateMethodFactory = $rateMethodFactory;
        parent::__construct($scopeConfig, $rateErrorFactory, $logger, $data);
    }

    /**
     * @return array
     */
    public function getAllowedMethods()
    {
        return [self::SHIPPING_CODE => $this->getConfigData('name')];
    }

    /**
     * @param RateRequest $request
     * @return bool|Result
     */
    public function collectRates(RateRequest $request)
    {
        if (!$this->getActiveFlag()) {
            // This shipping method is disabled in the configuration
            return false;
        }
        
        // Check whether order is eligible for customer pickup
            // Add logic here to determine if this order is eligible for this shipping method
            // e.g. Is the entire order in stock? Does the customer have a local address?
    
        // If the order is not eligible, return false
        // Otherwise, continue to build and return $result which includes our shipping method's details

        /** @var MagentoShippingModelRateResult $result */
        $result = $this->rateResultFactory->create();

        /** @var MagentoQuoteModelQuoteAddressRateResultMethod $method */
        $method = $this->rateMethodFactory->create();

        $method->setCarrier(self::SHIPPING_CODE);
        // Get the title from the configuration, as defined in system.xml
        $method->setCarrierTitle($this->getConfigData('title'));

        $method->setMethod(self::SHIPPING_CODE);
        // Get the title from the configuration, as defined in system.xml
        $method->setMethodTitle($this->getConfigData('name'));

        // Get the price from the configuration, as defined in system.xml
        $amount = $this->getConfigData('price');

        $method->setPrice($amount);
        $method->setCost($amount);

        $result->append($method);

        return $result;
    }
}

Our new shipping method can be customized however we need it to be. For example, we could check whether any items in the customer’s order are being drop shipped, and if so, not offer ‘Customer Pickup’ as an available shipping method; we could also disable our shipping method for orders placed from outside of specific regions.

Configure and test the shipping method

After enabling our new extension and clearing the cache, we can visit our site’s admin section (e.g. https://mystore.xyz/backend/admin) and head to the Shipping Methods section at STORES > Configuration > SALES > Shipping Methods. We should now see a page similar to the one below, with our new shipping method’s default configuration settings we defined earlier in the system.xml file.

To test our new shipping method, we just have to head to our store’s website like a customer would, create a qualifying order (don’t forget what rules you had previously put in place in the model), and head to the shopping cart. As you can see in the screenshot below, our new shipping method is available for us to choose.

If we proceed to checkout, we see in the screenshot below that we again have the option of Customer Pickup as our shipping method.

Conclusion

We have now completed the creation, configuration, and testing of a custom shipping method that allows our local customers to save on the cost of shipping and pick their qualifying orders up at our warehouse at their convenience.

This tutorial can be used to tailor your online store’s shipping logic to match what is right for you and your business, rather than being tied to native rate models that may not fit every scenario. Custom shipping methods can be a powerful tool; and since the creation process is straightforward, it makes for a handy tool in your Magento tool belt!

A Look at CSS and Less in Magento 2

Magento 2 leverages the enormous power of CSS pre-processing (via Less) to make theme customization intuitive and easily maintainable through features like variables, mixins, and imports. Less compilation is a fundamental part of M2’s static content deployment and development tools, streamlining the theming process and ensuring that frontend developers can focus on their code, not compiling their final CSS.

The conventions and structures the native Less implementation use are smartly architected and designed to allow flexible and unobtrusive customizations. But along with the power comes the simple fact that there are many different ways to skin a given problem, and some techniques are better than others. If you spend a great deal of your time theming Magento sites, you’ll definitely want to have a broad understanding of the core conventions and, by extension, the best practices we can intuit from them. We’ll be covering both in this article.

I’ll presume that you have a basic familiarity with the details on theming, Less and dev tools available in Magento’s Frontend Developer Guide, as well as core Less concepts like variables and mixins.

Bird’s-eye Overview

Let’s hit the broad highlights of how Magento natively structures Less.

There are three major locations styles are defined:

  • view/{area}/web/css/source in an extension’s root directory
    • e.g., /app/code/MyCoolVendor/MyCoolApp/view/frontend/web/css/source/_module.less
    • Note that you won’t see this in the core packages, because baseline styles for these are actually contained in the Magento/blank theme, as referenced below.
  • /lib/web/css/source, and in particular, /lib/web/css/source/lib
    • e.g., /lib/web/css/source/lib/_buttons.less
    • These constitute Magento’s UI library styles. No direct style implementations are present here, but rather reusable components (mostly mixins) intended to be utilized in a theme.
  • In a theme, in two major contexts:
    • Relative to a specific extension
      • e.g., /app/design/frontend/MyCoolVendor/my-cool-theme/Magento_Catalog/web/css/source/_extend.less
    • More generic files directly in web/css
      • e.g., /app/design/frontend/MyCoolVendor/my-cool-theme/web/css/source/_theme.less

The bread and butter of the native theme implementation is in the extension-specific files.

As a final note, the following is focused primarily on the frontend structure and presumes a theme that extends Magento/blank.

Manifest Files

While the lion’s share of theme styles are contained within extension-specific files, before those are imported we have a foundation composed of broader styles imported by manifest files (importing other manifest files importing other manifest files). There’s really nothing to these but successive lists of imports.

Let’s look at the primary starting manifest file, web/css/_styles.less relative to the theme root:


@import 'source/lib/_lib.less';
@import 'source/_sources.less';
@import 'source/_components.less';

As you can see, this vanilla version from Magento/blank imports three other manifests. _lib.less will import the UI library mixins and their associated variables, _sources.less will import core files that use those library mixins to implement certain baseline theme styles, and _components.less will import styles specific to interactive components like (in fact, only) modals.

The Main Compiled Files

Zooming our perspective out further, we find the outermost, or top-level, Less files that correspond directly with the final compiled CSS. styles-m.less and styles-l.less are the main event here, though there are email- and print-related top-level files as well. Importing _styles.less is nearly the first thing done here, but there’s a lot more to unpack.

It’s easy to see the distinction between styles-m and styles-l by observing the way they’re included in layout:

<css src="css/styles-m.css"/>
<css src="css/styles-l.css" media="screen and (min-width: 768px)"/>

styles-m contains universal and small screen styles, while styles-l is restricted by a media query making it specific to large screens. Here are the condensed contents of the Magento/blank version of styles-m.less:

@import 'source/_reset.less';
@import '_styles.less';
@import (reference) 'source/_extends.less';
//@magento_import 'source/_module.less';
//@magento_import 'source/_widgets.less';
@import 'source/lib/_responsive.less';
@media-target: 'mobile';
@import 'source/_theme.less';
//@magento_import 'source/_extend.less';

styles-l.less has a few notable differences, but it looks much the same. The most important distinction looks like this:

@media-target: 'desktop';
@media-common: false;

The different values for these two Less variables are key in determining the output of the two files.

  • Universal styles that should apply at any screen size are wrapped in the CSS guard & when (@media-common = true) { and thus only output in styles-m. (The default value of @media-common is true.)
  • Breakpoint-specific styles are defined using a mixin definition like .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {. The imported file source/lib/_responsive.less outputs the results of such mixins within typical CSS media queries, using the same two variables in its conditionals, thus allocating only the approprite styles to each final file.

The above should make it clear why it’s important not to include “naked” styles in your Less files, but rather always wrap them in a media-width mixin or the @media-common guard. Otherwise, your styles will be duplicated between both final CSS files.

The final structure of interest in the main compiled files are the references to @magento_import, which you’ll notice are actually preceded by Less comment characters. This directive is used by Magento in its pre-processing and transformed into a succession of actual Less imports. _module.less, _widgets.less and _extend.less are not expected to be present in only one location relative to the theme; many such files may exist relative to specific extensions (whether present in the original extension package or in the appropriate sub-directory in the theme). During pre-processing, this directive is exploded into multiple normal import statements – one for each found path. This constitutes an important difference for how these filemames are treated and how you, in turn, should use them.

Important Named Files

We’ve looked at the general flow of how Magento compiles its final CSS files. Before we delve into some practical guidelines, let’s see a run-down of the most common Less files you’re going to use to implement your styles.

  • _module.less: The core styles for a specific extension. Imported from multiple locations via @magento_import.
  • _extend.less: Additional theme-specific styles for a specific extension, or for the theme as a whole. Imported from multiple locations via @magento_import.
  • _extends.less: Styles to be used by extend selectors. Imported by reference from the generic web/css location.
  • _theme.less: Theme-specific variable overrides. Imported from the generic web/css location.

As we won’t really be covering it later, _extends.less is worth touching on, and it’s worth noting that it’s included here not because you’re really likely to use it frequently, but because the name similarity with _extend.less demands some attention, lest you confuse the two. _extends.less is imported with the “(reference)” directive, meaning Less will import it for use by other files but not actually output the contents. It’s intended specifically for the definition of common style blocks that are to be used with the Less :extend selector to implement them easily in various contexts throughout the theme. (As an example, the Magento/blank version implements styles for .abs-block-title, which other selectors in the theme use via :extend(.abs-block-title).) This is similar to a mixin but is a simpler construct.

Whew! That was as lengthy a bird’s-eye view as we could want. Now that we have a good idea of Magento’s Less structure, let’s take a look at the best way to leverage those components, by way of some practical use cases you might run into.

I Want to Significantly Re-factor Large Theme Areas

We’re starting with the most ambitious use case, because it also involves the most straightforward method of customization. Any Less partial can be directly overridden by a file in the appropriate path in your theme.

  • Override /app/code/MyCoolVendor/MyCoolApp/view/frontend/web/css/source/_module.less in this location in your theme:
    • MyCoolApp/web/css/source/_module.less
  • Override /lib/web/css/source/lib/_buttons.less in this location in your theme:
    • web/css/source/lib/_buttons.less
  • Override the Magento/blank file web/css/source/components/_breadcrumbs.less in the same path in your own theme.

When you override a Less partial in this way, it entirely replaces the source file from further back in the inheritance chain or from an extension or lib source. This is the most direct way of modifying a parent theme or extension, but it is also the most unsuitable for most cases, because it involves copying forward the entirety of the original file. This method should only be used if you truly intend a wholesale overhaul that retains little of the original.

I Want to Swap the Color Palette or Change Some Aesthetic Details

Maybe you’re just interested in sprucing the native theme up with some changes in font and hue. Or perhaps you’ve created an awesome theme and want to use it on multiple stores with some color palette swapping, using themes that inherit from the first. Such modifications are precisely the use case for web/source/_theme.less.

Less variables are used prevalently throughout Magento’s core themes (and should be in yours as well) for everything from font families and sizes to colors to spacing. By convention, _theme.less is intended to be used solely for overriding the values of such variables. This technique is a fairly powerful method for achieving a unique aesthetic without touching a single line of CSS, and even if you intend to go further with your theme, you’ll no doubt make heavy use of it.

Especially regarding your color palette, note that it’s worthwhile to make use of self-contained Less variables within _theme.less to keep things well organized. The following shows an example of defining color values only once and then distributing those values to other more meaningful variables:

@mytheme-color-gray: @color-gray22;
@mytheme-color-red: #a11e11;
@mytheme-color-red-light: lighen(@mytheme-color, 15%);

@primary__color: @mytheme-color-gray;
@link__color: @mytheme-color-red;
@link__hover__color: @mytheme-color-red-light;
@header__background-color: @mytheme-color-gray;
@h1__font-color: @mytheme-color-red;

This is the only context in which color names should be referenced in variable names. Use semantic, meaningful names for any new variables you create to be used elsewhere.

I Want to Make Major Customizations to Existing Styles

If the section title seems a little generic, that’s because we’re talking about the meat and potatoes of theming – the areas where you’ll be spending most of your time. This is the middle road between just changing some variables to alter the look and totally blowing away the native theme’s styles in favor of your own structure. This is still using the parent theme as a backbone but building your own customizations from there.

As noted above, you could accomplish this with direct overrides of files from the parent theme, but this is inadvisable. Doing so involves unnecessary duplication of large portions of code, and it makes it much more difficult to identify the styles that are unique to your theme at a glance. Instead, use _extend.less for add-on styles that make your theme-specific modifications.

We’ve seen that _module.less and _extend.less are imported in the same way, and the difference between them is merely one of convention. Extensions and the native theme include the former but not the latter; you can think of _extend.less as the empty space that’s left available for your theme-specific styles. As a caveat, though, once _extend.less is implemented in a theme, any descendent themes that need to modify it will need to copy it forward like any other file.

Recall that _extend.less is imported not just from a single location in your theme, but from multiple possible locations. While you might be tempted to use web/css/source/_extend.less as a catch-all for your theme’s styles, you’re encouraged to split them into the appropriate extensions based on the areas they interact with. (e.g., build on what’s established in the Magento/blank file Magento_Customer/web/css/source/_module.less in Magento_Customer/web/css/source/_extend.less in your own theme.) This makes for a better organized and more maintainable theme structure.

While on the subject of general theming, a couple more general tips: First of all, make use of the mixins that the core UI library makes available whenever appropriate. Icons are a good example. Magento natively uses an icon font, generally utilizing :before and :after pseudo-elements to inject the right characters. While it would be possible to accomplish this manually in additional areas where you want to use icons, you’re better off using the .lib-icon-font mixin as the core code does. This ensures better consistency and stability, and the native mixin implements the -webkit-font-smoothing property for proper antialiasing, something that is easy to overlook.

Finally, avoid hard-coded values for things like colors and numerical values in your styles. Define variables in _theme.less for such values, even if they’re new vars of your own invention.

I Want to Create Styles to Accompany My Extension

In the event that you’ve written an extension to add custom functionality that affects the Magento frontend, you’re going to need CSS to accompany it. For example, say you’ve created MyCoolVendor_Subcategories, which implements the ability for category pages to show a dynamic list of subcategories. By now, you probably know exactly where the associated styles go: view/frontend/web/css/source/_module.less in the extension root directory.

Before we leave the topic, however, let’s talk about Less variables in this context. Your extension styles almost certainly should be using variables, and it’s likely they’ll be unique vars that don’t exist in the native theme. In our use cases thus far, new variables can be defined in _theme.less with impunity, because those use cases were contained within the confines of a single theme, and Less’s lazy evaluation means variables can be defined as late as we please. In the case of an extension, however, we’ve arrived at a scenario where our Less should be complete without reference to a particular theme. Your new variables should be defined with default values in _module.less itself, typically at the very top. This is a gimme if you’re developing a distributable extension, but it’s easy to miss when writing custom functionality for a specific site. If you do miss it, and if you compile static content without specifying a theme, expect to see Less compilation errors about non-existent variables when the core themes like Magento/blank are processed.

I Want to Override a Mixin

Let’s say you’d like to make some tweaks to Magento’s native styles, but the styles in question are embedded within the body of a mixin. For example, you might want a border radius on every element where the .lib-button mixin is used. You could track down every selector where it’s used and implement your style on those selectors, but it would be better if you could inject it into the body of the mixin itself. (A good strategy would be to add a border radius parameter to the mixin definition, establishing a variable to represent a default value, which could then be set in _theme.less.)

This could be a legitimate case for simply copying forward the file (web/css/source/lib/_buttons.less) that defines that mixin. Note, though, that many such files group multiple related mixins together, and therefore there is some unnecessary duplication if we want to override only one. You might try implementing your mixin override in a path like web/css/source/custom/lib/_buttons.less.

With this strategy, we’ve reached a scenario where we actually have a new Less partial that Magento will not import by default. This is where the manifest files we reviewed above come into play. Since web/css/_styles.less and its subordinates are merely lists of imports, it’s not very intrusive at all to copy them forward and modify them. You could copy _styles.less itself forward and add your new file to the list there; this has the advantage of less duplication of core files if you have multiple new imports to add. Or if you want to be very exact about placing your file in the exact same place in the import order as the original, you could copy forward that particular manifest file (in this case, web/css/source/lib/_lib.less). Either is a fine approach.

As a final note, you might be tempted to think of overriding a mixin definition in this way as analogous to overriding a method in a programming language. It’s really not; mixin definitions are cumulative (something demonstrated clearly by the media breakpoint mixins). But Less also has enough magic at its fingertips to avoid outputting identical style declarations multiple times, so the result is still much the same. If you find you’re wanting to refactor the original mixin definition substantially, though, you’re probably better off creating a new mixin.

I Want to Define My Own Mixin

Speaking of creating your own mixin, that’s our last use case. Let’s say you create a flexbox-based implementation of a tabbed interface, which is a great case for encapsulation within a mixin. The best location for this is in lib, like the native mixins: web/css/source/lib/_flextabs.less. And you’ll want to make sure that, like the native mixins, yours supports default values for its parameters via named variables:

.lib-flextabs(
    @_tab-background-color: @flextab__tab-background-color,
    @_content-background-color: @flextab__content-background-color
    // ... many other parameters, I'm sure
) {
    // Styles go here ...
}

Now, wherever .lib-flextabs is used, @_tab-background-color can be passed in if desired. But the variable @flextab__tab-background-color is also available to set universally in _theme.less to apply to all uses of .lib-flextabs when that parameter is not explicitly passed.

Presuming you’re defining your custom mixin within a theme, you could just put your initial declaration of all such default variables directly in _theme.less and call it done. It’s probably better form, though, and will make your Less structure more intuitive for other devs, if you follow the core pattern and pair your mixin file with a variables file that defines default values. (e.g., web/css/source/lib/variables/_flextabs.less)

From here, it’s just a matter of actually making sure your new Less partials get imported, which follows the same procedure described above: Copy forward web/css/_styles.less and add them there, or else copy forward both web/css/source/lib/_lib.less and web/css/source/lib/_variables.less and add them in precisely the same spot that other mixins are imported.

In the event that you’re defining a new mixin as part of a custom extension, the procedure will be much the same. You’ll still define partials for your mixin definition and its variable default values, but you’ll put the import statements for them in your extension’s _module.less.

Conclusion

I hope that in our list of use cases we’ve hit on a few practical scenarios you face in your day-to-day Magento development. If you’ve struggled with the right Less code to write and the right place to put it, you should have a better level of confidence now that we’ve peeked under the hood. Taking the time to examine how Magento understands and processes your theme code is well worth it to attain a theme that’s more understandable, more extensible, and more maintainable in the long run.

Canonical Tags: Did You Get It Right on Your Magento Site?

A few weeks ago, a llama posed a seemingly simple question: “Does anyone know the details of canonical URLs and pagination?”. But here’s the thing about llamas – we don’t do well with non-definitive answers. Thus began the digging and twists and turns into the rabbit hole of canonical tags and Magento’s native capabilities.

Here is what we know to be true:

Canonical Tags

With a site full of content, products, and categories, it’s pretty common for the same content to be on multiple URLs. That’s where Canonical Tags (rel=”canonical”) come in.  This tag tells Google what your preferred URL is so that search results will be more likely to show that URL in SERPs. Without using canonical tags in these instances, you can suffer duplicate content issues. In addition, you are forcing Google to decide which to give SEO value to, or splitting its value.

Canonical tags are kind of a hybrid of a NOINDEX tag and a 301. You’re basically telling Google – 1) Don’t show the other pages with similar content in search results, and 2) Push ranking signals to this page. It also reduces a number of resources that Google Bots will spend crawling pages, so it’s a win-win-win.

Paginated Content

Paginated content occurs when you have a series. For example, 5 pages of products under the category “Women’s Shirts”. Using tags like the following indicates the relationship between these unique URLs:


The URL string used in pagination tells Google that you want them to treat the series as a logical sequence. This will then link their properties and SEO value while sending searchers to the first page.

How Magento Handles Category Pages

Natively you can turn on or off canonical tags for categories under the Catalog > Search Engine Optimization settings in your store’s configuration. Turning this setting on adds the rel=”canonical” link tag to all category pages.

Canonical Tag Configuration Settings Stores Magento Admin

This is helpful for telling search engines what the “main” version of your category page is. If you’re using layered navigation to filter a category, parameters are added to the URL for each filter which can create many variations of your main category URL. The canonical tag tells search engines to treat all of those variations of the category as if they are the “main” canonical version. Therefore any SEO value these variations provide is transferred to your main category URL.

The same is true for pagination parameters. From page 2 on, a parameter such as ?p=2 will be added to the main URL to indicate which page of the category you are on. The canonical tag is going to tell the search engine to only show the “main” version of the page in search results, but transfer any link value of the additional pages to the canonical URL, because it is likely not going to index any of the following pages. However, a canonical tag is designed to be used on pages that contain the same (or very similar) content. On a category product listing page, your category description and some content may be the same on each version, but the products listed on the page will be different for each page. That’s the whole point of pagination- to break up a large category into multiple pages. So, this presents a conflict in the way a canonical tag is meant to be used.

What do those facts tell us?

We can surmise from the above that with your Magento store, you can either tell Google that the first page in a series is the most important or let Google decide on its own. Those are currently your only two options.

Notice that there is an option recommended by Google that isn’t natively available with Magento: Use rel=”next” and rel=“prev” to indicate the relationship between component URLs. Without that option, how does one create that synchronicity in the series other than just hoping Google will figure it out? This leads to more questions – Is Magento’s default way of handling this all wrong? And does it really matter if they aren’t in line with Google’s recommendations? And then all of our heads exploded, because WHAT THE HECK. Further research and a lot of discussions have led us to some answers for these questions.

What are the potential ramifications of doing this incorrectly?

The damage occurs in a few ways. If you enable canonical tags, you’re losing potentially valuable keywords because you’re telling Google to ignore everything after the first page. If you don’t, then you run the risk of creating duplicate content issues and/or Google simply not recognizing the pagination at all.

In addition, we have also theorized that if you are migrating from a different platform that might have employed rel=next/prev, and then move to Magento where your URL structure will undoubtedly change, you can create some very undesirable results by canonicalizing one page (effectively asking Google to ignore the series).  You have a strong possibility of really damaging your SEO and seeing a big dip in organic traffic, because you are pushing Google to ignore content that it previously crawled, devaluing your pages.

What is the right course of action?

Option 1, Do Nothing.  This isn’t a great option. Yes, Google is pretty smart. But you’re relying on “hopefully they get what we’re trying to do” rather than explicitly stating your preference, and you’re leaving the SEO value of those pages to chance.

Option 2, Enabling a ‘View All’ page. This is great… if you have a small catalog. If ‘View All’ produces a page with 500 products your user experience just tanked due to slow site speed and you’re increasing the potential to lose that customer. This would only solve the problem in combination with the right customization: Enabling a “View All” page on your categories doesn’t automatically make that the URL that is used for the canonical link tag. We would have to customize Magento to do so.

That leaves us with Option 3: Use rel=”next” and rel=”prev”, which is what we are recommending. Hallelujah, we have an answer! Well, kind of.

We’ve had a lot of internal discussions about scenarios in which it would make sense to set a canonical tag in conjunction with rel-”next/prev”. In each scenario, it wouldn’t ever have been an issue if the URL structure was set to best practice. However, let’s say for some reason yours isn’t set to best practices, and you are not currently in the position to change that, you would want to set a canonical tag on the first page so that you don’t run into duplicate content issues, and in addition use rel=next/prev to identify pagination.

An example of this would be:

A site has a direct link to “Women’s Shirts” at store.com/womensshirts, but this category can also be navigated to through a subcategory where the URL then changes to store.com/womens/womensshirts. You would then want to set the canonical tag to the main category page but also include next/prev so that all pages are indexed, and also so that you do not encounter any duplicate content issues. This is one of those rabbit hole situations I referred to earlier. Because technically, having both of these categories/subcategories with the same content but a different URL path is a wrong taxonomy. Best SEO practices dictate that no matter how you navigate to a page, the URL should be the same. This example isn’t a very clean way to handle pagination and is really only a band-aid because in general, cleaning up your URL structure will solve a lot of “what if” scenarios concerning canonical or next/prev.

So, Magento didn’t technically get it “wrong”. But a broad-sweeping approach, which is what the native functionality does, won’t work for the vast majority of Magento clients. Each case should be evaluated individually to determine the best course of action.

What Next?

Identifying that using rel=next/prev rather than a canonical tag on the first page is only the first step to solving this problem. Currently, Magento does not have a native setting for using next/prev. Here at Classy Llama, we are currently working on an extension that we can use going forward* as next/prev will be the answer more times than it’s not. Having something on hand will not only save us and our clients time and money in the long run but will also reduce the risk of lost revenue when combined with other SEO practices.

Overall, technical SEO has become a big focus for Classy Llama, both in Marketing Services and on the Development teams. Keep an eye out in the coming months for a lot more information from us on the importance of this and how you can redesign or migrate your site without losing traffic and revenue.

* Update December 16th, 2017: This functionality now exists as a part of the Rebar package that is available to all Classy Llama clients.

Preparing For Black Friday and Cyber Monday

We’re less than 90 days out from Black Friday! It might seem like plenty of time to prepare if you’re a shopper, but merchants know – there’s never enough time to get ready for the chaos of holiday sales. At Classy Llama we’ve been helping merchants prepare for the holidays since 2007! Here are a few things we’ve observed over the years as November eCommerce sales have continued to grow:

Load Testing

The last thing you want is to orchestrate a fantastic set of holiday promotions and then have your site go down because your hardware couldn’t handle the load. Letting your customers test your infrastructure for you is an expensive way to learn! We recommend testing your site now, because if critical failures are uncovered, you can mitigate them now, before it’s too late.

Here at Classy Llama, we use Apache JMeter to do thorough load testing that covers the key components of the conversion funnel and simulates customer behavior on the site – from home page view through category pages, product pages, shopping cart, and checkout as both guest and registered customers. Don’t forget customer account creation as well, because hopefully, those shoppers are registering during checkout! Make sure whoever load tests your site is familiar with your eCommerce Platform, how it should be configured, and how it performs. For instance, Magento is a complex application with specific hosting requirements, and it can easily handle intense amounts of browser traffic and customer transactions. As long as proper coding practices are adhered to and the infrastructure has been properly setup and configured, your site should be able to handle the load.

Black Friday 2016 broke sales records, with a 17.7% increase in sales from 2015. Overall eCommerce traffic was up 220% on Black Friday and 155% on Cyber Monday. Your results may be higher – be ready!

Shipping & Sales Tax

Shipping and tax are often the “boring” parts of the checkout from the merchant’s point of view. After all, you’re not getting the revenue! However, if you’re using third party services for sales tax calculation or shipping rate calculation, you’re reliant on those APIs staying up – and those APIs are likely powering thousands of websites, all of whom are being slammed right at the same time you are.

Make sure your integrations have a user-friendly error handling system that allows a shopper to complete the checkout even if, for instance, sales tax can’t be calculated. It’s also possible to use a service like ShipperHQ to designate a backup shipping carrier in case your primary one goes down. You can also switch to table rates for both tax and shipping as a fallback in case a service goes unresponsive.

You may lose margin skipping sales tax collection, or going with a higher-price shipper. But that’s better than losing the sale and the customer. Start evaluating the key components of your checkout process today!

Promotions & Campaigns

Are you planning to do a big sale with doorbusters or limited time offers? Consider implementing a countdown timer on your site that builds urgency and interest in your sales. How about seasonal deal sites like BlackFriday.com or SlickDeals? These aggregators can drive extra traffic to your site, and they are the kings of holiday SEO among motivated shoppers looking for deals. Do you plan to roll out blog posts or other targeted content that supports a paid campaign? Get that copy written now!

Speaking of paid campaigns, think hard about your keyword bidding strategy. “Black Friday” and “Cyber Monday” will be pretty expensive keywords, but adopting a long tail strategy of combining product or region-specific search terms could boost your performance. Think “Cyber Monday deals on propane grills” or “Black Friday performance auto parts”.

Pro-tip: Make sure the URLs linked to in your promotional campaigns are landing users on pages which can be accelerated via a full page and/or Varnish based caching system. Linking to a non-cacheable page such as a search results page can rather dramatically impact site speed, even taking a site in some cases. In a scenario such as this, try using a category page created beforehand with the products you want the customers to see when they hit your site!

Finally, don’t forget about social media. It’s a great way to re-introduce your brand to customers who are already thinking about where to spend their money during the holidays, and it can be even more effective than PPC at acquiring new customers. Make sure your fans have a call to action besides likes and favorites – get them signing up for your newsletter, sharing your post, or clicking through to your site.

Fulfillment & Customer Service

Once you’ve got the sale, what next? Is your team ready for the barrage? There are some things you can do now to make sure your brand can deliver the goods and keep those customers coming back.

First, take inventory! You need to order new stock now, and step one is knowing how much you have right now. There are always hidden corners with pallets and boxes of inventory hiding out – maybe some of those items would make good doorbusters? Also, review your warehouse organization. Are the high volume items easy to reach for your packers? You’re going to sacrifice floor space for speed, so break out the measuring tape now and start thinking about where the people and the boxes will live. Speaking of people, do you have enough of them? If you need to cross-train your current team, or bring in additional staff to avoid burnout and shipping delays, you need to start before it’s crunch time.

The same advice can apply to your customer service team. Make sure they have the tools they need to be successful. One of the best things you can do is make your site as self-service as possible. Can you customers get answers to commonly asked questions without an e-mail or phone call? If you have holiday shipping and return policies, get those written and posted soon. Do you have technical products that might need an explanation of how to use them? Think about an FAQ section on your product pages, sizing charts for apparel, or link out to some Youtube tutorials. Now might also be a good time to look at live chat as a solution to reduce friction between an engaged shopper and your team of experts.

Server Monitoring

Chances are there will be some high-profile site outages during the holidays. Last year it was Macy’s, but long page load times, slow checkouts, and random 404s happen to a lot of merchants during peak traffic hours. Even if you’ve load tested your site, it’s still possible for higher than expected traffic or hardware failures to take down the most optimized merchant. Do you have a solution like New Relic installed on your servers, and have you reviewed your SLA with your hosting provider and systems integrator?

Don’t let your customers be your early warning system for a poorly performing site. Install monitoring software and setup automated alerts and a system for triaging issues now.

Advanced Analytics

A startling number of merchants aren’t aware that their Magento store is already equipped to tie-in with Google’s Enhanced eCommerce via a native Google Tag Manager plugin. It costs nothing to start tracking your customers shopping and purchase behavior. Turning this on won’t help you sell more during 2017, but the more customer data you can track now, the better you can optimize your site for 2018. At some point next year, you’ll want to analyze where customers abandon the cart or checkout process so you can help prevent them from falling out of your funnel.

For information on how to enable this valuable service, check out Magento’s documentation (M1, M2). Please note that Magento’s native plugin is Enterprise Edition specific; you’ll need a third party extension if you’re on Community Edition.

Email Marketing

You’re probably doing email marketing now, and plan to send an e-blast to your subscriber list letting them know about your great deals. Once you’ve identified your doorbusters & promotional items, you can segment your customers now and target the right group with the right promotion. This is a great time to get in front of potential customers today without waiting for them to search for you!  If your email service provider doesn’t support dynamic segmentation, you may have to do this by hand.

This is also a great time to grow your subscriber list more cheaply than trying to do it during the holidays. Get some promotional landing pages up now that have e-mail address captures (“Subscribe Now to Learn About Our Great Black Friday Blowouts!”), and bid on the keywords for those pages now while competition is low. Your CTA will be cost-effective, and when you do start pushing out targeted emails you’ll have a group of interested, motivated subscribers!

And of course, if you’re not doing automated cart abandonment emails now, set that up before the holidays! Triggered emails in general are as fantastic way to bring back people who have already engaged with your shop; check out this report!

This post is written by eCommerce Consultant, Aaron Sheehan. Learn more about Classy Llama’s consulting services.

The Ultimate Guide to On-Page SEO for Product Pages

The Ultimate Guide to On-Page SEO for Product Pages

Whether you’ve been selling online for years or are just getting started in eCommerce, it’s important to improve your site based on what your specific clients may need. Successful product pages have to be able to convert visitors into purchases. However, those pages also have to receive relevant traffic to be successful as well and a key way to getting that traffic is by ranking organically for search engines.

What is SEO & Why Is It Vital to Ecommerce Success?

You can increase your search ranking by focusing on Search Engine Optimization (SEO). SEO is the process of ensuring that your web pages appear when people are searching for keywords related to the products you offer.

There are many optimizations you can make that will have a huge difference on your site. Good on-page SEO makes it easy for users to know what any given page on your site provides, and will allow Google to easily crawl and rank it for relevant terms. By optimizing your pages, you are helping search engines drive free relevant traffic to your pages, which ultimately leads to more sales and revenue for your company.

On-Page Optimization vs External SEO

Before diving in, it’s important to understand the difference between on-page and external SEO. To keep things simple, external SEO encompasses site promotion and backlinks. While on-page SEO, is specific to changes you can make directly on your website. Here are some common on-page SEO factors:

  • Page Text
  • Media Usage
  • Metadata
  • Site layout and design
  • HTML & Structured Markup
  • Mobile Friendliness
  • Site Speed

You’ll need to focus on several key on-page factors to establish relevancy and authority. To help navigate the on-page optimization of your ecommerce website, we created this guide to improving your product pages.

How to Get Started with On-Page SEO

To get started, you will likely want to know two things: “How long does it take?” and “How much time do I have?” To answer the first question you will need to know how many product pages you have and estimate the time it takes to optimize one page. Optimizing a page or two can help you get a feel for the time per page. You then do some simple math:

Quantity of Product Pages  x  Optimization Time Per Page  =  How long it takes (for all pages)

If you only have enough time to do let’s say 50 pages, and you have 5,000 product pages. We recommend you either get outside help from a marketing agency or prioritize the pages you optimize based on which pages are the highest value for you. This process will help you assess to scope of the project and determine how best to move forward before you get too deep into it.

Do An SEO Audit Of Your Pages

To better understand your current rankings and site’s SEO value, you can use a free tool such as SEOptimizer or Woo Rank to perform an audit of your site. This is a great place to start as you can then evaluate where your starting point is and how to improve it. The next step is to dive into keyword research.

How to Research and Identify Good Keywords

One of the biggest mistakes merchants and webmasters can make is to skip on keyword research when launching a new site or maintaining their current website. Your website content needs to be relevant and easily digestible to achieve optimal SEO results. By optimizing for relevant keywords, you can improve your overall site performance as well as increase organic support from Search Engines themselves.

Have a Process for Keyword Research

Before you begin your keyword research it’s important to have a process in place and a way to stay organized along the way. The process for keyword research we use at Classy Llama recently allowed us to see an increase over 30% in organic search traffic in just one month. You are free to use our template and guide for your e-commerce site.

Stay Organized by Crawling Your URLs

A site crawl will allow you to important page data into a spreadsheet really quickly. This can help you stay organized when doing research and making changes to your pages. The crawl will also check for any existing errors within your pages. A simple tool we would recommend for site crawls is Screaming Frog’s SEO Spider, which is free for the first 500 pages you crawl. You can use this to identify what product pages you have and what is currently showing as your titles or meta descriptions (if anything).

Have Tools in Place for Gathering Keyword Data

You can research current or potential keywords using a variety of free tools such as Google Keyword Planner or Ubersuggest. These tools will provide data on whatever term you submit. When performing research, it’s ideal to identify both a primary and secondary keyword for each page, and list out any additional or potential keyword phrases for future reference.

Put Your Keywords in a Spreadsheet

Once you determine the keywords you will be using, document them in a spreadsheet for later use. You will use these keywords to create page and section titles, as well as meta descriptions. Keywords should be used throughout the page; read on to learn how to do so.

Identify Good Keywords for Your Product Pages

The Keyword(s) Should Be Relevant to the Product

What makes a keyword good? Is the most foundational thing to know when doing on-page optimization. First and foremost, relevancy to the page or product is the most important factor to consider when selecting the keywords you will include on your product pages in hopes to rank organically for them. If the product isn’t relevant to a search phrase, you won’t receive the right kind of traffic, which means they are less likely to convert into sales. Additionally, Google will be less likely to rank your content because the user behavior and overall quality of your page to the key term would be low.

There Should Be A Good Amount of Search Volume

Just because a key term is relevant, doesn’t mean that it is going to do you any good. In order to have traffic coming from those terms, people need to be using those terms in the search engines. It is important to note that there is such a thing as going for terms that have too much search traffic, because you will likely not rank for them due to the massive amount of competition that exists for those highly searched terms. It’s all about finding the sweet spot between being too broad and facing massive competition and being to specific and not getting enough searches to really impact your business.

The Organic Competition Should Be Low Enough For You To Potentially Rank

Another factor to look for is low organic search competition. If there are a lot of companies competing for a specific phrase or term, you will have to depend on paid clicks to obtain traffic. It is best practice to identify keywords that you can actually rank for in the top page (and receive over 70% of clicks by doing so). To determine the organic search competition, you can use a program such as Moz Keyword Explorer, or a free alternative such as  SERP Stat. Quality keywords will have a steady search volume.

Select More than One Keyword/Phrase Per Page

When doing keyword research, consider the primary, secondary and long-tail keywords you may target in your articles. A “primary keyword” is the keyword or phrase that you most desire to rank for based on relevancy, search volume, and organic competition. Therefore, the primary keyword should be the most important keyword on each page. In turn, the primary keyword should be included in the title, as well as in the content itself. A “secondary keyword” is second option that can help to expand into other search queries. Also consider overarching keyword families and themes to pull from. Make sure to conduct research regularly and maintain your site in accordance with market trends and updates.

A Guide for Optimizing Your Product Pages for Search Engines

Now that you have done your keyword research, it is time to start making improvements to your product pages. The most foundational thing to start with is what a searcher sees when your page pulls up on the search engine results page, the title and meta description:

Write Informative Titles and Meta Descriptions

Optimize your webpages by implementing unique title tags and meta-descriptions. Title tags signify the title of an individual webpage, and show as the headline in search results. Meta descriptions are snippets of HTML code that provide a compelling summary of the page’s content. Generally speaking, search engines will show the meta description and the title in search results. It is best practice to keep title tags around ~50 characters, and meta descriptions should be ~160 characters. The data can also be used by social media platforms when a links are shared to create a social link card.

Focus on making unique key phrases that can be used on the page. Here is what a title tag looks like if you view the source code of a webpage.

<head>
<title>Fruit Popsicle Maker, Set of 6 Ice Pop Molds with Drip Guards and Tray  | FortheChef.com</title>
<meta name="description" content="On warm summer days, nothing beats the flavor of a chilled fruit popsicle. Fill these convenient popsicle molds with your favorite fruit juices or flavored ices and stick them in the freezer. Popsicle molds come with an easy popsicle stand that holds your" />

If your meta-description isn’t up to Google’s standards, it will generate its own description so it is important to meet their guidelines to retain control. A good tool for auditing your existing pages is Screaming Frog’s SEO Spider. With this tool, you can see every URL and meta description, as well as their character counts. Be sure to input optimized metadata on every page of your site. It is best practice is to keep these between 165 and 175 words.

There are many free or paid plugins and extensions you can use to easily optimize your page’s title tags or meta descriptions depending on the ecommerce platform or content management system you are using. I have listed some below:

Make Quality Product Pages that Users and Search Engines Love

Google wants their users to find quality content that is relevant to their search query. That means that if users don’t like the pages the find, neither does Google. As a result, your rankings in their search engine go down, which means less relevant traffic and less revenue generated from organic search. in fact the same is true for paid ads on Google as well. They give preference to content quality and you should too. Not just because search engines do, but because you should fundamentally care about the experience your users have with your brand. That is because great experiences lead to better conversion rates and repeat customers. Below are some things that can help you improve the quality of your product pages and intern, improve your rankings:

Write Detailed (Human & Search Friendly) Product Names

It’s time to match your content with its keywords. To do this, you will first need to write a detailed product name. It is important to assign a relevant “Heading 1” that includes your primary keyword phrase.

Write a Custom Description With the User (and their search queries) in Mind

Rather that using the standard, out-of-the-box product description written by a manufacturer, take time to differentiate your product – share the compelling details. When writing your description, consider the user first: who would want this product, and why they need or want it?

Go in-depth, but format for easy consumption

Be sure to provide in-depth product details for each product. Highlight key product features, and include all available option of the product. The important details, such as color and size options, compatibility, and product numbers, should be included as well (depending on the product). Just remember to format your pages so that the extra detail is easy for a just to consume.

Include great images of your products

To better communicate this, your pages should include useful product photos: well-lit images that clearly identify the product being sold, and show the product in use.

Offer customer reviews, video content, and FAQs when possible

Essentially, the content you provide should provide more than enough information to sell the product listed. You can provide additional product resources based on specific customer needs – FAQs, customer reviews, and video content (such as comparisons, usage, etc). – to better guide the user’s buying decision.

Focus on the needs of the customer

Good SEO content is based on the quality of your connection with users. Focus on what they need most, and what you can do to meet that need. Empathize with their desired goals, find answers to what they want to know, complete a purchase, etc. By answering your user’s questions and breaking the content down into digestible pieces, you increase your chances of ranking higher with more relevant content. Well-written product descriptions can help increase engagement and will encourage visitors to convert into purchasers.

Optimize Your Images for Search and Speed

There are many benefits to providing imagery on a product page. Naturally, consumers want to understand the product they are receiving prior to purchasing it, but also search engines see the use of relevant images on a page as positive indicators of content quality. So how does a search engine know if an image is relevant?

Tell search engines what your image is with simple metadata

It is important to note that search engines cannot see an image and decipher what it is about. Instead they rely on metadata, such as alt text, file name, and captions to understand what the image is about.

Use Alt Text On All Your Images

Alt text is an HTML attribute tag added to image elements to explain to search engines what the image is about. Add alt text that describes the image to  increase your site’s accessibility to screen readers and crawlers.

Write descriptive image file names before uploading

The image’s file name helps bots associate the image with a target keyword. Before uploading the image to your site, rename the image file to something more descriptive.

Use Captions when it makes sense

Captions is a visible description on an image for all your users to read. They also provide additional detail to search engines about your image. We recommend the use of captions when possible. However, captions are not necessary to optimize your images.

For Videos: Transcript or Closed Captioning

Video’s are another item that search engines can’t really see. The best way to help search engines understand your video content and make your site more accessible to the deaf and hard of hearing is by  providing a transcript of the video or closed captioning

Reduce Image File Size

Keeping image file size low helps improve your page load time which is a factor in search and improves the overall experience of your site. Compressing your images and reducing file sizes before uploading are a few simple ways to improve this. There are many other ways to further reduce image size, that we would recommend asking your developer about.

Provide Links to Related Products and Information

You may have seen sites out there that place related products on their product pages. This is a great way to help users find other products that they may need as well when shopping through your online store, but it has another advantage as well. Providing links to related products also helps search engines see your page as more relevant because the associated links on the page are related to the search terms as well.

When adding related products to your pages, you are giving customers an opportunity to compare products or add additional products to their shopping cart. You can present related products in whatever way fits your customer best: “Product B, C, and D are similar to product A,” or, “customers also liked X product.” Choose the language and style that expresses your products best.

In addition to related products, links to pages with more information about the product or the brand that created the product builds further trust and relevancy because the search engines see that some of pages your product page links to are relevant as well. Although these Provide links to related products and information to help users understand the value of your product.

Use Readable URLs That Include Your Keyword

URL strings should be short, descriptive and easy to read. URLs help identify what the page is about without including a large set of confusing numbers and symbols. The readability of a URL can be determined by a number of factors. Analytics have shown that shorter URLs rank better than the long ones. Since the URL should give context to know what the page is about, be sure to include your primary keyword in the string.

The title, meta-description and the URL are the factors you use to clarify what a user should expect from your page. An optimized, keyword-friendly URL easily projects what content the page includes while adding relevancy to your ranking. This will help bring the right audience to your products.

Focus on the User’s Experience

It is important to make your site user-friendly. Always remember that your primary audience is not robots or search engines, but people. Another thing to keep in mind is that Google’s algorithm ties back to their desire to satisfy users’ search queries with relevant content. Because of this mission, Google’s bots are looking for sites that offer a user-friendly experience for their visitors.

Think through the eyes of the customer

To identify what you could improve. Put yourself in the customer’s shoes and go through their entire journey. If it’s hard for you to do that. You can always sit down with someone that has never been to your site before and have them think out loud as they go through the customer journey.

Improve Their Customer Journey

Now that you have walked through the customer’s journey, what are things you can do to make their experience more enjoyable? Was the site hard to navigate and difficult to find the product specific product? Was the call to action button easy to find? Were there enough photos to get a full view of the product? Was the description detailed enough to make a confident purchase? Was the checkout process quick and easy? Or confusing and frustrating? Did I have to spend a lot of time thinking how to use the site? Were there any elements that could be confused as links or buttons because of the way they are styled? Do I know when to expect my package? Were there a lot of pop-ups that interrupted my experience? Continue to ask questions like these and then take action!

Get insight from your analytics

You can track user behaviors such as their time on the page or site, bounce rate, and pages per session to better understand where you can improve. It is important to notice where your customer is experiencing frustration throughout their purchasing, and to address those pain points effectively. By offering an experience that is painless, enjoyable, and relevant, you increase the likelihood of repeat customers

Make Your Site Mobile Friendly

With so many consumers shopping on their phones, it is crucial to have a fully-responsive and mobile-friendly site. The standard desktop version of a site is typically difficult to view on mobile devices. If a site is not mobile-friendly, users will have to zoom in to view the content. Users will find this frustrating, and will likely leave the site. Alternatively, a mobile-friendly site is easily read and immediately usable.

Mobile accessibility is critical to your business and its importance will continue to rise. Search engines now suppress sites that are not mobile friendly. Be sure that your visitors have a good experience on your site, even if visiting from a mobile device. Google has created a Mobile-Friendly Test that will score a URL based on how easily a visitor can use your page on mobile. They have also published mobile optimization guides for many of the popular content management systems (CMS), such as WordPress and Magento.

Make Your Site Secure

When it comes to interacting and purchasing items online, customers expect to be protected. The standard was set when Google announced its “HTTPS Everywhere” campaign in 2014, stating that all sites “should be secure by default.”  In the years since, Google has revealed that they will, in fact, index and rank secure pages over unsecured content. For more insight into how Google interprets secure site, take a look at their guide: “Securing Your Website With HTTPS.”

Having an accessible Privacy Policy on your site is another factor that Google has mentioned for years it a factor in their quality scoring of pages (for AdWords) and is believed to be a factor in organic rankings as well. A privacy policy allows there to be transparent between your site and its users with how their information will be used and protected.

There are far more components to website security that are worth talking with a developer or web security expert about. As far as SEO is concerned, using HTTPS and having a privacy policy are key things search engines look for.

Make Your Site Fast

Site speed measures how fast (or slowly) your web page loads. Google has confirmed that site speed is one of the signals used by its algorithm to rank pages. A slow page speed means that search engines crawl fewer pages using their allocated crawl budget, which could also negatively affect your rankings. It is important to test your site speed regularly and take steps to increase load times whenever possible. Here is a short list of things to do to improve your site speed, but keep in mind, there are many other performance enhancements than these listed below:

Test Your Site Speed

There are a few essential tools you can use to test and monitor your site speed. Utilize a free website speed test, such as Pingdom or GTMetrix, to analyze load speed and receive recommendations on how to make them faster. Google also has a free tool, PageSpeed Insights, that will provide recommended optimizations, as well as show which optimizations are currently found.

Optimize Images and Leverage Caching

There are many ways you can increase page speed, such as optimizing images, file size, and type. You should also leverage browser caching so that when visitors return to your site, the browser doesn’t need to fetch the entire page from your server. Use a free tool like YSlow to check whether or not you have an expiration date assigned to your cache. Google has more information about how to leverage caching here.

Minify Your JS and CSS

You should also minify JS and CSS file sizes whenever possible. Minification is where you reduce the file sizes of your code by removing spaces, commas, and other unnecessary characters. The reduction in file size improves the load times of your pages because there is less to download from the server. Google recommends using YUI Compressor for both CSS and JavaScript, however there are many other ways to minify your files.

Ensure Your Site Gets Crawled

When you launch a new site or you have made changes to the url structure of your site. You don’t want to assume that search engines will index your new pages automatically. In order to help get your web pages crawled faster, it is important to create a spider-friendly XML sitemap. An XML sitemap is a data file that lists all of the pages within a site. Search engine robots use the sitemap to identify pages to be crawled and indexed. To create a XML sitemap, you can use free online software such as XML Sitemaps or there are other methods depending on the eCommerce platform you are on.

Once you have the sitemap, you will want to submit it to Google Webmaster Tools. You can re-submit your sitemap at any time to coincide with any changes to your website. By using tools like Google’s cache, SEO-browser.com, and the MozBar extension, you can monitor which elements are visible and indexable to search engines.

Conclusion

Although it can take a bit of effort, in the end it is worth it. By following this guide, we hope you’ll begin to see the benefits of it for your business. Optimization is a complex subject, but it does not need to be overwhelming. Start with just a few of your most important pages and keep working down the list over time. In the end the efforts can pay off big time, but it is important to note that SEO doesn’t have to be something you do in house. If you are wanting to get some expert help to move the needle for you we know some great folks that can improve your product marketing.

How to Increase Organic Traffic with Keyword Research

You know what happens when you don’t do keyword research and optimize your pages for search engines?

THIS.

This is our real traffic data from April 2017 vs the previous year. Yeah, ouch. Due to tight deadlines for our March 2017 site launch, we decided to hold off on keyword research until late May.

However, we recently researched and implemented keywords in June for 200 of our web pages. We are glad we did. In fact, here is what we saw:

BAM! Our organic search traffic went from -12% YOY to +20.5% in just a few short months, making a total of 32.5% growth in organic search traffic just by going through the same steps I am about to show you.

So how did we increase our organic search traffic by 32.5%?

With these eight steps, we are going to walk you through the process of how to implement keywords on your SERP (search engine results page) titles and meta descriptions. Although detailed, this tutorial is not a substitute for experience. The process may seem monotonous and frustrating at first, but you will catch on with some experience.

We will also note that optimizing every page title and meta description will take up a large amount of time. This is not a project to finish in one day (or even one month, depending on the size of your site).

Are you ready to get started?

We are going to give you all the tools you need to guide you through keyword research and optimizing your pages for search engines. If you want to get the most out of this tutorial, we suggest that you use the Keyword Research Template that we provide. However, if you already have one you like to use, no worries! You can still follow along with your worksheet.

  1. Perform a Site Crawl to Get a List of Site URLs

Any SEO specialist worth their weight does site crawls, and you should too. A site crawl will list every (crawlable) URL on your website in a spreadsheet and check for errors. To do keyword research effectively, you need all of your URLs on a spreadsheet. You have a countless choice of free website crawlers. Our favorite free product and the one we will be using in this tutorial is Screaming Frog’s SEO Spider. However, Screaming Frog only crawls 500 pages for free. If you need more than 500 pages crawled, or you plan on doing multiple crawls in the future, you will need to buy a program. Our favorite SEO suite here at Classy Llama is Moz Pro. Starting at $99 a month, we use Moz for keyword research, site crawls, link building, and more. With it, you are getting a lot more than just a web crawler.

  1. Put URLs, Titles, and Meta Data in that Spreadsheet

Once the site crawl for your website finishes, you are going to copy and paste all of the relevant data to your spreadsheet. Start pasting in the URLs from your site crawl into our Keyword Research Template.

Whether you are using Screaming Frog, Moz Site Crawl or some other crawling service, your next step is to copy and paste the page titles and meta descriptions to our spreadsheet under, “Titles before SEO” and meta descriptions under, “Meta Descriptions before SEO.” You can manually enter the titles and meta descriptions, but it takes a lot of time. Make sure all that glorious data match up accurately with the URLs.

Note: For the sake of this tutorial we are only going to put a handful of pages on our spreadsheet. Your spreadsheet could be a few hundred rows depending on the size of your site.

  1. Take Out All Unnecessary Pages

Although the initial number of pages may seem daunting at first, we are only going to find keywords for real pages that we want to show up in the Search Engine Results Pages (SERPs). That means that we need to remove all URLs that represent images and pages (example: www.website/category/blog/page/50) by deleting the respective row. After you narrow down your URLs, you should have a number that is manageable (or maybe just a little less daunting than before).

Once you have all of your URLs, titles, and, meta descriptions (before SEO) in the spreadsheet, you are ready to start researching for keywords.

  1. Determine Keywords via Search Volume, Difficulty, and Relevancy

You should now have a template with all of your usable URLs, along with their respective titles and meta descriptions. Now it is time to dig deep and find keywords.

As a general rule, you want a primary and secondary keyword. The primary keyword should be in the SERP title and once in the meta description. The secondary keyword should be seen at least once in either the SERP title or the meta description.  If you can fit the secondary keyword in both, even better. It’s important to note that not only should your titles and meta descriptions have keywords in them, but your actual page content should make use of those keywords and cover the related topic.

Google uses semantic search, so the key to finding a good keyword is that you need to fulfill the searcher’s intent with the page you are hoping to rank.

For instance, if you are trying to sell some sweet high-top shoes to the youngsters out there, a keyword like “shoes” is too broad to fulfill a searcher’s intent. However, if we use a keyword like “yellow high-top shoes,” we are more likely to attract the type of searcher that you want. This is what we call a “long-tail keyword.” When searching for keywords, you want to get as specific as possible while keeping search volume high and organic competition low.

At Classy Llama, we use Moz and Google Keyword Planner as our two primary tools when it comes to gathering data on keywords. In our opinion, we trust Google’s search volume more than Moz’s search volume indicators. However, if you plan on using Google Keyword Planner at any point (which is more of an inevitability than an option), take the search volume with a grain of salt. Also, you will only get accurate information from Google if you are actively running ads. To learn more about Google’s keyword tool, check out this study Keyword.io did where they measured 57 billion Google searches. Warning: you will geek out over how much information Keyword.io put into this blog post.

Speaking of which, if you do not want to use Google Keyword Planner, Keyword.io has their own system that you can use for free.

  1. Find the Organic Search Volume for Keywords

In general, do not consider keywords if they do not have any search volume. Beware of keywords that have less than 20 searches per month. When you pull search volume from Google Keyword Planner, here is what you will see.

We see that “guide to SEO” has an average of 210 searches per month. Google also says that this keyword has “Low” competition.

Assessing the Search Volume for the Keyword

The ideal keyword has high search volume and low organic difficulty. Instead of using a “one-size-fits-all” approach, you need to grade a keywords search volume subjectively.

  • For one, you need to ask, “How big is the industry/community that I am trying to reach?”
  • Second, you need to ask yourself, “How much content already saturates the subject my content focuses on?”

For example, if you are writing about the history of llamas (which, you’re in luck if you are because we have an unusually large amount of knowledge on that subject), you should expect most keywords to have lower search volume. However, if you are writing about the history of Google, then you should expect most keywords to have very high search volume.

In short, to judge the quality of a keyword’s search volume, you cannot compare apples to oranges, or in this case, the keywords, “llamas” to “google.” You must look at other related keywords and their search volume to get a good idea of what constitutes high, medium, and low search volume within your specific subject. However, we want more insight than this to judge the possibility of us ranking against the organic competition.

  1. Determine Difficulty Score for Keywords

Once we have search volume we will bring the keyword over to Moz’s Keyword Explorer to get the difficulty score (in which non-members have just two free searches, we know, sad!). Unlike Google Keyword Planner, Moz gives each keyword a numerical difficulty score, as well as a list of other domains that are currently ranking for the respective keyword. If Moz won’t work for you, there is a free alternative called Serp Stat you can use instead. By using Moz, we get this result from the term we talked about earlier, “guide to SEO.”

But wait, I thought Google Keyword Planner said “guide to SEO” had low competition? Why does Moz say “guide to SEO” has (with 100 being the highest) a difficulty score of 91? Also, why does Moz say “guide to SEO” only has 10-50 searches a month while Google says it has around 210 searches per month?

The Differences Between Google Keyword Planner Competition Score vs. Moz Difficulty Score

Yes, this is the world of SEO that we live in. One thing to keep in mind is that Google Keyword Planner is showing you the amount of competitive bidding for the keyword in AdWords. In other words, it has little to do with organic search difficulty. That is where the Moz Difficulty Score comes in. It’s based on the level of difficulty there is to rank organically in a search.

Reasons for Google Keyword Planner Search Volume Data Being Different Than Other Search Volume Gathering Tools

Google’s search volume is generally higher than other programs. This could be because you see global results from Google and national results from third parties, the third party apps could be using data that is not as up to date or full. Another scenario is the keyword data could be reflecting phrase match in one instance and exact match in another. Either way, we believe it is best to favor Google for search volume data over third parties.

The data we use to assess the quality and competition for keywords

By using the search volume of Google and the difficulty score of Moz, we believe that we can mitigate the differences between the programs to achieve reliable figures. Again, if Moz doesn’t work for you, give the free program, Serp Stat a try to get some difficulty data.

Reading the Keyword Difficulty Score

Once you have a grip on search volumes, it is time to check difficulty scores. Remember, since every program judges difficulty slightly different, you should stick to the same program once you start using it.

So what is a “good” difficulty score? Again, it depends. Almost any search engine suite like SEMrush or Moz will tell you your domain authority, as well all of your pages’ page authority. Domain and page authority will determine how easily you will be able to rank for the #1 SERP spot. New websites likely have low authority and should avoid trying to rank for keywords over 30 (measurement from Moz). This will also limit you in using keywords with very high search volume (since high search volume almost always correlates with high difficulty).

The Importance of Relevance & Content Quality

No matter how many great keywords you find, you will never rank if you produce terrible content. Search Engine Land’s Periodic Table of SEO Success Factors provides a comprehensive overview of Google ranking factors.

Specifically, they summarize why you need great content, along with great keywords, to have a chance at ranking in search results.

To reiterate, when you research keywords, you must consider them subjectively against other related keywords. Some topics are more saturated and difficult than others. Some pages are also better suited for social media sharing. In the case that you write an article for social media hits, you can have more liberty with your copy and worry less about implementing keywords. Either way, your keywords need to be highly relevant to your content.

Here is the workflow we use when trying to find a good keyword. Feel free to download it for reference. You need to answer these three criteria with a strong “yes” before deciding on a keyword.

Once you find a keyword with high search volume, low competition, and a high amount of relevancy to your subject, it is time to enter them into the spreadsheet next to the page you wish to implement them on.

If you have any additional keywords that you saw during research, put them in the “additional keywords” column. You can use these keywords in on-page copy.

  1. Change Titles and Meta Descriptions to Implement Keywords and Publish

Insights on Adding Great SEO Titles

Now it is time to change your page titles and meta descriptions to include your primary and secondary keywords. First, we will start with creating new titles. Remember, it is better to have a title with less exact keywords that are attractive to searchers than to have a title with lots of keywords that sounds spammy to searchers.

The character length for titles needs to stay under 70 characters and over 45 characters. In fact, staying under 65 is a good way to avoid getting content cut off.  If the titles are too short, you run the risk of not getting enough description. However, if the titles are too long, you run the risk of looking sloppy and unprofessional. Add usefully and keywords to your titles but remember that those titles are not only seen but search engines but for users as well, so so they should be user-friendly.

Guidelines for writing meta descriptions

Your meta descriptions should have both your primary and secondary keywords incorporated. This should also help a searcher better understand your page, so make sure it adequately describes what you are offering on the respective page. Another important note for creating meta descriptions is to keep the description under 170 characters. Google will not show anything over 170 characters. However, since some letters take up more space than others (i.e. “W” vs. “I”), the max amount of characters will vary in each situation. We find that the sweet spot for meta descriptions is between 150 and 160 characters.

This is what your SERP titles and meta descriptions should look like when done. If Google truncates anything, your title or description is too long, and you need to find a way to shorten them.

  1. Publish Your Work on Your Web Platform

Depending on your web platform, there are different extensions/plugins that you can use to edit your titles and meta descriptions. Some platforms have a built-in way to do it as well. The following is an example of the Yoast interface.

Below are some links to more information about implementing SEO on some of the most popular platforms out there.

Magento – Hundreds of plugins exist for Magento. However, if you are using Magento Commerce or Open Source, you probably have a sizable website. We recommend that you consult with a developer before implementing any plugins. If you do not have a developer, we recommend Nucleus Support. They are a pay-as-you-go Magento support agency, which we highly recommend.

WordPress/WooCommerceYoast – Free

If you want to do some more digging, there are a few other great WordPress plugins available.

Shopify Plug in SEO – Free (Pro version $20/month)

There are also many other options for Shopify SEO plugins

Squarespace – No Plugins Available.

Here is about everything you need to know about working on SEO with Squarespace.

Once you implement keywords into your titles and meta descriptions, you are now ready to publish your work. We have included a “status” column, along with other useful columns, on the spreadsheet to track what changes you have to your web pages. We also use this for peer review before publishing changes.

Recrawl your site

As you are making progress, it is important to keep re-crawling your site for errors to make sure the changes you are making are correct, or if any new errors are happening from the changes, you are making. Here is a chart of the crawl errors we had on our site and the change this process made in bringing them down.

In this case, many of these crawl errors were classified as missing titles and meta descriptions. As the line dives down, our organic search (and our general sense of accomplishment) went up.

Conclusion

Now that you know some of the basics of keyword research, we hope you will give it a try. If you do keyword research well, each page should take about thirty minutes from start to finish. Revamping the keywords on our site took us about 150 hours to complete. A small price to pay for a 32.5% increase in organic search traffic. If you are looking for an expert to help improve your organic search traffic, we have a solid marketing services team you should talk to.

About the author: Hi, my name is Don Glunt and I currently work in Classy Llama’s internal marketing team, focusing on SEO.

If you enjoyed this walk through, be sure to share it and subscribe to our e-commerce blog. If you have questions, feel free to ask in the comments below!

Contact Us