granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Поставил себе, всё отлично спасибо. Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 вот и ладушки)) Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Нашёл таки баг )при удалении позиции - она не удаляется, а просто скрывается... т.е. если дальше перейти к оформлению заказа - она останется...так сказать "вынудим всё таки купить товар" ))) Quote Link to post Share on other sites
Noxter Posted March 9, 2012 Report Share Posted March 9, 2012 А можно сделать какой-то эффект при удалении товара?Эффект затухания или затухание каким-то цветом... Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 granata005! проверь баг тут http://www.cmt-group.ru/catalog/mobilnye_telefonyесли подтвердится отпиши...----А можно сделать какой-то эффект при удалении товара?Эффект затухания или затухание каким-то цветом...----это не окончательный вариант. можно и даже нужно дополнять эффектами. я выложил один из вариантов как это можно реализовать. далее дело фонтазии ))) Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Пардон, я недостаточно точно описал баг...Удалённые товары "возвращаются" ПОСЛЕ того как я оформил заказ... когда он уже перешёл в стадию "Заказ принят"... Quote Link to post Share on other sites
Noxter Posted March 9, 2012 Report Share Posted March 9, 2012 Таки да, если убрать один товар и нажать кнопку оформить заказ то этот товар попадает в заказ. Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 ща проверим... Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 http://www.cmt-group.ru/catalog/mobilnye_telefonyпроверьте еще раз на баг... Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Теперь, вроде бы, всё ок.Вопрос по этому поводу... а как бы сделать так чтобы при удалении последней позиции в корзине (когда она становится пуста), пользователя перенаправляло на ту страницу, с которой он попал в корзину... Чтобы он не оформлял пустой заказ... Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 ща сделаем... Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 http://www.cmt-group.ru/catalog/pylesosyпроверь, так? Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Да крутотень же Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 Убераем баг с неудаленными товарами:Открываем CartView.phpстроку // Если нажали оформить заказ if(isset($_POST['checkout']))меняем на // Если нажали оформить заказ if(isset($_POST['checkout']) && $_SESSION['shopping_cart'])И // Добавляем товары к заказу foreach($this->request->post('amounts') as $variant_id=>$amount)меняем на foreach($_SESSION['shopping_cart'] as $variant_id=>$amount) Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 Для того что бы пользователь перенаправлялся на страницу с которой пришел, если он удалил все товары:открываем CartView.php и добавляем ////////////////////////////////////////// // Основная функция ////////////////////////////////////////// function fetch() { if($_SERVER['HTTP_REFERER']) $this->design->assign('last_page', $_SERVER['HTTP_REFERER']);В шаблоне cart.tplдополняем функцию jquery function remove_item_cart(remove_id) { var lastpage ={/literal}{if $last_page}'{$last_page}'{else}''{/if}{literal} $.ajax({ url: "ajax/cart_update.php", data: {'remove_id':remove_id}, success: function(data){ if(data){ if(data.total == 0){ if(lastpage){ location.href=lastpage; } else{ location.reload(); } } $('#cart_informer').html(data.informer); $('#total_products').html(data.total_products); $('#total_price').html(data.total_price); $('#item_cart_'+remove_id).hide(); } } }); } *** Если нет истории переходов страница будет просто перезагружена. Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Огромное человеческое спасибо, всё поставил... Quote Link to post Share on other sites
Kpoxa Posted March 9, 2012 Report Share Posted March 9, 2012 Классно, вот бы еще cart-informer доделать, чтобы при наведении на корзину показывалось ее содержимое, типа как тут http://demo.shopiy.com/superfly/ Quote Link to post Share on other sites
Wizard Posted March 9, 2012 Report Share Posted March 9, 2012 в этом нет ничего сложного!))) Quote Link to post Share on other sites
Kpoxa Posted March 9, 2012 Report Share Posted March 9, 2012 Кому как Quote Link to post Share on other sites
arsko Posted March 9, 2012 Report Share Posted March 9, 2012 Это ECShop, магазин неплохой. Quote Link to post Share on other sites
Kpoxa Posted March 9, 2012 Report Share Posted March 9, 2012 Угу, кстати тоже на Smarty Quote Link to post Share on other sites
arsko Posted March 9, 2012 Report Share Posted March 9, 2012 Знаю, делал на нем проект. Пожелание заказчика было. Quote Link to post Share on other sites
Noxter Posted March 9, 2012 Report Share Posted March 9, 2012 А можно ли получить архив с содержимым всего что тут переписали? Quote Link to post Share on other sites
granata005 Posted March 9, 2012 Report Share Posted March 9, 2012 Noxter, может не будем мучать Визарда этой рутиной...?)тут всего то пару исправлений, их несложно внести:http://forum.simplacms.ru/discussion/comment/9282#Comment_9282http://forum.simplacms.ru/discussion/comment/9315#Comment_9315http://forum.simplacms.ru/discussion/comment/9316#Comment_9316 Quote Link to post Share on other sites
Noxter Posted March 9, 2012 Report Share Posted March 9, 2012 Ну ок, спасибо граната.Соберу все в архив с инструкцией раз уж автор не хочет, при условии если он не против этого. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.