Development


Magento 2 vs Magento 1 pricing differences

Advanced Pricing

Advanced pricing is a section where you can setup specials and tiered pricing.  The functionality is the same as in M1, but they’ve just moved and renamed some functionality.

There are two kinds of advanced pricing in magento 2.

  1. You can set a special price for a date range, which was already available in M1.
    1. Special price to and from date is missing in Magento 2 EE. This is because Magento intentionally removed it from EE so admins would use scheduled updates instead.
    2. In addition to specifying a fixed price discount for tiered pricing, in M2 tiered pricing can be a percentage off discount.
    3. M2 has an input for product cost, which has no value that I can find.  It’s not in reports or anything; it does get inserted into the order quote though.

 

Configurable Products

In Magento 1, once the simple product is associated to the configurable, the simple’s price no longer matters; it’s not used.  It’s still visible when viewing the configurable’s simple products and adds confusion.  In M1 the variations’s pricing is based off the configurable’s price plus a difference of fixed amount or percentage.  The difference can be negative. 

In Magento 2, configurable variation pricing is one of the following:

  1. All simple variations inherit the price from the configurable
  2. A price is specified for each simple. The difference from M1 is, the price you specify isn’t based on the configurable’s price at all; it’s independent.  If the configurable’s price is $20, and you want this simple’s price to be $25, you’ll specify $25 in M2 instead of $5 in M1.  This works much better if you’re pulling in prices from an ERP that has the full price specified. 


A faceted navigation that’s optimal for both site visitors and SEO

A project of mine suffers from over categorization as described here https://baymard.com/blog/ecommerce-over-categorization . There are too many sub categories, many of which contain just a product or two, that silo the visitor into a cumbersome experience. Imagine you visited a site and viewed their TV’s and you looked at their category for 40″ TVs. But then, you decided to view other TV’s, so you viewed the 42″ category, and then the 46″ category. The same would happen if you wanted to shop TV’s by brand, type, or another feature. It would take a long time to browse all available TV’s with the features that are valuable to you! This is an example of over categorization. Instead the categories should be turned into a TV’s category with a variety of available facets (filters) that can be applied together.

Aside from a good information architecture, site speed is important. An ajax based navigation, such as this one https://www.lacrossetechnology.com/products/weather/weather-stations provides a great user experience because only the products will reload when a filter is applied. An entire page reload when a filter changes is not necessary, which improves performance.

While an ajax based navigation is great for visitors, it’s terrible for search engine optimization because:

  1. The filters (facets) and combinations of filters won’t have unique meta content or in page descriptions like the previous sub categories did. With the previous over categorization there was a separate category for “Sony TV’s” that had a unique URL, page title and meta data, and a unique in page description. This is extremely important for SEO and is lost when switching to a general TV’s category with a brand filter (Sony).

    Solution –
    I was happy to find this Amasty extension https://amasty.com/improved-navigation-ajax-layered-navigation.html solves the problem. Try out the filtering on this demo http://improved-navigation-1910.demo.amasty.com/improved-navigation-1910/women/dresses-skirts/dresses-long.html . Notice I’ve linked you directly to the category page with a few filters applied; the combination of filters produces a unique URL without a query string (dresses-long.html) that is built in the same order every time for consistency. Additionally, this unique set of filters will dynamically change the page’s meta description, heading, and show/hide cms blocks of your choosing. You get the best of both worlds here – ajax driven navigation for the user and unique page content for the search engine. The downside it is takes a fair amount of configuration, but it’s worth it. This is especially important if we’re rearranging site categories and changing unnecessary sub categories, which have link juice, info filters.

  2. The filters (facets) and combinations of filters won’t get indexed by search engines like the previous sub categories did. Take the TV’s category for example – there will be one URL for TV’s that your ecommerce solution, such as Magento, will include in the Google sitemap. If you want to link the visitor directly to Sony TV’s it’s possible but with an ugly URL that won’t be included in the google sitemap by default. This URL will be in the form of a query string like tvs.html?brand=sony&size=46, which are not preferred by search engines.

    Solution –
    Build or buy functionality that will add URL’s of your choosing to the google sitemap. Again Amasty to the rescue with this module that allows you to add URL’s of your choosing https://amasty.com/magento-xml-google-sitemap.html .

I found these related articles helpful
https://moz.com/ugc/guide-to-ecommerce-facets-filters-and-categories
https://moz.com/blog/building-faceted-navigation-that-doesnt-suck
https://www.practicalecommerce.com/SEO-When-Product-Facets-and-Filters-Fail


