<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gj |</title>
	<atom:link href="https://blog.gaiterjones.com/category/magento/magento2-migration/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.gaiterjones.com/category/magento/magento2-migration/</link>
	<description>gaiterjones</description>
	<lastBuildDate>Thu, 30 Jan 2020 17:49:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>
	<item>
		<title>Create Custom Product Attributes and Groups in Magento 2</title>
		<link>https://blog.gaiterjones.com/create-custom-product-attributes-and-groups-in-magento-2/</link>
					<comments>https://blog.gaiterjones.com/create-custom-product-attributes-and-groups-in-magento-2/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Fri, 19 Jul 2019 10:14:08 +0000</pubDate>
				<category><![CDATA[Catalog]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento2]]></category>
		<category><![CDATA[Magento2 Migration]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=2075</guid>

					<description><![CDATA[Whilst migrating from Magento 1 to Magento 2 you might want to quickly recreate product attributes in Magento 2 programatically. Adding a lot of product attributes manually can be very...<a class="more-link" href="https://blog.gaiterjones.com/create-custom-product-attributes-and-groups-in-magento-2/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[<p>Whilst migrating from Magento 1 to Magento 2 you might want to quickly recreate product attributes in Magento 2 programatically. Adding a lot of product attributes manually can be very time consuming so using the setup script in one of your modules let&#8217;s you quickly create new attributes.</p>
<p>An example of the install method is shown below with code for a confiurable product dropdown attribute and a text attribute.</p>
<p>To run the install script use <em>php bin/magento setup:upgrade</em></p>
<p>To force the install script to run again you can delete the module entry in the setup_module database table and run <em>setup:upgrade</em> again. I guess a cleverer way would be to use the upgrade feature but this is really just intended as a one off process to perhaps install 50 product attributes that would otherwise be time consuming to manually configure.</p>
<p><img fetchpriority="high" decoding="async" src="https://blog.gaiterjones.com/wp-content/uploads/2019/07/gaiterjones_catalog_module_setup.jpg" alt="" width="564" height="300" class="aligncenter size-full wp-image-2088" /></p>
<p>Note the group name let&#8217;s you add these custom attributes into their own group which makes them more manageable in the admin interface.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php namespace GaiterJones\Catalog\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; class InstallData implements InstallDataInterface { private $eavSetupFactory; public function __construct(EavSetupFactory $eavSetupFactory) { $this-&gt;eavSetupFactory = $eavSetupFactory;
    }

    // CUSTOM product attributes / groups
    //
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this-&gt;eavSetupFactory-&gt;create(&#x5B;'setup' =&gt; $setup]);

        // attribute for configurable product
        //
        //
        $eavSetup-&gt;addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'product_colour_x',
            &#x5B;
                'type' =&gt; 'int',
                'group' =&gt; 'GAITERJONES Product',
                'backend' =&gt; '',
                'frontend' =&gt; '',
                'label' =&gt; 'product_colour_x',
                'default' =&gt; '',
                'input' =&gt; 'select',
                'class' =&gt; '',
                'source' =&gt; 'Magento\Eav\Model\Entity\Attribute\Source\Table',
                'global' =&gt; \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' =&gt; true,
                'required' =&gt; false,
                'user_defined' =&gt; true,
                'searchable' =&gt; false,
                'filterable' =&gt; true,
                'comparable' =&gt; false,
                'visible_on_front' =&gt; false,
                'used_in_product_listing' =&gt; false,
                'unique' =&gt; false,
                'apply_to' =&gt; ''
            ]
        );

        $eavSetup-&gt;addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'selling_unit',
            &#x5B;
                'type' =&gt; 'varchar',
                'group' =&gt; 'GAITERJONES Product',
                'backend' =&gt; '',
                'frontend' =&gt; '',
                'label' =&gt; 'Selling Unit',
                'input' =&gt; 'text',
                'class' =&gt; '',
                'source' =&gt; '',
                'global' =&gt; \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' =&gt; true,
                'required' =&gt; false,
                'user_defined' =&gt; true,
                'default' =&gt; 'Stück',
                'searchable' =&gt; false,
                'filterable' =&gt; false,
                'comparable' =&gt; false,
                'visible_on_front' =&gt; false,
                'used_in_product_listing' =&gt; false,
                'unique' =&gt; false,
                'apply_to' =&gt; ''
            ]
        );

     }
}

