debreli
OpenCart-TR
catalog/controller/product/product.php aç
bul
öncesine ekle
bul
sonrasına ekle
catalog/language/turkish/product/product.php aç
bul
sonrasına ekle
catalog/view/theme/default/template/product/product.tpl aç
bul
öncesine ekle
ürünün üreticisi yoksa göstermez.
bul
Kod:
$this->document->setTitle($product_info['name']);
öncesine ekle
Kod:
//üreticiye ait urunler
$this->load->model('catalog/product');
$this->load->model('catalog/manufacturer');
$this->load->model('tool/image');
$this->data['products2'] = array();
$data = array(
'filter_manufacturer_id' => $product_info['manufacturer_id'],
'sort' => 'p.date_added',
'order' => 'DESC',
'start' => 0,
'limit' => 5
);
$results = $this->model_catalog_product->getProducts($data);
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $this->config->get('image_width'), $this->config->get('image_width'));
} else {
$image = false;
}
if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
} else {
$price = false;
}
if ((float)$result['special']) {
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
} else {
$special = false;
}
if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}
$this->data['products2'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'price' => $price,
'special' => $special,
'rating' => $rating,
'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),
);
}
//üreticiye ait urunler bitti
bul
Kod:
$this->data['text_tags'] = $this->language->get('text_tags');
sonrasına ekle
Kod:
$this->data['text_manufacturer_title'] = $this->language->get('text_manufacturer_title');
catalog/language/turkish/product/product.php aç
bul
Kod:
$_['text_tags'] = 'Etiketler:';
sonrasına ekle
Kod:
$_['text_manufacturer_title'] = 'Üreticiye Ait Diğer Ürünler:';
catalog/view/theme/default/template/product/product.tpl aç
bul
Kod:
<?php if ($tags) { ?>
öncesine ekle
Kod:
<?php if ($manufacturer) { ?>
<div class="box">
<div class="box-heading"> <?php echo $text_manufacturer_title; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($products2 as $product) { ?>
<div>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
</div>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>
</div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>
ürünün üreticisi yoksa göstermez.