} $this->data['button_jv_quick_order'] = $this->language->get('button_jv_quick_order'); //JV_Quick_Order $this->data['button_wishlist'] = $this->language->get('button_wishlist'); $this->data['button_compare'] = $this->language->get('button_compare'); $this->data['button_upload'] = $this->language->get('button_upload'); $this->data['button_continue'] = $this->language->get('button_continue'); $this->load->model('catalog/review'); $this->data['tab_description'] = $this->language->get('tab_description'); $this->data['tab_attribute'] = $this->language->get('tab_attribute'); $this->data['tab_review'] = sprintf($this->language->get('tab_review'), $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id'])); $this->data['tab_related'] = $this->language->get('tab_related'); $this->data['product_id'] = $this->request->get['product_id']; $this->data['manufacturer'] = $product_info['manufacturer']; $this->data['manufacturers'] = $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $product_info['manufacturer_id']); $this->data['model'] = $product_info['model']; $this->data['reward'] = $product_info['reward']; $this->data['points'] = $product_info['points']; $this->data['sku'] = $product_info['sku']; $this->data['upc'] = $product_info['upc']; $this->data['ean'] = $product_info['ean']; $this->data['jan'] = $product_info['jan']; $this->data['isbn'] = $product_info['isbn']; $this->data['mpn'] = $product_info['mpn']; $this->data['location'] = $product_info['location']; if ($product_info['weight']) { $this->data['weight'] = $this->weight->format($product_info['weight'], $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point')); } else { $this->data['weight'] = ''; } if ($product_info['quantity'] <= 0) { $this->data['stock'] = $product_info['stock_status']; } elseif ($this->config->get('config_stock_display')) { $this->data['stock'] = $product_info['quantity']; } else { $this->data['stock'] = $this->language->get('text_instock'); } $this->load->model('tool/image'); if ($product_info['image']) { $this->data['popup'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')); } else { $this->data['popup'] = ''; } if ($product_info['image']) { $this->data['thumb'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')); } else { $this->data['thumb'] = ''; } $this->data['thumb2'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')); $this->data['thumb1'] = $this->model_tool_image->resize($product_info['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')); $this->data['images'] = array(); $results = $this->model_catalog_product->getProductImages($this->request->get['product_id']); foreach ($results as $result) { $this->data['images'][] = array( 'popup' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_popup_width'), $this->config->get('config_image_popup_height')), 'thumb' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')), 'thumb1' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_additional_width'), $this->config->get('config_image_additional_height')), 'thumb2' => $this->model_tool_image->resize($result['image'], $this->config->get('config_image_thumb_width'), $this->config->get('config_image_thumb_height')) ); } if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $this->data['price'] = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $this->data['price'] = false; } if ((float)$product_info['special']) { $this->data['special'] = $this->currency->format($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $this->data['special'] = false; } if ((float)$product_info['special']) { $this->data['saving'] = $this->currency->format(($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')))-($this->tax->calculate($product_info['special'], $product_info['tax_class_id'], $this->config->get('config_tax')))); } else { $this->data['special'] = false; } if ((float)$product_info['special']) { $this->data['percent'] = round((($product_info['price'] - $product_info['special'])/$product_info['price'])*100, 0); } else { $this->data['special'] = false; } if ($this->config->get('config_tax')) { $this->data['tax'] = $this->currency->format((float)$product_info['special'] ? $product_info['special'] : $product_info['price']); } else { $this->data['tax'] = false; } $discounts = $this->model_catalog_product->getProductDiscounts($this->request->get['product_id']); $this->data['discounts'] = array(); foreach ($discounts as $discount) { $this->data['discounts'][] = array( 'quantity' => $discount['quantity'], 'price' => $this->currency->format($this->tax->calculate($discount['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) ); } $this->data['options'] = array(); foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) { if ($option['type'] == 'select' || $option['type'] == 'radio' || $option['type'] == 'checkbox' || $option['type'] == 'image') { $option_value_data = array(); foreach ($option['option_value'] as $option_value) { if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) { if ((($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) && (float)$option_value['price']) { $price = $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))); } else { $price = false; } $option_value_data[] = array( 'product_option_value_id' => $option_value['product_option_value_id'], 'option_value_id' => $option_value['option_value_id'], 'name' => $option_value['name'], 'image' => $this->model_tool_image->resize($option_value['image'], 50, 50), 'price' => $price, 'price_prefix' => $option_value['price_prefix'] ); } } $this->data['options'][] = array( 'product_option_id' => $option['product_option_id'], 'option_id' => $option['option_id'], 'name' => $option['name'], 'type' => $option['type'], 'option_value' => $option_value_data, 'required' => $option['required'] ); } elseif ($option['type'] == 'text' || $option['type'] == 'textarea' || $option['type'] == 'file' || $option['type'] == 'date' || $option['type'] == 'datetime' || $option['type'] == 'time') { $this->data['options'][] = array( 'product_option_id' => $option['product_option_id'], 'option_id' => $option['option_id'], 'name' => $option['name'], 'type' => $option['type'], 'option_value' => $option['option_value'], 'required' => $option['required'] ); } } if (