File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
app/code/Magento/Quote/Model/Quote Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ class Address extends AbstractAddress implements
139139 const ADDRESS_TYPE_BILLING = 'billing ' ;
140140
141141 const ADDRESS_TYPE_SHIPPING = 'shipping ' ;
142+
143+ private const CACHED_ITEMS_ALL = 'cached_items_all ' ;
142144
143145 /**
144146 * Prefix of model events
@@ -636,8 +638,7 @@ public function getItemsCollection()
636638 public function getAllItems ()
637639 {
638640 // We calculate item list once and cache it in three arrays - all items
639- $ key = 'cached_items_all ' ;
640- if (!$ this ->hasData ($ key )) {
641+ if (!$ this ->hasData (self ::CACHED_ITEMS_ALL )) {
641642 $ quoteItems = $ this ->getQuote ()->getItemsCollection ();
642643 $ addressItems = $ this ->getItemsCollection ();
643644
@@ -676,10 +677,10 @@ public function getAllItems()
676677 }
677678
678679 // Cache calculated lists
679- $ this ->setData (' cached_items_all ' , $ items );
680+ $ this ->setData (self :: CACHED_ITEMS_ALL , $ items );
680681 }
681682
682- $ items = $ this ->getData ($ key );
683+ $ items = $ this ->getData (self :: CACHED_ITEMS_ALL );
683684
684685 return $ items ;
685686 }
You can’t perform that action at this time.
0 commit comments