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

Denis2007

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

Denis2007's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. Добрый день, правлю файл product.tpl добавляю кнопку купить, все вроде работает нормально но у некоторых продуктов есть поля опции при выборе опции товар в таблицу не добавляется как можно исправить. Спасибо. Код кнопки: <a onclick="addToCart('<?php echo $product_id ?>');"> <span>Add to cart</span> <div class="clear"></div> </a> Код функции: function addToCart(product_id, quantity) { quantity = typeof(quantity) != 'undefined' ? quantity : 1; jQuery.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: 'product_id=' + product_id + '&quantity=' + quantity, dataType: 'json', success: function(json) { jQuery('.success, .warning, .attention, .information, .error').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { jQuery('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); jQuery('.success').fadeIn('slow'); jQuery('#cart-total').html(json['total']); jQuery('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); } Где необходимо докрутить.
  2. Добрый день, помогите разобраться необходимо документация, архитектура для возможности написания скриптов под себя, буду благодарен за помощь. Спасибо.
Guest
×
  • 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.