Skip to content

Instantly share code, notes, and snippets.

View piotrekkaminski's full-sized avatar

Piotr Kaminski piotrekkaminski

View GitHub Profile
[Technical Debt] Remove cachestatus.json implementation from GeneratedFiles after a stable number of releases.
In scope of MAGETWO-52000 we introduced .cachestatus.json file to disable/clean and enable caches during web upgrade. This is redundant, since starting 2.1 there are jobs to do these tasks, but previous versions did not have this ability. Hence once 2.1 is fairly well established, this change can be reverted.
Where MAGETWO-5200 is:
[Github][PR]impossible to see what is wrong with cron - unhelpful error message - Github #3189
@piotrekkaminski
piotrekkaminski / docker_beta.md
Last active July 2, 2025 00:06
Docker Beta Installation Info & FAQ
@piotrekkaminski
piotrekkaminski / 416.patch
Created September 24, 2016 04:06
MAGETWO-56955 [Backport] - Validation message displayed all the time - for 2.0 MAGETWO-57681 [GITHUB] Customer cannot reorder if the order has been invoiced or shipped #6278
diff --git a/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php b/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
index 8872525..9fa5c8a 100644
--- a/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
+++ b/app/code/Magento/Sales/Model/ResourceModel/Order/Item/Collection.php
@@ -55,6 +55,7 @@ protected function _afterLoad()
* Assign parent items
*/
foreach ($this as $item) {
+ $this->_resource->unserializeFields($item);
if ($item->getParentItemId()) {
#!/bin/bash
mkdir /var/www/html
cd /var/www/html
# create magento project
composer create-project --repository-url=https://repo.magento.com/ $MAGENTO_PROJECT .
# change permissions
chsh -s /bin/bash www-data
FROM alexcheng/apache2-php7
MAINTAINER Piotr Kaminski <peter@magento.com>
RUN a2enmod rewrite
RUN rm -rf /var/www/html/*
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev" \
version: '2'
services:
web:
build: .
ports:
- "80:80"
volumes:
- ./data:/var/www
links:
- db
Malware that steal card numbers during checkout, targeting Magento based stores
www.3guysgolfcarts.com - Regexp("onepage|checkout")
www.marisaperry.com - eval(atob(
bocolife.com - regexp('onestepcheckout')
www.vimedis.fr - regexp("checkout")
some others to try
https://accesscards.co.uk
https://www.actiumplus.dk
@piotrekkaminski
piotrekkaminski / gist:9bc45ec84028611d621e
Last active July 2, 2025 00:06
How to automatically download patches and release of Magento
1) First you need to generate download token. Login to your account on magento.com and generate it in Account Settings->Downloads Access Token
2) You will need your MAGEID as well. It is shown at the top-left in your account page.
3) curl -k https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/info/help
4) Profit!
diff --git a/app/code/core/Mage/Cms/Block/Block.php b/app/code/core/Mage/Cms/Block/Block.php
index bc81de3..a0dce44 100755
--- a/app/code/core/Mage/Cms/Block/Block.php
+++ b/app/code/core/Mage/Cms/Block/Block.php
@@ -72,4 +72,24 @@ protected function _toHtml()
}
return $html;
}
+
+ /**
FAQ:
We want to run the tests on a custom website. The tests assume main website called Main Website and do not work. Is there a way to provide custom name without changing the tests?
This is an error in the tests. Instead of Main Website it should be main_website and it will select the default website. This patch will be included in next MTF release.
https://gist.github.com/piotrekkaminski/df0b6f570aa410a3c7f6
I get errors in Mage\Adminhtml\Test\TestCase\CreateWebsiteEntityTest. How can I fix it?