Üreticiye ait diğer ürünler

debreli

OpenCart-TR
Katılım
31 Ağu 2010
Mesajlar
196
Tepkime puanı
0
Puanları
0
Web sitesi
vakifshop.com
catalog/controller/product/product.php aç

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.

9ktt6.jpg
 

adsl77

OpenCart-TR
Katılım
6 May 2011
Mesajlar
130
Tepkime puanı
0
Puanları
0
Konum
Ankara
debreli döktürmüşsün yine :) eline koluna sağlık.

yazara ait diğer kitaplarıda paylaşırmısın ?

kolay gelsin....
 

afroma

For a good time, one night only
Katılım
9 Ara 2009
Mesajlar
156
Tepkime puanı
0
Puanları
16
Yaş
41
Konum
Usa
Web sitesi
meettomy.site
Adımları tamamladım, ama image ile ilgili conroller dosyasından kaynaklanan bir hata verdi. Bilginize...
Versiyon: 1.5.1.3.1
 

evimemoda

OpenCart-TR
Katılım
11 Ara 2011
Mesajlar
25
Tepkime puanı
0
Puanları
0
Yaş
37
Web sitesi
www.evimemoda.com
herşey çok güzel ama resimler çıkmıyor...
resimlerin de çıkması için ne yapmamız lazım?
 
Üst