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

wasia

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

1,623 profile views

wasia's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. да, только вот не получается сделать все до конца. кнопка не нажимается но и никакое инфо тоже не появляется
  2. Добрый день Столкнулся с проблемой. Нужно запретить пользователю добавить в корзину больше чем товара есть в наличии. Пробовал сделать это через модификацию файла /catalog/view/javascript/common.js в функцию addToCart но ничего не получилось. Вот мой код: <script type="text/javascript"> $('#button-cart').bind('click', function() { q = document.getElementById('quantity').value; m = document.getElementById('stockss').value; if(q<=m){ $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['option']) { for (i in json['error']['option']) { $('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>'); } } } if (json['success']) { $('#notification').append('<div class="success-new" style="display: none;">' + json['success'] + '</div>'); $('.success-new').fadeIn('slow').delay(4000).slideUp(2000, function() {$(this).remove();}); $('#cart-total').html(json['total']); $('.product-info .cart .wishlist-box').fadeOut('fast',function () { } } }); }else{ $('#notification').append('<div class="success-new" style="display: none;">Заказано больше чем есть в наличии!</div>'); $('.success-new').fadeIn('slow').delay(4000).slideUp(2000, function() {$(this).remove();}); } }); </script> Прошу помощи. ocStore: 1.5.3.1
×
×
  • 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.