Cyrill Schumacher asked in a tweet
Ur change to add abstract protected fnc exec() conflicts with the Plugin System or am I missing smthng?
This is about the protected visiblity of the method \Magento\Framework\App\Action\Action::execute()
.
<?php | |
$groupId = 1; | |
Mage::getResourceModel('customer/customer_collection') | |
->addAttributeToFilter('group_id', $groupId) | |
->setDataToAll('customer_activated', 1) | |
->save(); |
<?php | |
namespace Random\Example; | |
spl_autoload_register(function($class) { | |
echo "Autoload triggered for class $class\n"; | |
}); | |
echo "Importing class with use upcoming...\n"; | |
use Some\Example\Nonexistant\Class\Which\Will\Not\Trigger\The\Autoloader; |
diff --git a/app/code/core/Mage/Payment/Block/Form/Container.php b/app/code/core/Mage/Payment/Block/Form/Container.php | |
index 9b505bb..ca4b95b 100644 | |
--- a/app/code/core/Mage/Payment/Block/Form/Container.php | |
+++ b/app/code/core/Mage/Payment/Block/Form/Container.php | |
@@ -116,7 +116,7 @@ class Mage_Payment_Block_Form_Container extends Mage_Core_Block_Template | |
$quote = $this->getQuote(); | |
$store = $quote ? $quote->getStoreId() : null; | |
$methods = $this->helper('payment')->getStoreMethods($store, $quote); | |
- $total = $quote->getBaseSubtotal(); | |
+ $total = $quote->getBaseGrandTotal(); |
--- a/app/code/core/Mage/Core/Model/App.php | |
+++ b/app/code/core/Mage/Core/Model/App.php | |
@@ -511,11 +511,7 @@ class Mage_Core_Model_App | |
if ($this->_currentStore == $store) { | |
$store = $this->getStore($store); | |
- if ($store->getWebsite()->getDefaultStore()->getId() == $store->getId()) { | |
- $this->getCookie()->delete(Mage_Core_Model_Store::COOKIE_NAME); | |
- } else { | |
- $this->getCookie()->set(Mage_Core_Model_Store::COOKIE_NAME, $this->_currentStore, true); |
Cyrill Schumacher asked in a tweet
Ur change to add abstract protected fnc exec() conflicts with the Plugin System or am I missing smthng?
This is about the protected visiblity of the method \Magento\Framework\App\Action\Action::execute()
.
<?php | |
class Training_OrderIntegrationClient_Model_Client | |
{ | |
protected $_socket; | |
/** | |
* Workaround to make class testable | |
* |
<?php | |
umask(0); | |
ini_set('memory_limit','512M'); | |
set_time_limit(0); | |
if(file_exists('app/Mage.php')) require 'app/Mage.php'; | |
else require '../../app/Mage.php'; | |
// Init without cache so we get a fresh version | |
Mage::app('admin','store', array('global_ban_use_cache' => TRUE)); |
#!/usr/bin/env bash | |
######################################################## | |
declare -a workers=(commandConsumer.php eventConsumer.php) | |
######################################################## | |
function main() { | |
init_vars |
#!/usr/bin/env php | |
<?php | |
// | |
// PHP REPL with initialized Magento environment | |
// | |
// Thanks to https://github.com/d11wtq/boris | |
// | |
// Drop this script in your $PATH and run it anywhere in a Magento directory tree to start the REPL | |
// |
<?php | |
class Magento_IntegrationTest_Config extends Mage_Core_Model_Config | |
{ | |
private $modelTestDoubles = []; | |
private $resourceModelTestDoubles = []; | |
public function setModelTestDouble($modelClass, $testDouble) | |
{ |