Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

New answers tagged

0

This reason is that the table sales_order_payment is lacking in data. To resolve this error, you must only delete all and re-migrate data again.


0

We have tested this orders grid issue in the two ways 1. With the replication process 2. Without the replication process Using the database replication process, the sales_order table records count was not matching with the sales_order_payment table records count. So that vendor/magento/module-sales/Model/OrderRepository.php:172 (IMP Note !!!: ...


1

Have not seen this before in stores that we have migrated so far. But perhaps you could follow the steps Magento 2.3 takes to determine if an order can be reordered or not. The logged in user needs to have permission to use the reorder function. (I assume this is the case since you can reorder other orders). - Magento\Sales\Block\Adminhtml\Order\View::...


0

As far as I understand, this product_option.extension_attributes.custom_options.option_value it's a value that added via extension attributes. In Magento 2 extension attributes are not magically saved to the database or populated, so based on this value above have to be added via plugin, observer or even rewrite. The idea is to locate this logic which is ...


0

I found a way by simply querying the database directly for such info


0

To overide that things, you need to do this things. Vendor\Extension\view\adminhtml\requirejs-config.js add this: var config = { map: { '*': { 'Magento_Sales/order/create/scripts':'Vendor_Extension/order/create/scripts' } } }; Then create the file Vendor\Extension\view\adminhtml\web\order\create\scripts.js with your content.


0

sales_order_grid has less information about the order. It is basically used for Admin order listing section(Admin>Sales>Orders). Where sales_order is main table and has much information. This data from table use on API, frontend order view, Order details admin etc. So, if you want to add the new field to order, then you must need to add this new column or ...


0

I added di.xml with <preference for="Magento\Sales\Model\AdminOrder\Create" type="Vendor\Module\Rewrite\Magento\Sales\Model\AdminOrder\Create"/> Create.php <?php namespace Vendor\Module\Rewrite\Magento\Sales\Model\AdminOrder; class Create extends \Magento\Sales\Model\AdminOrder\Create { /** * Prepare customer data for order creation. ...


0

You should be using Aheadworks_RewardPoints module. Go to the file /app/code/Aheadworks/RewardPoints/Model/Service/CustomerRewardPointsService.php. Search for the method private function getCustomerTransactions. Change ->setField('ISNULL(expiration_date), expiration_date, transaction_id') line to ->setField('expiration_date').


0

For any reason if you need to fetch order collection, a search criteria has to be amended to the URL. If you need to fetch all the orders, please use empty search criteria. Example : http://magento213/index.php/rest/V1/orders?searchCriteria Swagger contains more details. Please explore http://devdocs.magento.com/swagger/


0

Please check if cron is running or not. Sales order grid updates by cron only.


0

In Magento, if you want to create a credit memo, then you need to use below class: \Magento\Sales\Api\RefundOrderInterface \Magento\Sales\Api\InvoiceRepositoryInterface \Magento\Sales\Api\Data\CreditmemoItemCreationInterfaceFactory Example: <?php namespace {namespace}; class {ClassName} { /** * @var \Magento\Sales\Api\Data\...


0

di.xml <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Sales\Model\Order"> &...


1

You can fix this issue by adding temporary solution adding simple condition in Magento\ConfigurableProduct\Helper\Product\Options\Loader::load(ProductInterface $product) after line no : 51 if (get_class($typeInstance) == 'Magento\Catalog\Model\Product\Type\Simple' || get_class($typeInstance) == 'Magento\Bundle\Model\Product\Type') { return null; } ...


0

<?php // logined customer if ($order->getCustomerFirstname()) { $customerName = $order->getCustomerName(); } else { // guest customer $billingAddress = $order->getBillingAddress(); $customerName = $billingAddress->getFirstname() . ' ' . $billingAddress->getLastname(); } echo $customerName; ?>


0

Have you tried the loop? Might work. Alternative is to rewrite your query so can pass array plus encapsulate in single method to promote reusability. public function getProducts(array $productIds): array { $this->searchCriteriaBuilder->addFilter('entity_id', $productIds, 'in'); $searchCriteria = $this->searchCriteriaBuilder->...


1

For the get Customer Order history use searchCriteria and passed customer_email id. Follow below Magento 2 API to get the customer order history. Request URL: https://magento.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value]=test@gmail.com Method: GET ...


1

Create file in adminhtml app\code\Ketan\Buttons\etc\adminhtml\di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Backend\Block\Widget\Button\Toolbar"> <plugin name="...


0

Create plugin to remove cancel button from order view page. namespace NameSpace\OrderManagement\Plugin\Sales\Block\Adminhtml\Order; use NameSpace\OrderManagement\Helper\Data; use Magento\Sales\Block\Adminhtml\Order\View; use Magento\Framework\View\LayoutInterface; class ViewPlugin { /** * @var Data */ protected $helper; public function __construct(...


0

Edited: Just realized that you're on order history page. This block Magento\Shipping\Block\Tracking\Link generates a window url via order which is retrieved from registry. File: vendor/magento/module-shipping/view/frontend/templates/tracking/link.phtml <?php /** @var $block \Magento\Shipping\Block\Tracking\Link */ ?> <?php $order = $block->...


Top 50 recent answers are included