Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Вывод нет в наличии вместо кнопки купить


Recommended Posts

Помогите пожалуйста сделать кнопку нет в наличии не активной, сейчас она активна если на нее нажать , нужно из кода кнопки нет в наличии - убрать onclick

Ocstore 2.3.2 шаблон sellegance, делал все по модификации вручную, проблема только с категориями...

<div class="cart">
											<div class="btn-group">
<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" class='<?php
if ($product['quantity']>0) echo "btn btn-sm btn-cart'>$button_cart</button>";
else echo "btn btn-sm btn-cart disabled'>$button_not</button>";


											<button type="button" data-toggle="tooltip" class="btn btn-link btn-sm wishlist" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-heart-o"></i></button>
											<button type="button" data-toggle="tooltip" class="btn btn-link btn-sm compare" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>


Link to comment
Share on other sites

<div class="cart">
<div class="btn-group">
 <?php if (!$product['quantity'] == 0) { ?>
<button type="button" onclick="cart.add('<?php echo $product['product_id']; ?>', '<?php echo $product['minimum']; ?>');" class="btn btn-sm btn-cart"><?php echo $button_cart; ?></button>
<?php } else { ?>
<button type="button" class="btn btn-sm btn-cart disabled"><?php echo $button_not; ?></button>
<?php } ?>

Не смотрел шаблон, но конструкция должна быть такая, а у вас не пойми что.

Edited by magneto2010
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.