Ayrıca aşağıda anlatacağım işlemleri vqmod kullanan arkadaşlar uğraşmasın diye .xml de hazırladım ekte bulabilirsiniz gerekli .xml'i.
Ürün Sayfasındaki Fiyatın KDV'siz Görünümü
Şimdi gelelim asıl meseleye.
Çoğu OpenCart kullanıcısı bunu nasıl yapacağını merak etmektedir. Ürün sayfasında ürünün KDV dahil fiyatı üstte ve kalın gözükmektedir. KDV'siz fiyatı ise altta ve soluk küçük bir şekilde yazmaktadır. Sizler ve kendim için bunun çözümünü buldum.
Yukardaki resimde de gördüğünüz gibi sitenizde önceden soldaki gibi gözüken fiyat işlem sonrasında sağdaki gibi gözükecek.
Öncelikle gerekli düzenlemeyi dil dosyasında yapalım;
"catalog/language/turkish/product/product.php" dosyasını açın ve 'KDV Hariç:' yazan kısmı 'KDV Dahil:' yapın.
Sonrasında;
"\catalog\view\theme\default\template\product\product.tpl" dosyasının bir yedeğini alın ve açın.
Code: Select all
<div class="price"><?php echo $text_price; ?>
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
<?php } ?>
<br />
<?php if ($tax) { ?>
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
<?php } ?>
<?php if ($points) { ?>
Code: Select all
<div class="price">
<?php if ($tax) { ?>
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
<?php } ?>
<?php echo $text_price; ?>
<?php if (!$special) { ?>
<?php echo $price; ?>
<?php } else { ?>
<span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
<?php } ?>
<br />
<?php if ($points) { ?>
Sizin için Seçtiklerimiz Modülü KDV'siz Fiyat Görünüm Kodu
"catalog/controller/module/featured.php"
Bulun ve açın,
Code: Select all
$price = $this->currency->format($this->tax->calculate($product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax')));
Code: Select all
$price = $this->currency->format($this->tax->calculate($product_info['price'], $this->config->get('config_tax')));
"catalog/controller/module/bestseller.php"
Bulun ve açın,
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $this->config->get('config_tax')));
"catalog/controller/module/latest.php"
Bulun ve açın,
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $this->config->get('config_tax')));
"catalog/controller/product/category.php"
Bulun ve açın,
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
Code: Select all
$price = $this->currency->format($this->tax->calculate($result['price'], $this->config->get('config_tax')));
Code: Select all
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
Code: Select all
$special = $this->currency->format($this->tax->calculate($result['special'], $this->config->get('config_tax')));