Skip to content

Instantly share code, notes, and snippets.

@nhp
nhp / Mage_Eav_Model_Entity_Abstract
Created October 6, 2017 11:16 — forked from dng-dev/Mage_Eav_Model_Entity_Abstract
improves eav based loads
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@nhp
nhp / Mage_Eav_Model_Entity_Abstract
Created October 6, 2017 11:16 — forked from dng-dev/Mage_Eav_Model_Entity_Abstract
improves eav based loads
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@nhp
nhp / allthethings.sh
Created July 28, 2018 20:25 — forked from TravisBernard/allthethings.sh
Clean all the things (M2)
#!/bin/bash
# Derived from
# https://github.com/btford/allthethings
#
# Licensed under WTFPL http://sam.zoy.org/wtfpl/
#
pur=$(tput setaf 5) # Purple
/**
* Set prices and image configuration
*
* @param Varien_Event_Observer $observer
*/
public function salesQuoteCollectTotalsBefore(Varien_Event_Observer $observer)
{
/* @var $quote Mage_Sales_Model_Quote */
$quote = $observer->getQuote();
foreach ($quote->getAllItems() as $quoteItem) {