Add Custom Tab On Customer Account Section In Magento 2

Follow the steps listed below to add custom tab on customer account section on frontend in Magento 2. Add below files into your custom extension. Ex:- Namespace:- Emipro Modulename : Myblog 1. Create customer_account.xml into Emipro/Myblog/view/frontend/layout 2. Create myblog_customer_index.xml into…

Read More

Magento Get Coupon order History By Particular coupon code

$orderCollection = Mage::getModel(‘sales/order’)->getCollection() ->addAttributeToSelect(‘increment_id’) ->addAttributeToSelect(‘customer_firstname’) ->addAttributeToSelect(‘customer_lastname’) ->addAttributeToSelect(‘customer_email’) ->addAttributeToSelect(‘coupon_code’) ->addAttributeToFilter(‘coupon_code’, ‘YOUR_COUPON_CODE_HERE’); print_r($orderCollection->getData());

Sql Query For Delete All Order – Magento

SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_flat_creditmemo`; TRUNCATE `sales_flat_creditmemo_comment`; TRUNCATE `sales_flat_creditmemo_grid`; TRUNCATE `sales_flat_creditmemo_item`; TRUNCATE `sales_flat_invoice`; TRUNCATE `sales_flat_invoice_comment`; TRUNCATE `sales_flat_invoice_grid`; TRUNCATE `sales_flat_invoice_item`; TRUNCATE `sales_flat_order`; TRUNCATE `sales_flat_order_address`; TRUNCATE `sales_flat_order_grid`; TRUNCATE `sales_flat_order_item`; TRUNCATE `sales_flat_order_payment`; TRUNCATE `sales_flat_order_status_history`; TRUNCATE `sales_flat_quote`; TRUNCATE `sales_flat_quote_address`; TRUNCATE `sales_flat_quote_address_item`; TRUNCATE `sales_flat_quote_item`; TRUNCATE `sales_flat_quote_item_option`;…

Read More