@@ 180-194 (lines=15) @@ | ||
177 | $storeViewCode = $this->getSubject()->getStoreViewCode(StoreViewCodes::ADMIN); |
|
178 | ||
179 | // query whether or not the row has already been processed |
|
180 | if ($this->storeViewHasBeenProcessed($sku, $storeViewCode)) { |
|
181 | // log a message |
|
182 | $this->getSubject() |
|
183 | ->getSystemLogger() |
|
184 | ->debug( |
|
185 | sprintf( |
|
186 | 'URL rewrites for SKU "%s" + store view code "%s" has already been processed', |
|
187 | $sku, |
|
188 | $storeViewCode |
|
189 | ) |
|
190 | ); |
|
191 | ||
192 | // return without creating any rewrites |
|
193 | return $this->getRow(); |
|
194 | }; |
|
195 | ||
196 | // stop processing as we don't want to create URL rewrites for the admin store view |
|
197 | if ($storeViewCode === StoreViewCodes::ADMIN) { |
|
@@ 197-211 (lines=15) @@ | ||
194 | }; |
|
195 | ||
196 | // stop processing as we don't want to create URL rewrites for the admin store view |
|
197 | if ($storeViewCode === StoreViewCodes::ADMIN) { |
|
198 | // log a message and return |
|
199 | $this->getSubject() |
|
200 | ->getSystemLogger() |
|
201 | ->debug( |
|
202 | sprintf( |
|
203 | 'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"', |
|
204 | $storeViewCode, |
|
205 | $sku |
|
206 | ) |
|
207 | ); |
|
208 | ||
209 | // return without creating any rewrites |
|
210 | return $this->getRow(); |
|
211 | } |
|
212 | ||
213 | // stop processing if the store is NOT active |
|
214 | if (!$this->getSubject()->storeIsActive($storeViewCode)) { |
|
@@ 214-228 (lines=15) @@ | ||
211 | } |
|
212 | ||
213 | // stop processing if the store is NOT active |
|
214 | if (!$this->getSubject()->storeIsActive($storeViewCode)) { |
|
215 | // log a message and return |
|
216 | $this->getSubject() |
|
217 | ->getSystemLogger() |
|
218 | ->debug( |
|
219 | sprintf( |
|
220 | 'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"', |
|
221 | $storeViewCode, |
|
222 | $sku |
|
223 | ) |
|
224 | ); |
|
225 | ||
226 | // return without creating any rewrites |
|
227 | return $this->getRow(); |
|
228 | } |
|
229 | ||
230 | // only map the visibility for the product row related to the default store view |
|
231 | if (!$this->hasBeenProcessed($sku)) { |