-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: QuoteEvent: mm18mxFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- Magento 2.1.15 EE
Steps to reproduce (*)
- Create a module to observer following events:
checkout_cart_product_add_after
checkout_cart_product_update_after
- Try to get values of quote item price in observers:
/**
* @param \Magento\Framework\Event\Observer $observer
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
/** @var \Magento\Quote\Model\Quote\Item $item */
$item = $observer->getEvent()->getData('quote_item');
$item->load($item->getId());
// part of my debug session
var_dump(get_class($item)); // wil return correct class
var_dump($item->getCustomPrice()); // will return NULL
var_dump($item->getBasePrice()); // will return NULL
die();
}
Expected result (*)
- Quote Item Prices are loaded from database (they are set in
quote_item
table) - Be able to control product price on update action
Actual result (*)
- Quote Item prices are NULL
- Can't control quote item price (setCustomPrice) becasue I don't know previous price (also customized one)
Metadata
Metadata
Assignees
Labels
Component: QuoteEvent: mm18mxFixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release