turkuaz
OpenCart-TR
- Katılım
- 25 Mar 2010
- Mesajlar
- 118
- Tepkime puanı
- 0
- Puanları
- 0
- Konum
- ANKARA
- Web sitesi
- www.turkuazhobby.com
 
	Örneğin ürün sayıs 3yada 5 in altına düşünce uyarı ikonu görünsün.
 
	Ürünün yanında stok durumunu göstermek için aşağıdaki kodları
uygulayın.
kımızı ile işaretli olan kodları ekle
 
	catalog/controller/product/product.php de
BUL ve sil
		Kod:
	
				if ($product_info['quantity'] <= 0) {
				$this->data['stock'] = $product_info['stock'];
			} else {
				if ($this->config->get('config_stock_display')) {
					$this->data['stock'] = $product_info['quantity'];
				} else {
					$this->data['stock'] = $this->language->get('text_instock');
				}onun yerine EKLE
		Kod:
	
	if ($product_info['quantity'] <= 0) {
				$this->data['stock'] = $product_info['stock'];
			    $this->data['stock1'] = $product_info['stock'];
				$this->data['stock1'] = $this->language->get('text_yokstock');
			} else {
				if ($this->config->get('config_stock_display')) {
					$this->data['stock'] = $product_info['quantity'];
				} else {
					$this->data['stock'] = $this->language->get('text_instock');
					
				} 
			if ($product_info['quantity'] <= 5) {
				$this->data['stock1'] = $product_info['stock'];
				$this->data['stock1'] = $this->language->get('text_azstock');	
				} else {$this->data['stock1'] = $this->language->get('text_yeterlistock');}Buradaki 5 i "if ($product_info['quantity'] <= 5)"
uyarı ikonu görünmesi için ürün sayısı üçün altına düşerse <= 3 yapın yada 1 ,2 ne isterseniz.Varsayılan 5 dir
catalog/language/turkish/product/product.php yi aç
kırmızı kutu içindeki kodları yaz
 
	catalog/language/turkish/product/product.php aç ve ekle
		Kod:
	
	$_['text_yokstock']        = '   <img src="catalog/view/theme/default/image/yok.png" alt="Stokda YOK!"/>';
$_['text_azstock']        = ' <span style="color: #FF0000;">Stok Az !</span><img src="catalog/view/theme/default/image/uyar.gif" alt="Stok AZ!"/>';
$_['text_yeterlistock']   = '   <img src="catalog/view/theme/default/image/var.png" alt="Stok Yeterli!"/>';Animasyonlu isterseniz
		Kod:
	
	$_['text_azstock']        = '   <img src="catalog/view/theme/default/image/uyar.gif" alt="Stok AZ!"/>';bunu kullanın
İsterseniz kırmızı renkli Stok az! yazısı ve animasyon için bunu kullanın
		Kod:
	
	$_['text_azstock']        = ' <span style="color: #FF0000;">Stok Az !</span> <img src="catalog/view/theme/default/image/uyar.gif" alt="Stok AZ!"/>';kırmızı kutu içindeki kodları ekle
 
	catalog/view/theme/default/template/product/product.tpl de
BUL
		Kod:
	
	<td><?php echo $stock; ?></td>
		Kod:
	
	<td><?php echo $stock1; ?></td>Hepsi bu kadar. ikonlar ektedir.
Not: Resim yerine yazı yazmak isterseniz
catalog/language/turkish/product/product.php yi aç
kırmızı kutu içindeki kodları yaz
 
	' ve ' arasındaki <img ... /> silin istediğinizi yazın Örng: stok az.. gibi
 
	 
				 
 
		 
			 
			 
			 
			 
 
		 
 
		