Special Ürünler

agolhon

OpenCart-TR
Katılım
15 Tem 2010
Mesajlar
58
Tepkime puanı
0
Puanları
0
S.a

Arkadaşlar benim bir sorum olacaktı . Special ürün modülündeki "Özel Ürün" yazan yeri "Vitrin İlanları" Diye değişmek istiyorum ve Fiyatlarıda kaldırmak istiyorum kodları ayıklayamadım yardımcı olurmusunuz . 1.4.9 kullanıyorum
Kod:
<?php
class ControllerModuleSpecial extends Controller {
	protected function index() {
		$this->language->load('module/special');

      	$this->data['heading_title'] = $this->language->get('heading_title');

		$this->load->model('catalog/product');
		$this->load->model('catalog/review');
		$this->load->model('tool/seo_url');
		$this->load->model('tool/image');

		$this->data['button_add_to_cart'] = $this->language->get('button_add_to_cart');

		$this->data['products'] = array();

		$results = $this->model_catalog_product->getProductSpecials('pd.name', 'ASC', 0, $this->config->get('special_limit'));

		foreach ($results as $result) {
			if ($result['image']) {
				$image = $result['image'];
			} else {
				$image = 'no_image.jpg';
			}

			if ($this->config->get('config_review')) {
				$rating = $this->model_catalog_review->getAverageRating($result['product_id']);
			} else {
				$rating = false;
			}

			$special = FALSE;

			$discount = $this->model_catalog_product->getProductDiscount($result['product_id']);

			if ($discount) {
				$price = $this->currency->format($this->tax->calculate($discount, $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));

				$special = $this->model_catalog_product->getProductSpecial($result['product_id']);

				if ($special) {
					$special = $this->currency->format($this->tax->calculate($special, $result['tax_class_id'], $this->config->get('config_tax')));
				}
			}

			$options = $this->model_catalog_product->getProductOptions($result['product_id']);

			if ($options) {
				$add = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']);
			} else {
				$add = HTTPS_SERVER . 'index.php?route=checkout/cart&product_id=' . $result['product_id'];
			}

			$this->data['products'][] = array(
				'product_id'    => $result['product_id'],
				'name'    		=> $result['name'],
				'model'   		=> $result['model'],
				'rating'  		=> $rating,
				'stars'   		=> sprintf($this->language->get('text_stars'), $rating),
				'price'   		=> $price,
				'options'   	=> $options,
				'special' 		=> $special,
				'image'   		=> $this->model_tool_image->resize($image, 38, 38),
				'thumb'   		=> $this->model_tool_image->resize($image, $this->config->get('config_image_product_width'), $this->config->get('config_image_product_height')),
				'href'    		=> $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $result['product_id']),
				'add'    		=> $add
			);
		}

		if (!$this->config->get('config_customer_price')) {
			$this->data['display_price'] = TRUE;
		} elseif ($this->customer->isLogged()) {
			$this->data['display_price'] = TRUE;
		} else {
			$this->data['display_price'] = FALSE;
		}

		$this->id = 'special';

		if ($this->config->get('special_position') == 'home') {
			$this->data['heading_title'] .= (' ' . $this->language->get('text_products'));
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/special_home.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/module/special_home.tpl';
			} else {
				$this->template = 'default/template/module/special_home.tpl';
			}
		} else {
			if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/special.tpl')) {
				$this->template = $this->config->get('config_template') . '/template/module/special.tpl';
			} else {
				$this->template = 'default/template/module/special.tpl';
			}
		}

		$this->render();
	}
}
?>
 

mirac

OpenCart-TR
Katılım
7 Şub 2010
Mesajlar
1,383
Tepkime puanı
0
Puanları
36
Yaş
42
Konum
Beykoz____
Web sitesi
www.notebook-cantasi.com
Verdiğiniz kodlar Özel ürünler modulune ait değil.. Kampanyalar modulune aittir öncelikler bunu düzeltin.. Değişiklik yapacağınız dosya featured.tpl dosyasıdır.. Eğer ürünlerinizi anasayfada gösterecekseniz featured_home.tpl dosyasındada değişiklik yapmalısınız..


Php dosyasından fiyat gizlemek istiyorsanız if (!$this->config->get('config_customer_price')) { bölümündeki TRUE FALSE seçenekleri ile gizleyebilirsiniz ama en mantıklı yolu default/template/module/featured.tpl dosyasından fiyatları silmektir..

catalog\view\theme\default\template\module\featured.tpl Aç..

Bul..
Kod:
          <?php if ($display_price) { ?>
          <br />
          <?php if (!$product['special']) { ?>
          <span style="font-size: 11px; color: #900;"><?php echo $product['price']; ?></span>
          <?php } else { ?>
          <span style="font-size: 11px; color: #900; text-decoration: line-through;"><?php echo $product['price']; ?></span> <span style="font-size: 11px; color: #F00;"><?php echo $product['special']; ?></span>
          <?php } ?>
          <a class="button_add_small" href="<?php echo $product['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
          <?php } ?>

Değiştir..
Kod:
          <a class="button_add_small" href="<?php echo $product['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>

Sepete ekle butonunu da silmek isterseniz bul dediğim kodu değiştirmeden siliniz..

Özel Ürünler başlığınıda catalog\language\turkish\module\featured.php dosyasından düzenleyebilirsiniz..
 

agolhon

OpenCart-TR
Katılım
15 Tem 2010
Mesajlar
58
Tepkime puanı
0
Puanları
0
Kardeşim eline emeğine sağlık bir sorum daha olucak resimde gördüğün kırmızı yerleri nasıl kaldıra bilirim .
1539.jpg
 

mirac

OpenCart-TR
Katılım
7 Şub 2010
Mesajlar
1,383
Tepkime puanı
0
Puanları
36
Yaş
42
Konum
Beykoz____
Web sitesi
www.notebook-cantasi.com
catalog\view\theme\Kullandığın Tema\template\product\product.tpl Aç..


Bul ve Sil..
Kod:
      <a tab="#tab_related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
 

agolhon

OpenCart-TR
Katılım
15 Tem 2010
Mesajlar
58
Tepkime puanı
0
Puanları
0
istediğim yerleri kaldırdım sadece şu "miktar sepete ekle" bölümü kaldı:s
 

agolhon

OpenCart-TR
Katılım
15 Tem 2010
Mesajlar
58
Tepkime puanı
0
Puanları
0
verdiğin linkte benim dediğim olayı bulamadım kardeş :)
 

admin

Administrator
Yönetici
Katılım
13 Ağu 2009
Mesajlar
3,200
Tepkime puanı
1
Puanları
38
Yaş
38
Konum
Bursa
Web sitesi
www.opencart-tr.com
Konuyu dikkatli okuyunuz
http://forum.opencart-tr.com/thread-822-post-6689.html#pid6689

Ayrıca bu konu hakkında sorularınza eski konu altında devam ediniz.
 
Üst