Skip to content

Instantly share code, notes, and snippets.

View cdiacon's full-sized avatar
🎯
Focusing

Calin cdiacon

🎯
Focusing
View GitHub Profile
@cdiacon
cdiacon / RetailerAdjustmentPlugin.php
Created December 10, 2020 10:08
ESW price plugin
<?php
/**
* Imagination Media
*
* @category ImaginationMedia
* @package ImaginationMedia_EshopWorld
* @author Calin Diacon <calin@imaginationmedia.com>
* @copyright Copyright (c) 2020 Imagination Media (https://www.imaginationmedia.com/)
* @license https://opensource.org/licenses/OSL-3.0.php Open Software License 3.0
*/
@cdiacon
cdiacon / PricePlugin.php
Created May 25, 2020 07:19
Magento2 access protected property for plugin
<?php
/**
* Imagination Media
*
* @category ImaginationMedia
* @package ImaginationMedia_
* @author Calin Diacon <calin@imaginationmedia.com>
* @copyright Copyright (c) 2020 Imagination Media (https://www.imaginationmedia.com/)
* @license https://opensource.org/licenses/OSL-3.0.php Open Software License 3.0
*/
@cdiacon
cdiacon / generateDummyOrders.php
Last active October 10, 2023 14:34
dummy orders M2
<?php
require_once '../vendor/fzaninotto/faker/src/autoload.php';
use \Magento\Framework\App\Bootstrap;
include('../app/bootstrap.php');
/**
* NUMBER OF Orders TO GENERATE.
*/
$NUMBER_TO_GENERATE = 100;
@cdiacon
cdiacon / gist:2b066ccb5b645858be16034f231be96d
Last active December 11, 2020 14:26
dummy subscribers with emailsim.io domain
<?php
require_once '../vendor/fzaninotto/faker/src/autoload.php';
use \Magento\Framework\App\Bootstrap;
include('../app/bootstrap.php');
/**
* NUMBER OF CUSTOMERS TO GENERATE.
*/
$NUMBER_TO_GENERATE = 1000;
@cdiacon
cdiacon / createCustomersSubsribed.php
Last active October 10, 2023 14:34
dummy subscribers M2
<?php
require_once '../vendor/fzaninotto/faker/src/autoload.php';
use \Magento\Framework\App\Bootstrap;
include('../app/bootstrap.php');
$NUMBER_TO_GENERATE = 10000;
$html_bootstrap = Bootstrap::create(BP, $_SERVER);
$set_objectManager = $html_bootstrap->getObjectManager();
@cdiacon
cdiacon / restrict
Last active December 11, 2020 13:47
Bad words filter - Check this.
$#!+
$1ut
$h1t
$hag
$hit
$lut
( Y )
(!)
(. Y .)
(@ Y @)