@@ 211-225 (lines=15) @@ | ||
208 | $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN); |
|
209 | ||
210 | // query whether or not the row has already been processed |
|
211 | if ($this->storeViewHasBeenProcessed($sku, $storeViewCode)) { |
|
212 | // log a message |
|
213 | $this->getSubject() |
|
214 | ->getSystemLogger() |
|
215 | ->debug( |
|
216 | sprintf( |
|
217 | 'URL rewrites for SKU "%s" + store view code "%s" has already been processed', |
|
218 | $sku, |
|
219 | $storeViewCode |
|
220 | ) |
|
221 | ); |
|
222 | ||
223 | // return without creating any rewrites |
|
224 | return $this->getRow(); |
|
225 | }; |
|
226 | ||
227 | // stop processing as we don't want to create URL rewrites for the admin store view |
|
228 | if ($storeViewCode === StoreViewCodes::ADMIN) { |
|
@@ 228-242 (lines=15) @@ | ||
225 | }; |
|
226 | ||
227 | // stop processing as we don't want to create URL rewrites for the admin store view |
|
228 | if ($storeViewCode === StoreViewCodes::ADMIN) { |
|
229 | // log a message and return |
|
230 | $this->getSubject() |
|
231 | ->getSystemLogger() |
|
232 | ->debug( |
|
233 | sprintf( |
|
234 | 'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"', |
|
235 | $storeViewCode, |
|
236 | $sku |
|
237 | ) |
|
238 | ); |
|
239 | ||
240 | // return without creating any rewrites |
|
241 | return $this->getRow(); |
|
242 | } |
|
243 | ||
244 | // stop processing if the store is NOT active |
|
245 | if (!$this->getSubject()->storeIsActive($storeViewCode)) { |
|
@@ 245-259 (lines=15) @@ | ||
242 | } |
|
243 | ||
244 | // stop processing if the store is NOT active |
|
245 | if (!$this->getSubject()->storeIsActive($storeViewCode)) { |
|
246 | // log a message and return |
|
247 | $this->getSubject() |
|
248 | ->getSystemLogger() |
|
249 | ->debug( |
|
250 | sprintf( |
|
251 | 'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"', |
|
252 | $storeViewCode, |
|
253 | $sku |
|
254 | ) |
|
255 | ); |
|
256 | ||
257 | // return without creating any rewrites |
|
258 | return $this->getRow(); |
|
259 | } |
|
260 | ||
261 | // only map the visibility for the product row related to the default store view |
|
262 | if (!$this->hasBeenProcessed($sku)) { |