This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyNamespace\MyModule\Controller\Index; | |
use Magento\Framework\App\Action\Action; | |
use Magento\Framework\App\Action\Context; | |
use Magento\Framework\Module\Dir; | |
class Example extends Action | |
{ | |
public function __construct( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE `finale_table` AS `ft` | |
LEFT JOIN `tmp_table` AS `tmp` | |
ON ft.crm_id = tmp.crm_id | |
AND ft.code = tmp.code | |
SET | |
`ft`.`libelle` = `tmp`.`libelle`, | |
`ft`.`cli_eligible` = `tmp`.`name`, | |
`ft`.`date` = `tmp`.`date` | |
WHERE (tmp.mvt = 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyNamespace\MyModule\Model; | |
use Magento\Framework\Api\SearchCriteriaBuilder; | |
use Magento\Catalog\Api\ProductRepositoryInterface; | |
class ProductFilter | |
{ | |
/** @var ProductRepositoryInterface */ | |
protected $productRepository; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/app/bootstrap.php'; | |
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
/** @var \Magento\Framework\App\Http $app */ | |
$app = $bootstrap->createApplication('TestApp'); | |
$bootstrap->run($app); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
* @author Phuong LE <[email protected]> | |
* @copyright Copyright (c) 2020 Men In Code Ltd (https://www.menincode.com) | |
*/ | |
namespace MyNamespace\MyModule\Setup\Patch\Schema; | |
use Magento\Framework\DB\Ddl\Table; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
* @author Phuong LE <[email protected]> | |
* @copyright Copyright (c) 2020 Men In Code Ltd (https://www.menincode.com) | |
*/ | |
namespace MyNamespace\MyModule\Plugin\Model; | |
class PaymentInformationManagementPlugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
* @author Phuong LE <[email protected]> | |
* @copyright Copyright (c) 2020 Men In Code Ltd (https://www.menincode.com) | |
*/ | |
namespace MyNamespace\MyModule\Setup\Patch\Data; | |
use Magento\Customer\Model\Customer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
'Magento_Customer/js/customer-data' | |
], function (customerData) { | |
var sections = ['cart']; | |
customerData.invalidate(sections); | |
customerData.reload(sections, true); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT `TABLE_SCHEMA`, `TABLE_NAME` | |
FROM `information_schema`.`KEY_COLUMN_USAGE` | |
WHERE `CONSTRAINT_NAME` IN ('MY_CONSTRAINT_NAME'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
* @author Phuong LE <[email protected]> | |
* @copyright Copyright (c) 2020 Men In Code Ltd (https://www.menincode.com) | |
*/ | |
namespace Namespace\MyModule\Block | |
use Magento\Customer\Api\CustomerRepositoryInterface; |