This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Edit your Amasty Custoemr Attributes | |
// Observer.php file | |
// find the handleBlockOutput function | |
public function handleBlockOutput($observer) | |
{ | |
/* @var $block Mage_Core_Block_Abstract */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(order_info,';',74),':',-1), '"', '') as coupon_code, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(order_info,';',6),':"',-1), '"', '') as order_created_at, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',22),':',-1), '"', '') as shipping_firstname, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',26),':',-1), '"', '') as shipping_lastname, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',32),':',-1), '"', '') as shipping_street, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',34),':',-1), '"', '') as shipping_city, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',36),':',-1), '"', '') as shipping_region, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',195),':',-1), '"', '') as shipping_state, | |
REPLACE(SUBSTRING_INDEX(SUBSTRING_INDEX(shipping_address_info,';',40),':',-1), '"', '') as shipping_postcode, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Somecompany_Extensionname_Model_Observer extends Mage_Core_Model_Abstract { | |
public function mailchimpListen($observer) { | |
$thirty_days = time()+60*60*24*30; | |
if (isset($_REQUEST['mc_cid']) && isset($_REQUEST['mc_eid'])) { | |
setcookie('mc_campaign_id',trim($_REQUEST['mc_cid']), $thirty_days); | |
setcookie('mc_email_id',trim($_REQUEST['mc_eid']), $thirty_days); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT customer_id, customer_email, customer_firstname, customer_lastname, group_concat(si.sku SEPARATOR ',') as skus, SUM(subtotal_invoiced) AS cv | |
FROM sales_flat_order as so | |
INNER JOIN sales_flat_order_item AS si ON si.order_id = so.entity_id | |
GROUP BY customer_email | |
ORDER BY SUM(subtotal_invoiced) DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date: Fri, 5 Jul 2013 22:41:03 -0500 | |
Subject: [PATCH] Magento_CE_1.7.0.2_v1-CSRF_Patch | |
--- | |
.../core/Mage/Catalog/Block/Product/Abstract.php | 85 ++++- | |
app/code/core/Mage/Catalog/Block/Product/View.php | 10 +- | |
.../core/Mage/Catalog/Helper/Product/Compare.php | 28 +- | |
app/code/core/Mage/Checkout/Helper/Cart.php | 26 +- | |
.../Mage/Checkout/controllers/CartController.php | 69 ++-- | |
.../Checkout/controllers/OnepageController.php | 70 +++- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# added this to | |
sub vcl_recv { | |
if (req.http.host == "yourdomain.com") { | |
set req.http.Location = "http://www.yourdomain.com" + req.url; | |
error 750 "Permanently moved"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<layout> | |
<cms_index_index> | |
<action method="setTemplate" block="head"><tpl>page/html/headhomepage.phtml</tpl></action> | |
</cms_index_index> | |
<default> | |
<!-- rest of your local.xml --> | |
</default> | |
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "* * * * * * * * * * * * * * * * * * * * *" | |
echo " Build Script v0.1" | |
echo " by Tegan Snyder" | |
echo "* * * * * * * * * * * * * * * * * * * * *" | |
echo "" | |
echo "combining css to mysite.css" | |
cat /store/skin/frontend/mytheme/theme/css/styles.css /store/skin/frontend/base/default/css/widgets.css /store/skin/frontend/mytheme/theme/css/skin.css /store/assets/css/jquery.modal.min.css > /store/css/mysite.css | |
echo "minifying combining css to mysite.min.css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Rest of the file above this | |
app/code/local/Mage/Catalog/Block/Product/List.php | |
*/ | |
protected function _getProductCollection() | |
{ | |
if (is_null($this->_productCollection)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" /> | |
<title><?php echo $this->getTitle() ?></title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<?php | |
if (Mage::registry('current_product')) { | |
$current_product = Mage::registry('current_product'); | |
$desc = preg_replace('/\s+?(\S+)?$/', '', substr(strip_tags(str_replace(array("\r\n", "\r", "\n"), "", $this->getDescription())), 0, 150)); |