Skip to content

Instantly share code, notes, and snippets.

Avatar
I'm making some good Web Marketing Projects

Simone Bussoni simbus82

I'm making some good Web Marketing Projects
View GitHub Profile
View MageBridge robots.txt
# Example robots.txt for MageBridge.
# Jooomla! is assumed to be in the root /
# Magento is assumed to be installed in /magento/
# MageBridge Root Menu-Item is assumed to have an URL /shop/
User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
@simbus82
simbus82 / spanner
Created Oct 14, 2014
Aggiunge uno span attorno alle prime 3 parole rilevando lo spazio che le divide. Assegnando stile alle 3 classi è possibile creare titoli con colori diversi per le prime parole.
View spanner
<script>
jQuery(document).ready(function() {
jQuery('h3').each(function(){
var text = jQuery(this).text().split(' ');
if(text.length == 1){
text[0] = '<span class="firstWord">'+text[0]+'</span>';
}
if(text.length == 2){
text[0] = '<span class="firstWord">'+text[0]+'</span>';
@simbus82
simbus82 / success.phtml
Last active Aug 29, 2015
Ecommerce trakicng universal analytics
View success.phtml
<! ----- tracking code -------- !>
<?php
// Transaction Data
$orderID = $this->getOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($orderID);
$orderTotal = $order->getGrandTotal();
// you can also add affiliation, shipping and tax
$trans = array('id' => $orderID,
View My Maps Location + K2 items
UPDATE
s1du4_mymaplocations_location, s1du4_k2_items
SET
s1du4_mymaplocations_location.extra_id = s1du4_k2_items.id
WHERE (
s1du4_mymaplocations_location.catid = 8
AND
s1du4_k2_items.catid = 154
AND
s1du4_mymaplocations_location.name LIKE CONCAT('%', s1du4_k2_items.title ,'%')
@simbus82
simbus82 / Magento bug carrelli abbandonati
Created Mar 8, 2016
Magento bug carrelli abbandonati 1.9.2.x
View Magento bug carrelli abbandonati
Creare la cartella
app/code/local/Mage/Reports/Model/Resource/Quote/
Copiare il file
app/code/core/Mage/Reports/Model/Resource/Quote/Collection.php
incollare in
@simbus82
simbus82 / config.xml
Created May 9, 2016
Mostra ordini in attesa sul frontend di Magento (utile per rifare i pagamenti tipo con CC)
View config.xml
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
@simbus82
simbus82 / methods.phtml
Created Jul 6, 2016
Nascondi metodo di pagamento a seconda del metodo di spedizione su magento
View methods.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@simbus82
simbus82 / config.xml
Created Aug 29, 2016
Repay Magento Pending Order
View config.xml
<config>
<global>
<sales>
<order>
<states>
<pending_payment translate="label">
<visible_on_front>1</visible_on_front>
</pending_payment>
</states>
</order>
@simbus82
simbus82 / local.xml
Created Jan 3, 2017
Rimuove anteprima shipping cost in carrello magento
View local.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<checkout_cart_index>
                <reference name="checkout.cart">
                        <remove name="checkout.cart.shipping"/>
                </reference>
</checkout_cart_index>
</layout>
@simbus82
simbus82 / export-attributes.php
Last active May 11, 2017
PHP to export Magento Attributes
View export-attributes.php
<?php
chdir(dirname(__FILE__));
require_once 'app/Mage.php';
Mage::app();
umask(0);
$productModel = Mage::getModel('Mage_Catalog_Model_Product');
$categoryModel = Mage::getModel('Mage_Catalog_Model_Category');
$resource = Mage::getModel('core/resource');
$db = $resource->getConnection('core_write');
$attributes = Mage::getSingleton('eav/config')