Skip to content

Instantly share code, notes, and snippets.

@vmasciotta
vmasciotta / 0001-Fix-admin-permission-error.patch
Created May 6, 2016
Zeon Manufactuer Fix Admin Permission error patch for Magento SUPEE-6285 or Magento 1.9.2.x
View 0001-Fix-admin-permission-error.patch
From 230b50591a9954c68cd2e24ea5f5e38d08fc1c8d Mon Sep 17 00:00:00 2001
From: valerio masciotta <sviluppo@valeriomasciotta.it>
Date: Tue, 13 Oct 2015 17:50:33 +0000
Subject: [PATCH] Fix admin permission error
---
.../controllers/Adminhtml/Manufacturer/ListController.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/code/community/Zeon/Manufacturer/controllers/Adminhtml/Manufacturer/ListController.php b/app/code/community/Zeon/Manufacturer/controllers/Adminhtml/Manufacturer/ListController.php
@vmasciotta
vmasciotta / 0001-fix-bug-admin-manufacturer-search.patch
Created May 6, 2016
Zeon Manufacturer admin search grid patch
View 0001-fix-bug-admin-manufacturer-search.patch
From 6aba001aedc29f3c2b69f81dd46cd2bb38be97ca Mon Sep 17 00:00:00 2001
From: valerio masciotta <sviluppo@valeriomasciotta.it>
Date: Fri, 6 May 2016 15:32:53 +0000
Subject: [PATCH] fix bug admin manufacturer search
---
.../Zeon/Manufacturer/Model/Mysql4/Manufacturer/Collection.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/community/Zeon/Manufacturer/Model/Mysql4/Manufacturer/Collection.php b/app/code/community/Zeon/Manufacturer/Model/Mysql4/Manufacturer/Collection.php
@vmasciotta
vmasciotta / trim
Created Apr 16, 2016
Cron daily trim
View trim
# place this few lines in /etc/cron.daily/trim
#!/bin/sh
LOG=/var/log/trim.log
echo "*** $(date -R) ***" >> $LOG
fstrim -v / >> $LOG
View sandbox.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//echo "hello world";
try {
require __DIR__ . '/app/bootstrap.php';
View PATCH_SUPEE-389_EE_1.12.0.2_v2.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
View gist:a2aa5ddded4a0b974c33
/**
* Controlla che la data di oggi sia inferiore a quella fornita dall'utente.
* Restituisce true su è inferiore, false se non lo è
* @param string $today
* @param string $date
*
* @return boolean
*/
function checkData($today,$date){
$today = strtotime($today);
@vmasciotta
vmasciotta / magento_reset_orders
Created Jul 8, 2014
Sql instructions to reset test orders and customers
View magento_reset_orders
-- *****************for customers*****************
SET FOREIGN_KEY_CHECKS=0;
-- reset customers
TRUNCATE customer_address_entity;
TRUNCATE customer_address_entity_datetime;
TRUNCATE customer_address_entity_decimal;
TRUNCATE customer_address_entity_int;
TRUNCATE customer_address_entity_text;
TRUNCATE customer_address_entity_varchar;
@vmasciotta
vmasciotta / httpd.conf
Last active Aug 29, 2015
Example Demo VirtualHost Magento
View httpd.conf
NameVirtualHost *:80
Include /etc/httpd/vhosts.d/*.conf
@vmasciotta
vmasciotta / sandbox.php
Last active Aug 29, 2015
Magento Sandbox
View sandbox.php
<?php
ini_set('display_errors', 1);
require "app/Mage.php";
Mage::init();
Mage::setIsDeveloperMode(true);
umask(0);
@vmasciotta
vmasciotta / ProductController.php
Last active Dec 29, 2015
Mageno Adminhtml Rewrites config
View ProductController.php
<?php
require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml') . DS . 'Catalog' . DS . 'ProductController.php'; //faccio il require della classe da estendere
class Namespace_Valerio_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController{
public function newAction(){
echo "Ho riscritto il core di newAction";
die;
}
}
You can’t perform that action at this time.