zookal / magento-mock Goto Github PK
View Code? Open in Web Editor NEWTransparent auto detecting of disabled core modules and providing mock objects for not breaking Magento.
Transparent auto detecting of disabled core modules and providing mock objects for not breaking Magento.
Error shows on creating/editing Simple/Virtual/Bundled products.
Weee module disabled as well.
Clean Magento 1.9.3.7 installation without sample data.
a:5:{i:0;s:88:"Invalid method Zookal_Mock_Model_Mocks_Mage_Config::_isReturnFalse Cannot print args ...";i:1;s:6857:"#0 /usr/local/opt/magento/app/code/core/M
#1 /usr/local/opt/magento/app/code/core/Mage/Tax/Helper/Data.php(193): Zookal_Mock_Model_Mocks_Mage_Config->priceIncludesTax(Object(Mage_Core_Model_Store))
#2 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php(56): Mage_Tax_Helper_Data->priceIncludesTax(Object(Mage_Cor
#3 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Abstract.php(179): Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price->getAfterElementHtml()
#4 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php(189): Varien_Data_Form_Element_Abstract->getElementHtm
#5 /usr/local/opt/magento/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml(47): Mage_Adminhtml_Block_Catalog_Form_Re
#6 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/usr/local/opt/...')
#7 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#8 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#9 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#10 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Adminhtml_Block_Template->_toHtml()
#11 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php(52): Mage_Core_Block_Abstract->toHtml()
#12 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Abstract.php(223): Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element->render(Object(Mage_Admi
#13 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Text.php(46): Varien_Data_Form_Element_Abstract->getHtml()
#14 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Abstract.php(233): Varien_Data_Form_Element_Text->getHtml()
#15 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Fieldset.php(90): Varien_Data_Form_Element_Abstract->toHtml()
#16 /usr/local/opt/magento/app/design/adminhtml/default/default/template/widget/form/renderer/fieldset.phtml(49): Varien_Data_Form_Element_Fieldset->getChildr
#17 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/usr/local/opt/...')
#18 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#19 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#20 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#21 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Adminhtml_Block_Template->_toHtml()
#22 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php(51): Mage_Core_Block_Abstract->toHtml()
#23 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Abstract.php(223): Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset->render(Object(Varien_Data_Form_
#24 /usr/local/opt/magento/lib/Varien/Data/Form/Element/Abstract.php(233): Varien_Data_Form_Element_Abstract->getHtml()
#25 /usr/local/opt/magento/lib/Varien/Data/Form.php(244): Varien_Data_Form_Element_Abstract->toHtml()
#26 /usr/local/opt/magento/lib/Varien/Data/Form.php(256): Varien_Data_Form->toHtml()
#27 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(108): Varien_Data_Form->getHtml()
#28 /usr/local/opt/magento/app/design/adminhtml/default/default/template/widget/form.phtml(28): Mage_Adminhtml_Block_Widget_Form->getFormHtml()
#29 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/usr/local/opt/...')
#30 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#31 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#32 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#33 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Adminhtml_Block_Template->_toHtml()
#34 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#35 /usr/local/opt/magento/app/code/core/Mage/Core/Block/Abstract.php(297): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#36 /usr/local/opt/magento/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#37 /usr/local/opt/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#38 /usr/local/opt/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#39 /usr/local/opt/magento/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Objec
#40 /usr/local/opt/magento/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#41 /usr/local/opt/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#42 /usr/local/opt/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#43 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/Controller/Action.php(285): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#44 /usr/local/opt/magento/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(250): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#45 /usr/local/opt/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->editAction()
#46 /usr/local/opt/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#47 /usr/local/opt/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Contr
#48 /usr/local/opt/magento/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#49 /usr/local/opt/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#50 /usr/local/opt/magento/index.php(83): Mage::run('', 'store')
#51 {main}";s:3:"url";s:80:"/index.php/admin/catalog_product/edit/id/1/key/4caeb009066e1ea9674b1f89d2972f07/";s:11:"script_name";s:10:"/index.php";s:4:"skin";
Is there any way to get rid of errors during the installation process?
I get the following error with an empty database - when Magento is running its setup scripts and Magento Mock is active.
/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php" - Can't retrieve entity config: customer/entity
Magento has multiple entrypoints for Mage:app(), so its not the best way to override the options only in the index.php -> cronjobs and other applications will still use the default config model. Is there any other way to override this without touching core files?
The error is coming from this code in Mage_Tax_Block_Checkout_Tax
:
/**
* Get all FPTs
*
* @return array
*/
public function getAllWeee()
{
$allWeee = array();
$store = $this->getTotal()->getAddress()->getQuote()->getStore();
$helper = $this->_factory->getHelper('weee');
if (!$helper->includeInSubtotal($store)) {
foreach ($this->getTotal()->getAddress()->getCachedItemsAll() as $item) {
foreach ($helper->getApplied($item) as $tax) {
To fix it, the wee helper mock should return an array for getApplied()
.
Hi, I just wanted to ask how I could configure this module. I read the description and it says "works out of the box", so does this mean I just put the app folder in my magento directory?
But then I read on your website:
"At Zookal we have the following modules disabled: Mage_AdminNotification, Mage_Authorizenet, Mage_Backup, Mage_Captcha, Mage_Compiler, Mage_Connect, Mage_GoogleCheckout, Mage_GoogleBase, Mage_Install, Mage_Log, Mage_Paypal, Mage_PaypalUk, Mage_Poll, Mage_ProductAlert, Mage_Review, Mage_Rating, Mage_Rss, Mage_Sendfriend, Mage_Tag, Mage_Usa, Mage_Wishlist, Mage_XmlConnect, Phoenix_Moneybookers."
Are these the default disabled modules? But what if I need one of these modules like Mage_Paypal?
Thanks
i have disabled the Enterprise_Websiterestriction
extension, yet some of the enterprise core code (f.e. the FPC crawler) is using its helper: Mage::helper('enterprise_websiterestriction')->getIsRestrictionEnabled($store)
this results in error messages like the following:
2015-02-01T02:10:01+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Enterprise/Websiterestriction/Helper/Data.php' for inclusion (include_path='/srv/httpd/prod/src/www/app/code/local:/srv/httpd/prod/src/www/app/code/community:/srv/httpd/prod/src/www/app/code/core:/srv/httpd/prod/src/www/lib:.:/usr/share/pear:/usr/share/php') in /srv/httpd/prod/src/www/lib/Varien/Autoload.php on line 94
as there seems no mock classes for enterprise functionalities currently in magento-mock, i'd appreciate pointers on how to add a mock for the above helper class so i can create a PR - so far i've not been successful.
Exception printed: Module "Mage_Checkout" requires module "Mage_CatalogInventory".
Otherwise, great module!
any plan for magento 2?, it's full of bloatware so i really need this.
thanks
under magento 1.14.0.1, using the latest version from master, one cannot view the order details when Mage_Weee is disabled. the errors happen in the frontend (rwd theme) as well as the backend (default admin theme).
encountered errors:
Invalid method Zookal_Mock_Model_Mocks_Mage_Data::_isReturnFalse Cannot print args ...
Invalid method Zookal_Mock_Model_Mocks_Mage_Data::includeInSubtotal Cannot print args ...
Invalid method Zookal_Mock_Model_Mocks_Mage_Data::processTierPrices Cannot print args ...
example stacktrace (url: /sales/order/view/order_id/1/)
Invalid method Zookal_Mock_Model_Mocks_Mage_Data::_isReturnFalse Cannot print args ...
Trace:
#0 app\code\core\Mage\Tax\Helper\Data.php(1144): Zookal_Mock_Model_Mocks_Abstract->__call('includeInSubtot...', Array)
#1 app\code\core\Mage\Tax\Helper\Data.php(1144): Zookal_Mock_Model_Mocks_Mage_Data->includeInSubtotal(Object(Mage_Core_Model_Store))
#2 app\design\frontend\base\default\template\tax\order\tax.phtml(31): Mage_Tax_Helper_Data->getAllWeee(Object(Mage_Sales_Model_Order))
#3 app\code\core\Mage\Core\Block\Template.php(241): include('...')
#4 app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\base\\d...')
#5 app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#6 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#7 app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#8 app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('tax', false)
#9 app\design\frontend\base\default\template\sales\order\totals.phtml(33): Mage_Core_Block_Abstract->getChildHtml('tax', false)
#10 app\code\core\Mage\Core\Block\Template.php(241): include('...')
#11 app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\base\\d...')
#12 app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#13 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#14 app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#15 app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('order_totals', true)
#16 app\design\frontend\rwd\default\template\sales\order\items.phtml(44): Mage_Core_Block_Abstract->getChildHtml('order_totals')
#17 app\code\core\Mage\Core\Block\Template.php(241): include('...')
#18 app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\rwd\\de...')
#19 app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#20 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#21 app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#22 app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('order_items', true)
#23 app\design\frontend\base\default\template\sales\order\view.phtml(64): Mage_Core_Block_Abstract->getChildHtml('order_items')
#24 app\code\core\Mage\Core\Block\Template.php(241): include('...')
#25 app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\base\\d...')
#26 app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#27 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#28 app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#29 app\code\core\Mage\Core\Block\Abstract.php(577): Mage_Core_Block_Abstract->_getChildHtml('sales.order.vie...', true)
#30 app\code\core\Mage\Page\Block\Html\Wrapper.php(52): Mage_Core_Block_Abstract->getChildHtml('', true, true)
#31 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Page_Block_Html_Wrapper->_toHtml()
#32 app\code\core\Mage\Core\Block\Text\List.php(43): Mage_Core_Block_Abstract->toHtml()
#33 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#34 app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#35 app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#36 app\design\frontend\rwd\default\template\page\2columns-left.phtml(59): Mage_Core_Block_Abstract->getChildHtml('content')
#37 app\code\core\Mage\Core\Block\Template.php(241): include('...')
#38 app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\\rwd\\de...')
#39 app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#40 app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#41 app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#42 app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#43 app\code\core\Mage\Sales\Controller\Abstract.php(73): Mage_Core_Controller_Varien_Action->renderLayout()
#44 app\code\core\Mage\Sales\Controller\Abstract.php(108): Mage_Sales_Controller_Abstract->_viewAction()
#45 app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Sales_Controller_Abstract->viewAction()
#46 app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#47 app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#48 app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#49 app\Mage.php(684): Mage_Core_Model_App->run(Array)
#50 index.php(87): Mage::run('', 'store')
#51 {main}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.