Post by nzbsa » Fri Jul 29, 2016 7:30 pm

Hi,

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
which is

Code: Select all

'value'                => $product_option['value'],
Thanks in advance for any help

\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;
}
\controller\product\category.php

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),
then in the theme category tpl

Code: Select all

<p class="price">
 <?php if ($product['has_option_price_increase']) { echo 'From'; } ?> 

Newbie

Posts

Joined
Fri Jul 29, 2016 7:20 pm
Who is online

Users browsing this forum: No registered users and 3 guests