05-16-2015, 03:00 PM
opencart 2.x için ürün detay için stokta yok indrim ve x adet ürün kaldı sticker ekleyecez. Stickerlerımız resonsive tema uyumludur otomatik yerleşir. Kuruluma Başlayalım ..
Dosyamızı Açalım : catalog/controller/product
product.php
Bulalım :
Alıntı:$data['points'] = $product_info['points'];
Alt Satır Ekle :
Alıntı:$data['miktar'] = $product_info['quantity'];
$data['tarih'] = $product_info['date_added'];
Dosyamızı Açalım : catalogg/view/theme/seninteman/template/product/
product.tpl
Bulalım:
Alıntı:<ul class="thumbnails">
<?php if ($thumb) { ?>
Alt Satıra EKleyelim :
Alıntı:<?php if (($special)) { ?>
<div class="no-indirim"></div>
<div class="no-indirimx">
<strong><?php echo round((1-$special/$price)*100); ?></strong></div>
<?php } ?>
<?php if($miktar <= 0) { ?>
<div class="no-stock"></div>
<?php } ?>
<?php if(($miktar < 5) && ($miktar!=0)) { ?>
<div class="no-kalan"></div>
<div class="no-kalanx">
Son <strong><?php echo $miktar; ?></strong> Adet</div>
<?php } ?>
<?php if(($miktar < 4) && ($miktar!=0)) { ?>
<div class="no-kalan"></div>
<div class="no-kalanx">
Son <strong><?php echo $miktar; ?></strong> Adet</div>
<?php } ?>
<?php if(($miktar < 3) && ($miktar!=0)) { ?>
<div class="no-kalan"></div>
<div class="no-kalanx">
Son <strong><?php echo $miktar; ?></strong> Adet</div>
<?php } ?>
<?php if(($miktar < 2) && ($miktar!=0)) { ?>
<div class="no-kalan"></div>
<div class="no-kalanx">
Son <strong><?php echo $miktar; ?></strong> Adet</div>
<?php } ?>
<?php if(($miktar < 1) && ($miktar!=0)) { ?>
<div class="no-kalan"></div>
<div class="no-kalanx">
Son <strong><?php echo $miktar; ?></strong> Adet</div>
<?php } ?>
<?php if (strtotime($tarih) < strtotime('-23 days')) { ?>
<?php } else { ?>
<div class="no-yeni"></div>
<?php } ?>
Dosyamızı açalım: catalog/view/theme/seninteman/stylesheet/
stylesheet.css
En Alt Satıra Ekleyelim :
Alıntı:.no-stock {
background: url("../image/stock-out.png") no-repeat scroll 0% 0% transparent;
height: 150px;
left: 14px;
position: absolute;
top: 1px;
width: 150px;
}
#column-left .no-stock {
top: 26px;
}
.product-list .no-stock {
top: 1px;
}
.no-indirim {
background: url("../image/indirim.png") no-repeat scroll 0% 0% transparent;
height: 82px;
right: 26px;
position: absolute;
top: -4px;
width: 118px;
}
#column-right .no-indirim {
top: 26px;
}
.product-list .no-indirim {
top: -5px;
left: 144px;
}
.no-indirimx {
height: 82px;
right: 6px;
position: absolute;
top: -1px;
width: 118px;
color:#fff;
}
#column-right .no-indirimx {
top: 26px;
}
.product-list .no-indirimx {
top: -1px;
left: 162px;
}
.no-kalan {
background: url("../image/kalan.png") no-repeat scroll 0% 0% transparent;
height: 150px;
left: 14px;
position: absolute;
top: 82px;
width: 150px;
}
#column-right .no-kalan {
top: 26px;
}
.product-list .no-kalan {
top: 82px;
left: 16px;
}
.no-kalanx {
-webkit-transform: rotate(43deg);
-moz-transform: rotate(43deg);
-o-transform: rotate(43deg);
writing-mode: lr-tb;
height: 150px;
left: -32px;
position: absolute;
top: 160px;
width: 150px;
color:#fff;
}
#column-right .no-kalanx {
top: 26px;
}
.product-list .no-kalanx {
top: 155px;
left: -36px;
}
.no-yeni {
background: url("../image/yeni.png") no-repeat scroll 0% 0% transparent;
height: 150px;
left: 121px;
position: absolute;
top: 126px;
width: 150px;
}
#column-right .no-yeni {
top: 26px;
}
.product-list .no-yeni {
top: 22px;
left: 76px;
}
Son olarakta ekteki resimleri temanızın image klasörüne atınız.