Anasayfa / Opencart / opencart fiyat gizlenmiş ise sepete ekle kaldırma

opencart fiyat gizlenmiş ise sepete ekle kaldırma

opencart ayarlarından fiyatlar sadece üyelere görünsün olarak seçtiğinizde giriş işlemini gerçekleştiren kişiler fiyatları görebiliyor sepete ekle buttonunu da kaldırmak istiyorsak

catalog/view/theme/default/template/product/ içerisinde ki category.tpl dosyasını düzenleyip

   <div class="button-group">
                <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
                <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>
                <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
              </div>

olan kodu

	  <?php if ($product['price']) { ?>
              <div class="button-group">
                <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $button_cart; ?></span></button>
                <button type="button" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart"></i></button>
                <button type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
              </div>
			  <?php } ?>

şeklinde koşul olarak <?php if ($product[‘price’]) { ?> eklememiz yeterli olacaktır burada ki koşul category.php dosyasında ki

if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {

koşulunun değili olan $price = false; bildiriminden geliyor.

Hakkında ibrahim

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir