https://fr.store.owebia.com/magento2-module-advanced-shipping.html guide: http://htmlpreview.github.io/?https://github.com/owebia/magento2-module-advanced-shipping-setting/blob/master/view/doc_en_US.html#addons Using special functions Defining a table EXAMPLE WITH FUNCTIONS ADD-ON // If the package weight is lower or equal to 0.5, the price will be 5.30 // If the package weight is lower or equal to 1.0,...
Category: magento 2
migration data m1 -> m2 reference
https://speakerdeck.com/php4u/magento-2-data-migration https://github.com/magento/data-migration-tool http://devdocs.magento.com/guides/v2.1/migration/migration-overview-practices.html
check product status for configurable et simple
select ce.sku,ci.`attribute_id`,ci.value ,ci.store_id from catalog_product_entity as ce inner join catalog_product_entity_int as ci on ce.row_id=ci.row_id where ce.sku in ( '050-3923-MASTER', '050-3880-MASTER', '050-3899-MASTER', '050-3853-MASTER', '050-3914-MASTER', '056-4128-MASTER', '056-4173-MASTER', '056-4182-MASTER', '056-4207-MASTER', '056-4191-MASTER', '060-9069-MASTER', '060-9078-MASTER', '060-9087-MASTER', '060-9096-MASTER', '060-9041-MASTER') and ci.attribute_id=97 UNION all select ce.sku,ci.`attribute_id`,ci.value ,ci.store_id...
How To Create Rest Based Web Api In Magento2
https://webkul.com/blog/magento2-custom-rest-api/
Magento full page caching session problem
FPC will clear all the session be clear and we possible via Magento\Framework\App\Http\Context or via Magento\Customer\Model\Session. However, result may be different: HTTP context is initialized earlier than customer session (but it does not matter since both are initialized in action...
Update Customer Data in Magento2 with custom attribute
protected $_customerRepositoryInterface; public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface ) { parent::__construct($context); $this->resultPageFactory = $resultPageFactory; $this->_customerRepositoryInterface = customerRepositoryInterface; } Now execute function here reward_barcode is custom attribute: public function execute() { $customerId = 2; if ($customerId) { $customer...
How To Reset Admin Password in Magento
For Magento 1.9 and older 1 UPDATE admin_user SET password = CONCAT(MD5('xxNewPassword'), ':xx') WHERE username = 'ADMINUSERNAME'; For Magento 2: 1 UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'ADMINUSERNAME';
Magento 2 install redis in debian
sudo apt-get update && sudo apt-get upgrade Install the software-properties-common package: 1 sudo apt-get install software-properties-common 3. sudo add-apt-repository ppa:chris-lea/redis-server 4. sudo apt-get update sudo apt-get install redis-server 5. Verify the Installation Verify Redis is up by running redis-cli: redis-cli...
Magento 2 add static Block
To update cms static block for particular store programmatically you can use following code $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $identifier = 'block_identifier'; $store_id = 2; try { $block = $objectManager->create('Magento\Cms\Model\Block'); $block->setStoreId($store_id); // store for block you want to update $block->load($identifier, 'identifier'); $block->setIdentifier($identifier);...
Magento 2: How to truncate customers, products, reviews and orders table
http://magento.stackexchange.com/questions/102936/magento-2-how-to-truncate-customers-products-reviews-and-orders-table SET FOREIGN_KEY_CHECKS = 0; Truncate order tables TRUNCATE TABLE `gift_message`; TRUNCATE TABLE `quote`; TRUNCATE TABLE `quote_address`; TRUNCATE TABLE `quote_address_item`; TRUNCATE TABLE `quote_id_mask`; TRUNCATE TABLE `quote_item`; TRUNCATE TABLE `quote_item_option`; TRUNCATE TABLE `quote_payment`; TRUNCATE TABLE `quote_shipping_rate`; TRUNCATE TABLE `reporting_orders`; TRUNCATE TABLE...