@@ -88,15 +88,18 @@ public function getPriceList(Customer $customer = null, Website $website = null)
8888 }
8989
9090 $ priceList = null ;
91- if ($ customer ) {
92- $ priceList = $ this ->getPriceListByCustomer ($ customer , $ website );
93- }
94- if (!$ priceList ) {
95- $ priceList = $ this ->getPriceListByAnonymousCustomerGroup ($ website );
96- }
97- if (!$ priceList ) {
98- $ priceList = $ this ->getPriceListRepository ()->getPriceListByWebsite ($ website );
91+ if ($ website ) {
92+ if ($ customer ) {
93+ $ priceList = $ this ->getPriceListByCustomer ($ customer , $ website );
94+ }
95+ if (!$ priceList ) {
96+ $ priceList = $ this ->getPriceListByAnonymousCustomerGroup ($ website );
97+ }
98+ if (!$ priceList ) {
99+ $ priceList = $ this ->getPriceListRepository ()->getPriceListByWebsite ($ website );
100+ }
99101 }
102+
100103 if (!$ priceList ) {
101104 $ priceList = $ this ->getPriceListFromConfig ();
102105 }
@@ -123,8 +126,8 @@ protected function getPriceListByCustomer(Customer $customer, Website $website)
123126 }
124127
125128 /**
126- * @param Customer|null $customer
127- * @param Website|null $website
129+ * @param Customer $customer
130+ * @param Website $website
128131 * @return null|CombinedPriceList
129132 */
130133 protected function getPriceListByCustomerGroup (Customer $ customer , Website $ website )
@@ -139,7 +142,7 @@ protected function getPriceListByCustomerGroup(Customer $customer, Website $webs
139142 }
140143
141144 /**
142- * @param Website|null $website
145+ * @param Website $website
143146 * @return null|CombinedPriceList
144147 */
145148 protected function getPriceListByAnonymousCustomerGroup (Website $ website )
0 commit comments