</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/create-custom-product-attributes-and-groups-in-magento-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento Migration for Dummies</title>
		<link>https://blog.gaiterjones.com/magento-migration-for-dummies/</link>
					<comments>https://blog.gaiterjones.com/magento-migration-for-dummies/#respond</comments>
		
		<dc:creator><![CDATA[PAJ]]></dc:creator>
		<pubDate>Tue, 18 Jun 2019 14:45:21 +0000</pubDate>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Magento2 Migration]]></category>
		<guid isPermaLink="false">http://blog.gaiterjones.com/?p=2059</guid>

					<description><![CDATA[If you are a Magento 1 Ecommerce Store owner you are probably well aware that support for Magento CE 1.x will stop in 2020. The nice folks at Magento call...<a class="more-link" href="https://blog.gaiterjones.com/magento-migration-for-dummies/" title="Continue reading">Continue reading</a>]]></description>
										<content:encoded><![CDATA[
<p>If you are a Magento 1 Ecommerce Store owner you are probably well aware that support for Magento CE 1.x will stop in 2020.</p>



<p>The nice folks at Magento call it &#8220;<em>Sunsetting</em>&#8220;</p>



<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" width="862" height="318" src="https://blog.gaiterjones.com/wp-content/uploads/2019/05/mage1-sunset.jpg" alt="" class="wp-image-2060" /></figure>
</div>



<p>We have all known this for some time, exactly what that means for Magento 1 stores is open for debate, I doubt the world is going to end but are the risks associated with running deprecated ecommerce store software acceptable?</p>



<p>Magento 2 has been maturing nicely over the last few years and now is definitely as good a time as any to start working on your migration plan.</p>



<p>The costs and time associated with migrating a Magento1 store with &#8220;minimal&#8221; third party integration are estimated at between $5,000 to $60,000 &#8211; 3 to 6 months. Even a very basic migration will require a new custom theme, modules and data export.</p>



<p>The total cost of migration depends of course on the in house skills you or your company possess. Chances are if you are reading this you already have Magento 1 and PHP experience. That&#8217;s good news! If you are new to Magento 2 the bad news is that it&#8217;s a steep learning curve to get up to the same speed with Magento 2 that you have right now with trusty old Magento1.</p>



<p>Time invested now in setting up an Magento2 development environment is time well spent. I spent the last couple of years dabbling with Magento 2when I had the time &#8211; most of my time was spent getting my Magento 2 Docker environment right and testing migration methods.</p>



<p>Migrating a mature Magento 1 store to Magento 2 is a daunting task. If your store has been around for a long time (mine started life as Magento 1.3 in 2009) no doubt you will have a very customised theme and installed or developed a lot of custom modules and features over the years. You may have 1000&#8217;s of products, 10&#8217;000s of customers and hopefully a lot of order data.</p>



<p>So where do you start? In a perfect world you would start with the official Magento 2 <a href="https://devdocs.magento.com/guides/v2.3/migration/migration-plan.html">migration plan</a> and within half an hour and a few clicks your Magento 1 store is automagically migrated to Magento 2. This fairy tale migration only really works on vanilla Magento 1 installs with no customisation. Having said that as of the latest Magento 2 (2.3.x) the migration process has matured and improved. It is definitely worth familiarising yourself with the migration tool as you probably will need it to migrate some of your Mage 1 data.</p>



<p>For me the migration tool worked perfectly for customer data, but not for products. And of course unless you want to use the basic Magento 2 theme, migrating your Magento 1 theme is simply not possible.</p>



<p>Once you accept the fact that you are going to have to pretty much rebuild your Shop from scratch it&#8217;s time to step back and have a think about how to rebuild 1000&#8217;s of products.</p>



<p>Having worked with Magento 1 for almost 10 years I was used to exporting product data for use in other applications such as Amazon and eBay product feeds, so I thought why not simply <em>export the Magento 1 data in a format that Magento 2 can import.</em></p>



<p>This is not a bad idea, but we are talking about a lot of data &#8211; thousands of products, multi store views, lots of custom attributes. That&#8217;s a pretty big CSV file to manage.</p>



<p>A much better idea is to create a &#8220;skeleton&#8221; export of your Magento 1 product data &#8211; just the bare bones of the products, enough for Magento 2 to import them with enough data to create the product.</p>



<p>Once you have the basic product structure imported simply synchronise the data between MAGE1 and MAGE2! Sounds complex but actually it is pretty easy.</p>



<p>We just need two PHP scripts, one with access to the MAGE1 source files and database and one with access to the MAGE2 installation. The MAGE2 script calls the MAGE1 script to request product data for a SKU. The MAGE1 script extracts all the product data you need into an array returning it in JSON format to MAGE2 which in turn updates the corresponding MAGE2 skeleton product. This is done for each store view.</p>



<p>There are some complications associated with configurable products, attribute sets and product attributes which you need to create and import, but once the basic product is in MAGE2 the synchronisation process works perfectly.</p>



<p>At the time of writing I can synchronise all data for all product types including, pricing, tier pricing, custom attributes and product images.</p>



<p>I can keep Magento 2 in sync with changes or updates to the live Magento 1 shop simply by restoring the latest database backup to my Magento 1 migration database and performing a new product sync.</p>



<p>I started my Migration about 6 weeks ago (May 2019) and having developed the import and sync process I am just about ready to start on a &#8220;live&#8221; dev build of my new Magento 2 store. I don&#8217;t have a new theme yet but there is a lot of work to do getting the catalog ready and customising core templates and code.</p>



<p>I will be updating this blog with my progress and hopefully developing the MAGE1 to MAGE2 export and sync scripts to be made available to download.</p>



<p>Stay tuned to watch this dummy migrate a Magento 1 store to Magento 2!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.gaiterjones.com/magento-migration-for-dummies/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
