Skip to content

Commit

Permalink
Fixed getQuote() returns null in quote item and quote address objects. (
Browse files Browse the repository at this point in the history
  • Loading branch information
kiatng authored Jun 27, 2023
1 parent 752debd commit c830ba5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/code/core/Mage/Sales/Model/Quote/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ public function setQuote(Mage_Sales_Model_Quote $quote)
*/
public function getQuote()
{
if (is_null($this->_quote)) {
$this->_quote = Mage::getModel('sales/quote')->load($this->getQuoteId());
}
return $this->_quote;
}

Expand Down
3 changes: 3 additions & 0 deletions app/code/core/Mage/Sales/Model/Quote/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ public function setQuote(Mage_Sales_Model_Quote $quote)
*/
public function getQuote()
{
if (is_null($this->_quote)) {
$this->_quote = Mage::getModel('sales/quote')->load($this->getQuoteId());
}
return $this->_quote;
}

Expand Down

0 comments on commit c830ba5

Please sign in to comment.