Magento 2 Solutions Specialist

The other day I passed the Magento 2 Solutions Specialist exam. I cannot provide details of the exam, but I’ll say there were a number of challenging questions. I found the study guide and practice test from swift otter to be very helpful https://swiftotter.com/technical/magento-2-certified-solution-specialist-practice-test , but there were some incorrect statements that should be fixed. I have emailed Joshua with this request.

“Inventory is associated with a specific website.”
This is incorrect. Invetory Qty is global.

“Flat product pricing can be changed on a store view basis.”
Product price is global by default, but can be changed to “website” (not store) in stores->configuration->catalog->catalog->price .

“What marketing and merchandising features are available only in Magento 2 Enterprise Edition?”
1. Bulk ordering doesn’t exist out of box.
2. Bluefoot CMS is not built in. Module today has been deprecated.

“What does the acronym MOSCOW stand for? How is it used?”
MosCoW is a way determining the importance of requirements for a project, hence the term MoSCoW Prioritisation. MoSCoW stands for Must haves, Should haves, Could haves, Won’t haves. The o’s are added to make the acronym pronounceable and memorable.

Details of the exam are here https://u.magento.com/certified-magento2-solution-specialist#.WkfCtt-nFhE .

MAGENTO 2 SOLUTION SPECIALIST OVERVIEW

A Magento 2 Solution Specialist is an expert user of the Magento 2 ecommerce platform. Drawing on a deep background in business and ecommerce, the Magento 2 Solution Specialist can efficiently align business objectives with Magento 2 functionality, optimize use of native features, and avoid unnecessary customization. Whether as a merchant, a manager, a consultant, or an analyst, the Magento 2 Solution Specialist knows how to make the best use of Magento 2 features and functionality.

A Magento 2 Certified Solution Specialist has deep familiarity with the Magento platform, including:

Magento 2 Architecture: layouts, themes, extensions and customizations; Magento data models
Elements of a Magento 2 ecommerce site: catalog, shipping, payment, order processing, promotions, extensions, import/export, etc.
Application of Magento 2 knowledge to business goals: mapping client needs to Magento features, recommending the most effective options for implementing client requirements in Magento
ABOUT THE EXAM
75 Multiple Choice items
90 minutes to complete the exam


Magento 2: cron “Too late for the schedule” message in cron_schedule table

I ran into this issue today where every cron job would get created a few seconds after when it was supposed to execute. Because of this it would fail to run.

Notice the “send_notification” cron job at the top was executed, but then never finished and the “Too late for the schedule” message started shortly after. Geil Berkers also encountered this issue with Magento 2 in his post https://gielberkers.com/solving-too-late-for-the-schedule-with-magento-crons/ .

The issue with that cron job caused all subsequent crons to become too late for the schedule. As a temporary solution I manually entered a date in the “finished_at” column of the “send_notification” record and within a few minutes all crons started running again.


Magento 2: Add grid column with a link in each row

I was tasked with adding a column with a link in each row to a custom grid in the Magento 2 admin panel. This grid does not use Ui Components. It took quite a while to find the solution, so I’m posting here to save for later and also for your viewing. This file is \Block\Adminhtml\$area\Grid.php and adds a “Delete” link to each row. The below sample uses a value for “id” for each data item in the collection (“index”), and adds an “id” URL variable with the id value to the hyperlink.

protected function _prepareColumns()
{
	//.... other columns here
 
	$this->addColumn('action', array(
		'header' => __('Action'),
		'width' => '100',
		'type' => 'action',
		'getter' => 'getId',
		'actions' => array(
			array(
				'caption' => __('Delete'),
				'url' => array('base' => '*/config_cms_page_field/delete'),
				'field' => 'id'
			)
		),
		'filter' => false,
		'sortable' => false,
		'index' => 'id',
		'is_system' => true,
	));
	return parent::_prepareColumns();
}

Further enhancements might include adding a confirmation popup once the delete link is clicked. For that we’d use this instead of the “url” array key. The trouble I had is what variable is used for the “id” of each row. If you can figure it out please let me know. A view renderer may be needed for this.

'onclick' => 'deleteConfirm("'.__('Are you sure you want to delete this?').'", \'' . $this->getUrl('*/config_cms_page_field/delete', ['id' => 111]) . '\')',