Skip to content

Instantly share code, notes, and snippets.

View mmenozzi's full-sized avatar
💻
CTO at Webgriffe®

Manuele Menozzi mmenozzi

💻
CTO at Webgriffe®
View GitHub Profile
@mmenozzi
mmenozzi / email_order_items.php
Last active January 14, 2016 10:56
Rendering Magento 1.x email order items
<?php
// -------------------------------------------------
// Override useful ini values
// -------------------------------------------------
set_time_limit(0); // avoid any time limit
ini_set('memory_limit', -1); // avoid any memory limit
// -------------------------------------------------
@mmenozzi
mmenozzi / undo_cancel.php
Last active January 15, 2016 11:18
Restore canceled order with Magento 1.x
<?php
// -------------------------------------------------
// Prevent script to be called via HTTP
// -------------------------------------------------
if (isset($_SERVER['REQUEST_METHOD'])) {
die('This script cannot be run from Browser. This is the shell script.');
}
// -------------------------------------------------
// Override useful ini values
@mmenozzi
mmenozzi / PATCH_SUPEE-389_EE_1.12.0.2_v2.patch
Created September 11, 2017 09:00
SUPEE-389: Every time the catalog URL is rendexed, a new custom rewrite is created (.patch format)
diff --git app/code/core/Mage/Catalog/Model/Url.php app/code/core/Mage/Catalog/Model/Url.php
index fa55fc5..a755b46 100644
--- app/code/core/Mage/Catalog/Model/Url.php
+++ app/code/core/Mage/Catalog/Model/Url.php
@@ -609,6 +609,23 @@ class Mage_Catalog_Model_Url
*/
public function getUnusedPath($storeId, $requestPath, $idPath)
{
+ $urlKey = '';
+ return $this->getUnusedPathByUrlkey($storeId, $requestPath, $idPath, $urlKey);
diff --git a/app/code/local/AW/Rma/Model/Email/Template.php b/app/code/local/AW/Rma/Model/Email/Template.php
index 4b49765..2a21810 100644
--- a/app/code/local/AW/Rma/Model/Email/Template.php
+++ b/app/code/local/AW/Rma/Model/Email/Template.php
@@ -29,6 +29,10 @@
class AW_Rma_Model_Email_TemplateCommon extends AW_Customsmtp_Model_Email_Template
{
}
+} elseif (class_exists('Yireo_EmailOverride_Model_Email_Template')) {
+ class AW_Rma_Model_Email_TemplateCommon extends Yireo_EmailOverride_Model_Email_Template
Index: app/code/local/AW/Afptc/Model/Rule.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/code/local/AW/Afptc/Model/Rule.php (date 1568627129105)
+++ app/code/local/AW/Afptc/Model/Rule.php (date 1568627129105)
@@ -35,7 +35,7 @@
$this->setBuyXProductIds(array());
$allQuoteItems = $object->getQuote()->getAllItems();
@mmenozzi
mmenozzi / upgrade_check.php
Last active June 11, 2020 08:49
Magento 1.x Upgrade Check Assistant Script
<?php
declare(strict_types=1);
/**
* Magento 1.x Upgrade Check Assistant Script
*
* To use this generate a rewrites JSON file with
*
* n98-magerun.phar dev:module:rewrite:list --format json > rewrites.json
*
@mmenozzi
mmenozzi / hipay-magento1-disable-notification.patch
Created June 15, 2020 10:31
HiPay Magento 1.x module notification patch
Index: app/design/adminhtml/default/default/layout/hipay.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/design/adminhtml/default/default/layout/hipay.xml (date 1591870391434)
+++ app/design/adminhtml/default/default/layout/hipay.xml (date 1591870391434)
@@ -57,10 +57,5 @@
<block type="hipay/adminhtml_card_edit" name="card.edit.container"></block>
</reference>