Magento “Invalid website id requested.” error in backend on product save

Today I got a error in the Magento  backend telling me, that I have requested an invalid website_id (Invalid website id requested.), when I tried to save a product. The problem was, that I had deleted unused websites and stores over the Magento backend. Unfortunately Magento seemed to keep the relation between website and product, although […]

Disable autoformat in IntelliJ / PHPStorm

When using IntelliJ or PHPStorm as IDE, I use the autoformat for code (Code -> Reformat Code or Ctrl+Alt+L). It works great. But in some cases I need to disable autoformat for some parts of the code. This is how you can disable autoformat in your code: // @formatter:off echo ‘HERE COMES A LOT’ . ‘ […]

Save typing effort for complex MySQL queries with custom variables or procedures

To save time and because it’s not that smart to repeatedly retype the same things multiple times, you can user custom variables in MySQL like that: SET @store := 1, @name_id := 71, @short_desc_id := 72, @desc_id := 73; SELECT CPE.sku AS sku, CPEVN.value AS name, CPEVSD.value AS short_description, CPEVD.value AS description FROM catalog_product_entity AS […]