Hot answers tagged

48 votes

Magento 2 Issue with "Not Registered Handle" on all the sales sections?

The problem here is that someone defined a handle in the etc/adminhtml/di.xml search for something like this <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory"&...
CompactCode's user avatar
  • 2,447
16 votes
Accepted

Magento 2 Issue with "Not Registered Handle" on all the sales sections?

Okay so I found the problem. I found another stackexchange topic that didn't seem to be 100% related because it was a different module, however the exact same scenario was occurring. You can find the ...
Jason Diehl's user avatar
11 votes

Magento 2 Issue with "Not Registered Handle" on all the sales sections?

The self-provided answer from @jason-diehl doesn't really explain this issue, and I believe includes some incorrect information. I ran into this issue when developing a custom module and testing the ...
Brett's user avatar
  • 1,844
9 votes

Magento 2 Issue with "Not Registered Handle" on all the sales sections?

"Move that bit of code to etc/di.xml instead of etc/adminhtml/di.xml" Everyone is suggesting for moving code from etc/adminhtml/di.xml to etc/di.xml. Don't understand. why to move ? When gone inside ...
Amit Dwivedi's user avatar
  • 1,540
8 votes

Magento2 How to custom column in sales order item renderer in admin order view

Assuming you have created 'custom_item_column' in sales_order_item table you can add a custom column to Items Grid in sales order view by following: 1.Create sales_order_view.xml file in app/code/[...
Aziz's user avatar
  • 161
7 votes

Disable entire cart functionality & checkout in Magento 2

Please try it app/code/Vendor/Module/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
Nikhil Vaghela's user avatar
6 votes

Disable entire cart functionality & checkout in Magento 2

There are lot of works need to do this question: Here the steps: 1.Disable Checkout module block output This case, you disable checkout module block output that make Cart/Checkout blank and also ...
Amit Bera's user avatar
  • 77.1k
6 votes
Accepted

Magento2.3.2:Website is not opening & Class Magento\Framework\App\Http\Interceptor does not exist

Things you can try: remove the generated code directory (again): rm generated/code -rf upgrade your modules and re-compile: php bin/magento setup:upgrade php bin/magento setup:di:compile if there ...
bayer's user avatar
  • 342
6 votes

Magento2.3.2:Website is not opening & Class Magento\Framework\App\Http\Interceptor does not exist

Magento2 Class Magento\Framework\App\Http\Interceptor does not exist This issue is generate when you have make changes in your construction file and it's Factory class is not update in generated ...
rakesh prajapati's user avatar
5 votes

Magento 2.2.1 Error(Item (Magento\SalesRule\Model\Rule) with the same ID "33" already exists)

This issue occurs if you have duplicate rows in "salesrule" database table with the same "created_in" and "update_in" range. select * from salesrule where rule_id = 71; You should use 33 ...
MagePal Extensions's user avatar
5 votes
Accepted

Magento2: How to get Bestseller products collection by category ids(subcategories)

Step 1: Create a block file <?php namespace QaisarSatti\HelloWorld\Block; class BestSeller extends \Magento\Framework\View\Element\Template { protected $_collectionFactory; public function ...
Pratik Mehta's user avatar
4 votes

sales emails copy are sent multiple times

TL;DR: use the "Bcc" option instead of the "Separate Email" option for order copy emails, because the latter is seriously broken in Magento 1.9.1. It will expose your copy email addresses to the ...
solarissmoke's user avatar
4 votes
Accepted

Magento 2 - How To Display Cross Sell Products On Product Details Page (PDP)?

Please follow below instruction to display cross sell products on product page : Create module registration file : app/code/Test/Crosssell/registration.php <?php \Magento\Framework\Component\...
Sneha Panchal's user avatar
4 votes
Accepted

Magento Ordered Item Status is MIXED

I reckon it's because you have not invoiced yet. Basically, the code that handles those item status looks like this: if (!$invoiced && !$shipped && !$refunded && !$canceled &...
Raphael at Digital Pianism's user avatar
4 votes
Accepted

Magento get list of sales/revenue per brand/manufacturer

We've spent some time and that is the query we got: SELECT data_table.value AS Brand, SUM(data_table.amount) AS Sales FROM (SELECT EAOV.value, (SFOI.row_total + SFOI....
Neklo.com's user avatar
  • 2,379
4 votes
Accepted

Magento 2: delete all cart price rules (promotions) programmatically

Take a look at the delete sales rule controller: vendor/magento/module-sales-rule/Controller/Adminhtml/Promo/Quote/Delete.php. As we can see, we can use \Magento\SalesRule\Model\RuleFactory to delete ...
Khoa TruongDinh's user avatar
3 votes
Accepted

How to get defined Tax rate percent prgramatically?

Try this: $rateCollection = Mage::getModel('tax/calculation_rate')->getCollection() ->joinRegionTable(); //echo '<pre>'; foreach($rateCollection as $rate) { ...
Abdul's user avatar
  • 9,672
3 votes

Convert Order to Quote and Load to Current Cart

The previous answer only works if the quote is still available in the DB. I ran into a situation where this was no longer the case, so this code doesn't work: $quote = Mage::getModel('sales/quote')-&...
Wouter's user avatar
  • 380
3 votes
Accepted

Report showing the days with the most orders per day

This statement can be used to retrieve a list of orders per day: SELECT COUNT(*) as orders_per_day, date(created_at) as day FROM sales_flat_order GROUP BY date(created_at) ORDER BY orders_per_day ...
Anna Völkl's user avatar
  • 17.3k
3 votes

Magento 2: How to get product url in order email

You try with : <?php /** @var $block \Magento\Bundle\Block\Sales\Order\Items\Renderer */ ?> <?php $_item = $block->getItem() ?> <?php $product_url= $_item->getProduct()->...
Khoa TruongDinh's user avatar
3 votes
Accepted

Magento 2, overriding module sales js

Try following way var config = { config: { mixins: { 'Magento_Sales/order/create/scripts': { 'MyVendor_myModule/js/order/create/scriptUpdate': true ...
Sohel Rana's user avatar
  • 35.5k
3 votes

Magento 2, overriding module sales js

Issue with the location of the js file : Try with below code : var config = { "map": { "*": { "Magento_Sales/order/create/scripts": "MyVendor_myModule/js/order/create/scripts"...
Manthan Dave's user avatar
  • 9,786
3 votes
Accepted

Magento 2: How to Add another block in sales/invoice page.

First,you need to create custom module: Via custom module If you donot want to work at direct vendor folder then you need create a custom module This module should consist of below files: app/...
Amit Bera's user avatar
  • 77.1k
3 votes
Accepted

How to add custom field in catalog price rule and cart price rule?

In order to add new field in Cart Price Rule, You need to create ui_component cause it created using it. Follow Steps to add Custom Field in Cart Price Rule. Vendor/Module/view/adminhtml/...
anonymous's user avatar
  • 3,724
3 votes
Accepted

Apply discount for For every $X spent Programatically in magento 2

Hey there are two ways to do it 1.you can create a rule for this in which you need to define that if you added a product of 10$ then give 5$ off this is the easiest way to do it or you can give off ...
Shubham Khandelwal's user avatar
3 votes

Magento 2 Change Product Price

For starting purpose I suggest you to see getFinalPrice() method in class Magento\Catalog\Model\Product You can create a test after plugin for same and modify the price as per your requirement. For ...
Priyank's user avatar
  • 7,602
3 votes
Accepted

Magento2 Invoice Print PDF editing

Your totals are left aligned, which is the issue here. When you change them to right alignment (which is default for Magento 2.4.5-p1) it will fix your problem. In order to change the totals you have ...
Daniel's user avatar
  • 2,199
2 votes
Accepted

Make the invoice search results default to 200

Modifying core not recommended so extend this class constructor using magento principles. Just add one line of code to constructor. If you want to modify default grid override using template update ...
Dmaze's user avatar
  • 156
2 votes
Accepted

Create invoice programmatically with custom date

To set a time of your choosing for an invoice, you can add this to your script after the invoice is created. This would be most efficient if you have a csv or array to read with your order numbers or ...
AreDubya's user avatar
  • 1,344
2 votes
Accepted

how to show discount amount excluding tax in create invoice

I have changed discount calculation for quote items in sales_quote_collect_totals_after observer event as below : Before : ... foreach($quote->getAllItems() as $item) { $discountpercent = $...
Vinaya Maheshwari's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible