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

MaxOpenstudio

Newbie
  
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MaxOpenstudio's Achievements

Rookie

Rookie (2/14)

  • Dedicated Rare
  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

1

Reputation

  1. Решил свою задачу следующим образом Объявляем пару переменных {% set group_id = group_custome.customer_group_id %} {% set registersname = _context['registers'~group_id] %} 1й это у нас номер который мы подменяем у имени переменной второй это имя массив + наш номер на каждом цикле Потом получаем доступ к значениям массива {{ attribute(registersname, 'register_name'~group_id) }} С помощью метода attribute
  2. Добрый день, подскажите как поступить, необходимо динамически подменять цифру 1 на значение переменной Вот так запись работает, но у меня цикл и мне необходимо ставить значение цикла {{ registers1.register_name1 }} Как правильно написать? {{ registers~i.register_name~i }} Так не работает
  3. Добрый день. Нужна доработка Мы делаем интернет аукцион на основе opencart и модуля аукцион от webkul (это не маркет плейс для продажи разными пользователями) Просто, Владелец магазина будет осуществлять продажи методом аукциона, и нужно доработать функционал этого модуля http://old.maxopen.com.ua/freeshkiprod/ http://old.maxopen.com.ua/freeshkiprod2/ http://old.maxopen.com.ua/freeshkiprod3/ Посмотрите на дизайн карточки товара Вообщем нужно добавить что бы аукцион не стартовал пока не наберется минимально участников, и что бы стартовал через n-е время(что задаёт администратор для каждого товара индивидуально) после того как наберется минимальное количество участников + что бы можно было пользователям вступать и далее (Подмечу что вступление в аукцион стоит n-ой суммы внутренней валюты FR (Freeshka) Модуль кошелька у webkul встроен в модуль аукциона. По факту клиент имеет баланс на кошельке, Нажимает вступить, и у него с баланса списывается n-ая сумма в зависимости от лота, так же когда он делает ставку, сумма тоже списывается, но если он проигрывает аукцион то сумма возвращается ему обратно на баланс ( сумма ставки) ВЗНОС который он платил при вступлении не компенсируется. Ну и когда набирается минимальное количество участников, Всем вступившим приходит на почту письмо о том что скоро начинаем,где будет информация о стартовом лоте. Ну и нужно сделать что бы после завершения лота, он стартовал заново(перевыставлялся) Назовите сроки и цену за доработку, FTP Скину по запросу auction.maxopen.com.ua http://auction.maxopen.com.ua/telefony-smartfony/iphone
  4. ПРОВЕРКА И ДОБАВЛЕНИЕ КЛАССА Кнопкам сравнения и Избранное! Нормального ответа, так и не нашёл там. Ибо если делать по инструкции, То по истечению времени сайт повалит ошибками. Вот реализация на 2.3 если не нужно что бы избранные были доступны по регистрации Берет данные из сессии Впринципе на 2.1.0.1 всё так же js присваивает классы активным товарам и меняет функцию на remove Классы сможете увидеть в html После сможете стилизовать как захотите в модель wishlista public function getAllWishlist() { // by nix if ($data = $this->getWishlist()) { $out = array(); foreach ($data as $key => $value) { $out[] = $value['product_id']; } return $out; } else if (isset($this->session->data['wishlist'])) { return $this->session->data['wishlist']; } } В контроллёры $this->load->model('account/wishlist'); $data['AllWishlist'] = $this->model_account_wishlist->getAllWishlist(); if(isset( $this->session->data['compare'])){$data['AllCompare'] = $this->session->data['compare'];} в common.js Добавить функции удаления ( Заменить переменные var wishlist и var compare) var wishlist = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=account/wishlist/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', beforeSend: function() { $('#'+product_id).attr("class", "wish_active"); $('#'+product_id).attr("onclick","wishlist.remove('" + product_id + "')") }, success: function(json) { $('.alert').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { $('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>'); } $('#wishlist-total').html('<span class="wishlist"></span><span class="hidden-xs hidden-sm hidden-md">' + json['total'] + '</span>'); $('#wishlist-total').attr('title', json['total']); //$('html, body').animate({ scrollTop: 0 }, 'slow'); }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function(product_id) { $.ajax({ url: 'wishlist/?remove=' + product_id, type: 'post', data: 'product_id', dataType: 'json', beforeSend: function() { $('#'+product_id).removeAttr("class", "wish_active"); function addWish(){ $('#'+product_id).attr("onclick","wishlist.add('" + product_id + "')")} setTimeout(addWish,500); }, }); } }; var compare = { 'add': function(product_id) { $.ajax({ url: 'index.php?route=product/compare/add', type: 'post', data: 'product_id=' + product_id, dataType: 'json', beforeSend: function() { $('#'+product_id+'com').attr("class", "com_active"); $('#'+product_id+'com').attr("onclick","compare.remove('" + product_id + "')") }, success: function(json) { $('.alert').remove(); if (json['success']) { $('#content').parent().before('<div class="alert alert-success"><i class="fa fa-check-circle"></i> ' + json['success'] + ' <button type="button" class="close" data-dismiss="alert">&times;</button></div>'); $('#compare-total').html('<span class="compare"></span><span class="hidden-xs hidden-sm hidden-md">' + json['total'] + '</span>'); //$('html, body').animate({ scrollTop: 0 }, 'slow'); } }, error: function(xhr, ajaxOptions, thrownError) { alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }, 'remove': function(product_id) { $.ajax({ url: 'compare-products/?remove=' + product_id, type: 'post', data: 'product_id', dataType: 'json', beforeSend: function() { $('#'+product_id+'com').removeAttr("class", "com_active"); function addCom(){ $('#'+product_id+'com').attr("onclick","compare.add('" + product_id + "')")} setTimeout(addCom,500); }, }); } } В представление <div class="wrapper_sr"> <script type="text/javascript"> function ChangeColor(Element) { Element.setAttribute('style','background-image:catalog/view/theme/default/image/img/zakl-hover.png'); } </script> <button <?php if(isset($AllWishlist)) { ?> <?php if(in_array($product['product_id'], $AllWishlist)) { ?> class="wish_active" id="<?php echo $product['product_id']; ?>" onclick="wishlist.remove('<?php echo $product['product_id']; ?>');" <?php } ?> <?php } ?> type="button" id="<?php echo $product['product_id']; ?>" data-toggle="tooltip" title="<?php echo $button_wishlist; ?>" onclick="wishlist.add('<?php echo $product['product_id']; ?>'); ChangeColor(this);"><i class="fa fa-heart"></i></button> <script type="text/javascript"> function ChangeColor(Element) { Element.setAttribute('style','background-image:catalog/view/theme/default/image/img/zakl-hover.png'); } </script> <button <?php if(isset($AllCompare)) { ?> <?php if(in_array($product['product_id'], $AllCompare)) { ?> class="com_active" id="<?php echo $product['product_id']; ?>com" onclick="compare.remove('<?php echo $product['product_id']; ?>');" <?php } ?> <?php } ?> type="button" id="<?php echo $product['product_id']; ?>com" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>'); ChangeColor(this);"><i class="fa fa-exchange"></i></button> </div>
×
×
  • 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.