Skip to content

Instantly share code, notes, and snippets.

View dupadhyay3's full-sized avatar

Deepak Upadhyay dupadhyay3

  • Vapi
  • 20:49 (UTC +05:30)
View GitHub Profile
@dupadhyay3
dupadhyay3 / RemoveOptions.php
Last active June 6, 2019 07:48 — forked from bh-ref/RemoveOptions.php
Remove/Delete Product Attribute Options in Magento 2
<?php
namespace Vendor\ModuleName\Options;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory;
class RemoveOptions
{
@dupadhyay3
dupadhyay3 / emailPreview.php
Created April 23, 2019 10:42
Magento 1 Order Email Template Preview
<?php
require_once 'app/Mage.php';
Mage::app();
ini_set('display_errors', 1);
// loads the proper email template
$emailTemplate = Mage::getModel('core/email_template')
->load(7);
// All variables your error log tells you that are missing can be placed like this:
$emailTemplateVars = array();