Post by Smolenkov_BN » Sat Aug 13, 2016 5:09 pm

Free announcements, articles, blogs, news and more in Opencart 2.3.x

1. Remove the Zero Price

In files *.tpl:

- to change a code

Code: Select all

  <?php if ($price) { ?>
on a code

Code: Select all

  <?php if ($price > 0) { ?>
- to change a code

Code: Select all

  <?php if ($product['price']) { ?>
on a code

Code: Select all

  <?php if ($product['price'] > 0) { ?>
2. Remove the Zero Price Buttons ("button_cart", "button_wishlist", "button_compare")

In files *.tpl:

- to change a code

Code: Select all

  <div class="btn-group">
    <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i></button>
    <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i></button>
  </div>
on a code

Code: Select all

  <div class="btn-group">
    <?php if ($price > 0) { ?>
    <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product_id; ?>');"><i class="fa fa-heart"></i></button>
    <button type="button" data-toggle="tooltip" class="btn btn-default" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product_id; ?>');"><i class="fa fa-exchange"></i></button>
    <?php } ?>
    </div>
- to change a code

Code: Select all

<div class="button-group">
  <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><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>
on a code

Code: Select all

<div class="button-group">
  <?php if ($product['price'] > 0) { ?>
  <button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>');"><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>
  <?php } ?>
</div>
- to change a code

Code: Select all

<div class="form-group">
  <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label>
  <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="form-control" />
  <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
  <br />
  <button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button>
</div>
on a code

Code: Select all

<div class="form-group">
  <?php if ($price > 0) { ?>
  <label class="control-label" for="input-quantity"><?php echo $entry_qty; ?></label>
  <input type="text" name="quantity" value="<?php echo $minimum; ?>" size="2" id="input-quantity" class="form-control" />
  <input type="hidden" name="product_id" value="<?php echo $product_id; ?>" />
  <br />
  <button type="button" id="button-cart" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary btn-lg btn-block"><?php echo $button_cart; ?></button>
  <?php } ?>
</div>

E-=(Competent experience responsibility is a rapid quality guarantee)=-


User avatar
Newbie

Posts

Joined
Sat Aug 13, 2016 4:46 pm
Location - Dnipro, Ukraine
Who is online

Users browsing this forum: No registered users and 10 guests