I require an SQL query to retrieve information about the promotions applied to an order from the sales order table. The field “applied_rule_ids” is utilized to obtain all rule IDs. However, a challenge arises when a rule, such as “buy 2 get 1 free,” is stored in both the sales_order and quote tables. The issue lies in the application of this rule, where its ID is present in the quote even if the shopping cart contains only one item. Consequently, when placing an order with a single item, the rule ID is included in “applied_rule_ids,” causing the SQL query to display the order as having a promotion applied, even though it is not actually applied.
You may also like
i’m trying to move this UI element vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar/sorter.phtml from its original position to the right side of the screen inside another container. […]
Just after powering up my laptop, the following message comes: [ 1.329900]i801_smbus 0000:00:1f.3: Failed to enable SMBus PCI device (-16) /dev/sda3: clean, […]
I’m trying to get the inventory stock details for an order in observer using the event sales_order_shipment_save_after. I cannot find the inventory […]
I’m an L2 Support Tech, and as part of my daily activities, I provide assistance walking stores through reimaging their POS/Hardware systems. […]