@@ 199-207 (lines=9) @@ | ||
196 | ||
197 | if (!$product->get('has_variation') and is_object($product->getStock()) and strtolower(get_class($product->getStock())) == "stock") { |
|
198 | $products[$i]['stock_status'] = $product->getStock()->get(); |
|
199 | } else { |
|
200 | // alle ikke lagervarer der skal vises i webshop skal have en for_sale |
|
201 | if ($product->get('stock') == 0 and $product->get('do_show') == 1) { |
|
202 | $products[$i]['stock_status'] = array('for_sale' => 100); // kun til at stock_status |
|
203 | } else { |
|
204 | $products[$i]['stock_status'] = array(); |
|
205 | } |
|
206 | } |
|
207 | ||
208 | // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet? |
|
209 | // 0 = only stock |
|
210 | if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which=='webshop') { // only stock |
@@ 716-723 (lines=8) @@ | ||
713 | ||
714 | if (!$product->hasVariation() and is_object($product->getStock())) { |
|
715 | $products[$key]['stock_status'] = $product->getStock()->get(); |
|
716 | } else { |
|
717 | // alle ikke lagervarer der skal vises i webshop skal have en for_sale |
|
718 | if ($product->get('stock') == 0 and $product->get('do_show') == 1) { |
|
719 | $products[$key]['stock_status'] = array('for_sale' => 100); // kun til at stock_status |
|
720 | } else { |
|
721 | $products[$key]['stock_status'] = array(); |
|
722 | } |
|
723 | } |
|
724 | // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet? |
|
725 | // 0 = only stock |
|
726 | if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and !empty($which) and $which=='webshop') { // only stock |