if(!empty($related_products))
{
foreach($related_products as &$r_p)
$r_products[$r_p->related_id] = &$r_p;
$temp_products = $this->products->get_products(array('id'=>array_keys($r_products)));
foreach($temp_products as $temp_product)
$r_products[$temp_product->id] = $temp_product;
$related_products_images = $this->products->get_images(array('product_id'=>array_keys($r_products)));
foreach($related_products_images as $image)
{
$r_products[$image->product_id]->images[] = $image;
}
}
if(is_array($options))
{
$temp_options = array();
foreach($options as $option) {
$temp_options[$option->feature_id]->feature_id = $option->feature_id; ДАННАЯ СТРОКА
if(is_array($option->value))
$temp_options[$option->feature_id]->values = $option->value;
else
$temp_options[$option->feature_id]->values[] = $option->value;
}
$options = $temp_options;
}
$this->design->assign('product', $product);
$this->design->assign('product_categories', $product_categories);
$this->design->assign('product_variants', $variants);
$this->design->assign('product_images', $images);
$this->design->assign('options', $options);