Category: magento 2

magento 2

universal shipping methode extension

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,...

magento 2

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...

magento 2

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...

magento 2

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

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...