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

eeeMan

Users
  
  • Posts

    216
  • Joined

  • Last visited

Everything posted by eeeMan

  1. есть вопрос! Аякс подгрузка решает проблему пагинации описанную в этой теме?
  2. common.js $(document).ready(function() { /* Search */ $('.button-search').bind('click', function() { url = $('base').attr('href') + 'index.php?route=product/search'; var search = $('input[name=\'search\']').val(); if (search) { url += '&search=' + encodeURIComponent(search); } location = url; }); $('#header input[name=\'search\']').bind('keydown', function(e) { if (e.keyCode == 13) { url = $('base').attr('href') + 'index.php?route=product/search'; var search = $('input[name=\'search\']').val(); if (search) { url += '&search=' + encodeURIComponent(search); } location = url; } }); /* Ajax Cart Cosmio*/ $('#cart').on('click', '.heading a', function(){ getPopup(); }) // Warning reset for new warning $('.warning').ready(function() { $('.warning').hide(); var content = $('.warning').text(); if (content != '' ) { $.colorbox({ onOpen: CbRemove(), transition: 'elastic', opacity: 0.5, close: '<i class="fa fa-times"></i>', width: '500px', //title: '', html: content, onComplete: function () { $.colorbox.resize(); } }); } }) $('.notification').ready(function() { $('.notification').hide(); var content = $('.notification').text(); if (content != '' ) { $.colorbox({ onOpen: CbRemove(), transition: 'elastic', opacity: 0.5, close: '<i class="fa fa-times"></i>', width: '500px', //title: '', html: content, onComplete: function () { $.colorbox.resize(); } }); } }) // IE6 & IE7 Fixes if ($.browser.msie) { if ($.browser.version <= 6) { $('#column-left + #column-right + #content, #column-left + #content').css('margin-left', '195px'); $('#column-right + #content').css('margin-right', '195px'); $('.box-category ul li a.active + ul').css('display', 'block'); } if ($.browser.version <= 7) { $('#menu > ul > li').bind('mouseover', function() { $(this).addClass('active'); }); $('#menu > ul > li').bind('mouseout', function() { $(this).removeClass('active'); }); } } }); function CbRemove() { $('#cbcontainer').remove(); } function productRemove(key) { if (getURLVar('route') == 'checkout/cart') { location = 'index.php?route=checkout/cart&remove=' + key; } else { $('#cart').load('index.php?route=module/cart&remove=' + key, function() { getPopup(); }); } }; function getPopup(title) { if (!title){ title = $('#header #cart #cart-total').html(); } var cartcontent = $('#header #cart .content').html(); $.colorbox({ transition: 'elastic', opacity: 0.5, close: '<i class="fa fa-times"></i>', htmlfalse: true, href:'index.php?route=module/cart div.content', title: title, scrolling: false, width: '600px', initialHeight: '200px', initialWidth: '200px', onComplete: function () {$.colorbox.resize();}, onOpen: CbRemove(), }); }; $(document).ready(function() { $('a.relcaption').hover(function() { $( this ).parent().parent().parent().parent().find('div img').attr('src', $( this ).attr('rel')); }); }); function getURLVar(key) { var value = []; var query = String(document.location).split('?'); if (query[1]) { var part = query[1].split('&'); for (i = 0; i < part.length; i++) { var data = part[i].split('='); if (data[0] && data[1]) { value[data[0]] = data[1]; } } if (value[key]) { return value[key]; } else { return ''; } } } function addToCart(product_id, quantity) { quantity = typeof(quantity) != 'undefined' ? quantity : 1; $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: 'product_id=' + product_id + '&quantity=' + quantity, dataType: 'json', success: function(json) { $('.success, .warning, .attention, .information, .error').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#cart-total').html(json['total']); getPopup(json['success']); } } }); } function addToWishList(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.success, .warning, .attention, .information').remove(); if (json['success']) { $('#wishlist-total').html(json['total']); $.colorbox({ onOpen: CbRemove(), transition: 'elastic', opacity: 0.5, close: '<i class="fa fa-times"></i>', width: '500px', html: json['success'], onComplete: function () { $.colorbox.resize(); } }); } } }); } function addToCompare(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', success: function(json) { $('.success, .warning, .attention, .information').remove(); if (json['success']) { $.colorbox({ onOpen: CbRemove(), transition: 'elastic', opacity: 0.5, close: '<i class="fa fa-times"></i>', width: '500px', //title: '', html: json['success'], onComplete: function () { $.colorbox.resize(); } }); $('#compare-total').html(json['total']); } } }); } /* // make some FAT! // % for product grid $( document ).ready(function() { iwantpercent(); $( '.cart input.button' ).each(function( index ) { $( this ).replaceWith('<button type="button" onclick="'+ $( this ).attr("onclick") +'"><i class="fa fa-shopping-cart"></i>'+ $( this ).attr("value") +'</button>'); }); $( '.wishlist a' ).each(function( index ) { $( this ).replaceWith('<button type="button" onclick="'+ $( this ).attr("onclick") +'"><i class="fa fa-heart"></i><span class="baloon">'+ $( this ).text() +'</span></button>'); }); $( '.compare a' ).each(function( index ) { $( this ).replaceWith('<button type="button" onclick="'+ $( this ).attr("onclick") +'"><i class="fa fa-exchange"></i><span class="baloon">'+ $( this ).text() +'</span></button>'); }); $( '.cart' ).each(function( index ) { var wishlist = $( this ).parent().find('.wishlist'); var compare = $( this ).parent().find('.compare'); $( this ).after(compare); $( this ).after(wishlist); }); }); function iwantpercent(product_id) { $( ".price-old" ).each(function() { var pricenew = parseInt($( this ).next('.price-new').text().replace(/[^0-9]+/g,'')); var priceold = parseInt($( this ).text().replace(/[^0-9]+/g,''));; pricenew; +priceold; percent = Math.round((priceold - pricenew)/priceold*100); $( this ).parent().parent().find('.image').before('<div class="percent">- '+ percent +'%</div>'); }); } */ cart.tpl <div id="cart"> <div class="heading"> <a title="<?php echo $heading_title; ?>"><span id="cart-total"><?php echo $text_items; ?></span></a></div> <div class="content"> <?php if ($products || $vouchers) { ?> <div class="mini-cart-info"> <table> <?php foreach ($products as $product) { ?> <tr> <td class="image"><?php if ($product['thumb']) { ?> <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a> <?php } ?></td> <td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a> <div> <?php foreach ($product['option'] as $option) { ?> - <small><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br /> <?php } ?> </div></td> <td class="quantity">x <?php echo $product['quantity']; ?></td> <td class="total"><?php echo $product['total']; ?></td> <td class="remove"><img src="catalog/view/theme/default/image/remove-small.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" onclick="(getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') ? location = 'index.php?route=checkout/cart&remove=<?php echo $product['key']; ?>' : $('#cart').load('index.php?route=module/cart&remove=<?php echo $product['key']; ?>', function() { getPopup(); });" /></td> </tr> <?php } ?> <?php foreach ($vouchers as $voucher) { ?> <tr> <td class="image"></td> <td class="name"><?php echo $voucher['description']; ?></td> <td class="quantity">x 1</td> <td class="total"><?php echo $voucher['amount']; ?></td> <td class="remove"><img src="catalog/view/theme/default/image/remove-small.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" onclick="(getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') ? location = 'index.php?route=checkout/cart&remove=<?php echo $voucher['key']; ?>' : $('#cart').load('index.php?route=module/cart&remove=<?php echo $voucher['key']; ?>', function() { getPopup(); });" /></td> </tr> <?php } ?> </table> </div> <div class="mini-cart-total"> <table> <?php foreach ($totals as $total) { ?> <tr> <td class="right"><b><?php echo $total['title']; ?>:</b></td> <td class="right"><?php echo $total['text']; ?></td> </tr> <?php } ?> </table> </div> <div class="checkout"><a href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a> | <a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div> <?php } else { ?> <div class="empty"><?php echo $text_empty; ?></div> <?php } ?> </div> </div>
  3. использую дефолтный шаблон, доп модулей не ставил, не работает почему то remove, когда во всплывающей корзине жму удалить товар, то в этом окне ничего не происходит, в корзине тоже не удаляется, в консоле следующая инфа - index.php?route=module/cart&remove=undefined
  4. addtocart вот так $.colorbox({width: '500px', transition: 'elastic', html:'тут html с текстом о добавлении'}); но это не годится, т.к. html то не подойдет для подгрузки cart.tpl
  5. кусок кода который отвечает именно за вывод корзины в колорбоксе, {load или html}, я точно не понял еще как сделать
  6. а можно более развернуто пожалуйста? =) да, ништячок, как реализовали?
  7. Подскажите как можно организовать вывод мини корзины через колорбокс? есть скрипт common.js в котором есть код отвечающий за вывод мини корзины /* Ajax Cart */ $('#cart > .heading a').live('click', function() { $('#cart').addClass('active'); $('#cart').load('index.php?route=module/cart #cart > *'); $('#cart').live('mouseleave', function() { $(this).removeClass('active'); }); }); как отредактировать, что бы корзина открылась в модальном окне?
  8. как сделать такое окно только при нажатии на корзину?
  9. автор будь добр, скажи как можно сделать саму миникорзину в этом окне колорбокса? /* Ajax Cart */ $('#cart > .heading a').live('click', function() { $('#cart').addClass('active'); $('#cart').load('index.php?route=module/cart #cart > *'); $('#cart').live('mouseleave', function() { $(this).removeClass('active'); }); }); что тут нужно изменить?
  10. как Вы сделали ресайз изображений по размеру самого изображения, а не по заданному из админки?
  11. так это не Вам адресовано было, а держателю магаза, ну или тому кто настраивал все функции) ие 6 ставился на более ранних версиях винды, которыми пользуются единицы, если вообще пользуются, а вот ие8 стоит на ХР и w7 и люди которым не хочется заморачиваться ставить какие-либо другие браузеры, или люди которые хотят сделать заказ например с рабочего места (а на работе могут быть и не установлены другие браузеры и нет прав админа что бы это сделать) увидят этот корявый ужас. Так, что если Вы хотите привлечь покупателей своего шаблона, лучше не включать неуместный сарказм, а просто принять конструктивную беспристрастную критику и внести фикс под ие8 ;)
  12. Просмотрел все страницы темы и просто удивился, все на столько увлеклись просмотром этого шаблона на телефоне, что не заметили как он отображается в ие8 :-D , а ведь именно он установлен по умолчанию в ХР и даже в ранних сборках w7, ай яй яй, если автор и кроссбраузерность запилит, то купил бы...
  13. мда, в вордпрессе модальное окно на много умнее, оно формируется на основании оригинального размера картинки, а тут только фиксированно можно задать
  14. Приветствую всех. Вопрос в том как сделать авто "Размер всплывающего изображения товара" или указать размер модального окна в % от размера экрана
  15. Вопрос решен! <?php foreach ($totals as $total) { ?> <?php if(($total['title'] == 'Sub-Total') || ($total['title'] == 'Сумма')) { ?> <tr> <td align="right"><b><?php echo $total['title']; ?>:</b></td> <td align="right"><?php echo $total['text']; ?></td> </tr> <?php } ?> <?php } ?>
×
×
  • 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.