I’m struggling trying to ship an order just after the order is created. In the event sales_order_place_after I’m executing the following code: use MagentoSalesModelOrderShipmentTrackFactory; use MagentoSalesApiDataShipmentCommentCreationInterface; use MagentoSalesModelShipOrder; use MagentoSalesModelConvertOrder; use TransomPakkeLoggerLogger; use MagentoSalesApiDataOrderInterface; /** * Custom shipping model */ class CreateShipment { protected $trackingFactory; protected $commentInterface; protected $shipOrderService; protected […]
Magento2
I found the following errors in the exception.log and debug.log files in /var/log folder: [2019-12-17 16:23:05] main.CRITICAL: The element "product.info.options" can't have a child because "product.info.options" already has a child with alias "default". {"exception":"[object] (Magento\Framework\Exception\LocalizedException(code: 0): The element "product.info.options" can't have a child because "product.info.options" already has a child with […]
How I should ‘Setup/update System/store Configuration values through setup script’? Trying with Setup/Patch/Data script using something like //app/code/Namespace/Module/Setup/Patch/Data/SetupConfigData.php namespace NamespaceModuleSetupPatchData; use MagentoFrameworkSetupModuleDataSetupInterface; use MagentoFrameworkSetupPatchDataPatchInterface; use MagentoFrameworkAppConfigMutableScopeConfigInterface; class SetupConfigData implements DataPatchInterface { const XML_PATH_STORE_NAME = 'general/store_information/name'; const XML_PATH_STORE_PHONE = 'general/store_information/phone'; const XML_PATH_ADMIN_ACCOUNT_SHARING = 'admin/security/admin_account_sharing'; const XML_PATH_ADMIN_URL_SECRET_KEY = 'admin/security/use_form_key'; const SCOPE_STORE = […]
I have found that the less files are not compiling in my custom theme. at all. originally I discovered the problem when I made changes to my _extend. less file and no changes occurred, but now I have found that none of the .less files in my app/…web/source/CSS folder are […]
With Magento’s new multi-source inventory system, various new tables have been introduced into the database. inventory_source_item contains the machine name of the source, SKU, quantity, and the status. inventory_stock_x is a table that exists for each source, containing the SKU, quantity, and if it’s salable. Why does the second table […]
In my layered navigation, I have items that are being sorted by quantity. For example the items with the most quantity are listed higher, and lower quantity are listed lower. What i am looking for Category A (2) B (32) C (1) what in currently getting is Category B (32) […]
I wrote an override to vendormagentomodule-salesModelOrderPdfAbstractPdf.php I did enable my override, I did run magento setup, di compile and flush the cache. Everything went smooth. But seems still using the old AbstractPdf.php. I don’t see anything from the log, what can I do about it? Thank you I create below […]
I have a mixin for 'Magento_Checkout/js/view/payment'. So when payment method is selected I call 'Magento_Checkout/js/action/get-totals' to refresh totals area. Reason of this is because I will apply additional fee according to selected method and show it in same page. So when getTotalsAction is called it does GET to V1/carts/mine/totals. For […]
My company work in Magento 1.9.2.1, the customer bought the goods (goods+ shipment to customer = order XY), the model received broken, He packed it and pay own cash for shipment back to a warehouse (amount 111) We raised Magento credit memo for full amount order XY, but we need […]