@@ -88,15 +88,18 @@ public function getPriceList(Customer $customer = null, Website $website = null)
88
88
}
89
89
90
90
$ 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
+ }
99
101
}
102
+
100
103
if (!$ priceList ) {
101
104
$ priceList = $ this ->getPriceListFromConfig ();
102
105
}
@@ -123,8 +126,8 @@ protected function getPriceListByCustomer(Customer $customer, Website $website)
123
126
}
124
127
125
128
/**
126
- * @param Customer|null $customer
127
- * @param Website|null $website
129
+ * @param Customer $customer
130
+ * @param Website $website
128
131
* @return null|CombinedPriceList
129
132
*/
130
133
protected function getPriceListByCustomerGroup (Customer $ customer , Website $ website )
@@ -139,7 +142,7 @@ protected function getPriceListByCustomerGroup(Customer $customer, Website $webs
139
142
}
140
143
141
144
/**
142
- * @param Website|null $website
145
+ * @param Website $website
143
146
* @return null|CombinedPriceList
144
147
*/
145
148
protected function getPriceListByAnonymousCustomerGroup (Website $ website )
0 commit comments