Having some issue with the below which is for opencar 2.0 not sure about code changes in 2.1.0.2 as not a coder
As soon as the controller line is enabled a white screen appears going to the categories at front end the error appears to be with
Code: Select all
error line in line 372 in vq2-system_storage_modification_catalog_model_catalog_product.php
Code: Select all
'value' => $product_option['value'],
\catalog\model\catalog\product.php
Code: Select all
public function hasOptionPriceIncrease($product_id) {
$option_data = $this->getProductOptions($product_id);
if (is_array($product_option_value)) {
foreach ($product_option_value as $option) {
if (is_array($option['product_option_value'])) {
foreach ($option['product_option_value'] as $value) {
if ($value['price'] > 1) {
return true;
}
}
}
}
}
return false;
}
Code: Select all
'has_option_price_increase' =>$this->model_catalog_product->hasOptionPriceIncrease($result['product_id']) added after 'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url),
Code: Select all
<p class="price">
<?php if ($product['has_option_price_increase']) { echo 'From'; } ?>