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
/** | |
* 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) { |
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
#!/bin/bash | |
# Derived from | |
# https://github.com/btford/allthethings | |
# | |
# Licensed under WTFPL http://sam.zoy.org/wtfpl/ | |
# | |
pur=$(tput setaf 5) # Purple |
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
#!/bin/bash | |
KEY=`aws s3 ls s3://$1/$2 --recursive | sort | tail -n 1 | awk '{print $4}'` | |
aws s3 cp s3://$1/$KEY ./$(basename $KEY) |
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
#!/bin/bash | |
# | |
# This script takes a path to a file and uploads it to Amazon | |
# Glacier. It does this in several steps: | |
# | |
# 1. Split the file up into 1MiB chunks. | |
# 2. Initiate a multipart upload. | |
# 3. Upload each part individually. | |
# 4. Calculate the file's tree hash and finish the upload. | |
# |
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 | |
/** | |
* 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 |
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 | |
/** | |
* 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 |
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
task('deploy:jira:release', function() { | |
$curl = curl_init(); | |
curl_setopt_array($curl, [ | |
//change this to your data | |
CURLOPT_URL => "https://company-cloud-name.atlassian.net/rest/api/latest/version", | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_POST => 1, | |
CURLOPT_HTTPHEADER => array('Content-type: application/json'), | |
//change this to your data | |
CURLOPT_USERPWD => 'user:password', |
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 | |
namespace Magento\Framework\Console; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Output\ConsoleOutput; | |
use Symfony\Component\Console\Input\ArgvInput; | |
use Symfony\Component\Console\Application as SymfonyApplication; | |
use Magento\Framework\App\Bootstrap; | |
use Magento\Framework\Filesystem\Driver\File; |
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
diff --git a/app/code/core/Mage/Adminhtml/controllers/IndexController.php b/app/code/core/Mage/Adminhtml/controllers/IndexController.php | |
index 5c786d5..b99705a 100644 | |
--- a/app/code/core/Mage/Adminhtml/controllers/IndexController.php | |
+++ b/app/code/core/Mage/Adminhtml/controllers/IndexController.php | |
@@ -75,6 +75,11 @@ class Mage_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action | |
$this->_redirect('*'); | |
return; | |
} | |
+ if (!in_Array(Mage::getConfig()->getNode(Mage_Adminhtml_Helper_Data::XML_PATH_ADMINHTML_ROUTER_FRONTNAME), explode(DS, $this->getRequest()->getRequestUri()))) { | |
+ $this->_redirect('cms/index/noRoute'); |
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 Extra_Static_Model_Observer | |
* | |
* @category Model | |
* @package Extra_Static | |
* @author AOE Magento Team <[email protected]> | |
* @license none none | |
* @link www.aoe.com |
NewerOlder