Skip to content

Instantly share code, notes, and snippets.

View techguysourav's full-sized avatar

Sourav Jain techguysourav

View GitHub Profile
@techguysourav
techguysourav / Adding-Attributes-to-Category.php
Created July 12, 2016 04:08
Magento2 : Adding custom attributes to categories
<?php
namespace Paarth\HelloWorld\Setup;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class UpgradeData implements UpgradeDataInterface
{
@techguysourav
techguysourav / Adding-Attributes-to-Product.php
Created July 12, 2016 04:11
Magento2 :: Adding Custom Attributes To Products
<?php
namespace Paarth\HelloWorld\Setup;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
class UpgradeData implements UpgradeDataInterface
{