magento2 Adding viewModels to widgets Or a journey through too many XML Schema files We wanted to add the possibility to add a viewModel to a widget. We thought about it. There are two possibilities: 1. Add it to an instance, e.g. one added in the backend or one declared via {{widget ...}} 2. Add
magento1 Configurable Attribute in Magento 1 To use an attribute for configurable products we need: * is_configurable = 1 * is_global = 1 * is_user_defined = 1 * backend_type = int * frontend_input = select
Magento Translate Magento Cookie Notice Thanks to DSGVO some customers want to have a cookie notice: Magento has this feature already built in. You can turn it on in the backend: System > Configuration > General > Web > Session Cookie Management > Cookie Restriction Mode: YES Beside this you can define what the customer sees in the CMS block:
git git: ignored files and why find . -type f | git check-ignore -v --stdin git check-ignore -v **/* works too, if you don't encounter zsh: argument list too long: git.
payone Payone and no order confirmation email Welcome! You have the problem, that Payone is not sending order confirmation emails in Magento 1? And we are talking about a local development system, were Payone is not able to deliver the Instant Payment Notification (IPN - or whatever it is called at Payone)? Then I can tell you:
Magento ALL countries in checkout, although allowed_countries set correctly We had the problem, that we have a short list of countries we ship to: But the country list for the invoice and shipping address in the checkout is complete. Config The configuration is fine as you can see above. I checked the cache, because I thought it might be
Sourcemodel Custom Product Attributes, Source Models and Flat Tables How to add an attribute to product_flat_table Either one of the following attribute settings is true: * backend_typ = 'static' * is_filterable > 0 * used_in_product_listing = 1 * is_used_for_promo_rules= 1 * used_for_sort_by = 1 Or you add it manually by observing this event: catalog_
Magento Magento 1 Update - How to Rico Neitzel [https://twitter.com/riconeitzel] told me back in the days, that during Magento updates files gets deleted, therefore it is a bad idea, therefore you want to run a patch (not the ones from Magento, but a patch between the versions) over your Magento installation. After fiddeling around
Security array_diff(array, string) does(n't) work as expected This is an old problem, quite a few security researchers already wrote about. But repeating things, helps learning them (especially me). In MageSetup [https://github.com/firegento/firegento-magesetup] we read posted agreements (terms and conditions) and compare them with all the agreements we expect. This looks like that: $requiredAgreements = $this->
Disabling block cache You want to disable block cache? You can do it in layout.xml, cms block/page layout update, etc. More about this in Fabrizio Branca's blog [http://fbrnc.net/blog/2015/06/cache-and-layout-xml-tricks] Thanks to sr_aromicon for the link!
git Review Magento Updates This blogpost is of the kind: I don't want to forget that this exists, therefore I hope it helps you, but it's mine. :o) Magento updates are pain, because of the damn fcking cockspl*t @copyright header. Thanks to Franklin P Strube [http://stackoverflow.com/a/10622640/1480397] there is
Admin YAMB: Creditmemo with shippingInclTax > 0 and shippingAmount = 0 I think I just found yet another Magento Bug (YAMB). I'm working on credit memos and want to add tax to adjustments (I hope I'll write a blog post about this soon - please remind me if you are interested). I had the problem, that in \Mage_Sales_Model_Order_
Magento Import from cli/cronjob Back in the days Vinai Kopp gave a talk about ImportExport module. In the talk is a code snippet which helps to run importExport from CLI or as a cronjob. Unfortunately it is a screenshot and I typed the snippet already a couple of times. Time to make sure it
Form Grid Loader doesn't hide after request finished I had today the problem, that the loader doesn't hide after a a ajax response is loaded: My problem is the following error: "TypeError: Cannot read property 'down' of null at Object.bindFieldsChange (http://demo.dev/js/mage/adminhtml/grid.js:280:63) at Object.initGrid (http://demo.dev/js/
Admin Tab is rendered in left block instead of content I want to add tabs to a custom form in the backend. There are a couple of great tutorials how to add tabs, like from Inchoo [http://inchoo.net/magento/magento-grid-serializer-ajax-grids/] or Erfan Imani [https://erfanimani.com/intro-to-magento-adminhtml-layout-blocks/]. But I wanted this: And got this: The problem is simple -
setup script Magento doesn't trigger setup script I found a nice new, rarely trigger Magento bug. In one of our projects, we have an example file to create new products: data-upgrade-example-new-product-import.php Beside this we had data scripts: data-install-1.0.1.php data-upgrade-1.0.0-1.0.1.php data-upgrade-1.0.5-1.0.6.php Unfortunately data-upgrade-1.0.
Empty order emails (no subject, no body) One of my customers had a problem this week: Emails looked like this: It was literally empty. The server filled a few head fields, but there was nothing left of the content we want to send (new order email). It took a while, but finally I think I found the
REAL file sizes on Mac OS X I'm searching for exceptions containing logic, not only class ... extends ..., so I searched for a way to get the real file size. What didn't work # only lists directories find . -type f | du | grep Exception # lists files in block size (4kb) which isn't accurate enough find . -type f | du -a | grep
(x)Debug PHP CLI script via SSH without port forwarding There are lots of examples on the net which all tell you that you should forward port 9000 to your local machine. This is helpful and needed if you want to debug a "real" remote machine, like a production or staging server. But I want to debug a CLI script
core Magento Core Cache Bug Thanks very much to my colleagues from iWelt [http://www.iwelt.de/] who found this bug and allow me to publish it here to get all the reputation ;-) Magento can overwrite a cached block with a different one. Magento Cache Key Magento generates the cache key by default using
http How anchor <a> work I googled for a MageOverflow [http://magento.stackexchange.com] post how anchor work, so I don't have to write it down myself. But I couldn't find any. If you only want to know, how a anchor (JS/CSS script link) needs to be built to work, scroll down. So I'll
message Messages are not shown When you are working with sessions, you might have the problem, that your message is not shown. First add them We have different sessions: * core * checkout * sales * customer * admin * a lot more. For each of these sessions, we have four methods to add a message: Mage::getSingleton('*/session')->
mysql Monitor huge mysql imports I tweeted today about [https://twitter.com/Fabian_ikono/status/623527290526400512], how to get a progress bar for commands on the bash, in my case: mysql imports of huge files: pv magento.sql | mysql -uroot -p database This tipp is proudly presented by Rob [http://dba.stackexchange.com/a/28646/
ecomdev Ecomdev_PHPUnit, Controller tests and core/index/noCookies I tried to test an observer which should kill the form_key on the add to cart action. To do this I wanted to put a product into the cart and make sure it was added, e.g. by testing that checkout_cart_add_product_complete was dispatched. But my
Magento INSERT INTO, increased auto_increment, but no data Missing data, failed transactions and unassigned products Last week my job was to port a module back from Magento 1.9 to Magento 1.4. Allowed core hacks In the end the only real problem I had, was that Mage_Core_Model_Resource_Db_Abstract doesn't exist already, therefore I