Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Alexiez

Новичок
  
  • Posts

    17
  • Joined

  • Last visited

Информация

  • Пол
    Мужлина

Alexiez's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

-1

Reputation

  1. allexp Пожалуйси распиши про cron по подробнее куда прописываются параметры
  2. SergejSo смотрите как выводится в товаре по аналогии сгделайте тут, им ничего сложного нету, сначала нужно посмотреть в могдель какие поля выбираются, потом если нужно, добавить чтобы выбиралась могдель и налилие, потом в контоллере проследить чтобы в массив заносились ваши поля, и соотвественно вывести их в шаблоне, усе, как-то ик :)
  3. галки в админке посивьте чтобы и в этих отображались товары, или нужно сгделать другой вид чтобы отображались как нужно
  4. вот public function add() { $this->language->load('checkout/cart'); $json = array(); if (isset($this->request->post['product_id'])) { $product_id = $this->request->post['product_id']; } else { $product_id = 0; } $this->load->model('catalog/product'); $product_info = $this->model_catalog_product->getProduct($product_id); if ($product_info) { if (isset($this->request->post['quantity'])) { $quantity = $this->request->post['quantity']; } else { $quantity = 1; } if (isset($this->request->post['option'])) { $option = array_filter($this->request->post['option']); } else { $option = array(); } $product_options = $this->model_catalog_product->getProductOptions($this->request->post['product_id']); //var_dump($product_options); foreach ($product_options as $product_option) { if ($product_option['required'] && empty($option[$product_option['product_option_id']])) { $json['error']['option'][$product_option['product_option_id']] = sprintf($this->language->get('error_required'), $product_option['name']); } } if (!$json) { $this->cart->add($this->request->post['product_id'], $quantity, $option); $json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart')); unset($this->session->data['shipping_method']); unset($this->session->data['shipping_methods']); unset($this->session->data['payment_method']); unset($this->session->data['payment_methods']); // Totals $this->load->model('setting/extension'); $total_data = array(); $total = 0; $taxes = $this->cart->getTaxes(); // Display prices if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) { $sort_order = array(); $results = $this->model_setting_extension->getExtensions('total'); foreach ($results as $key => $value) { $sort_order[$key] = $this->config->get($value['code'] . '_sort_order'); } array_multisort($sort_order, SORT_ASC, $results); foreach ($results as $result) { if ($this->config->get($result['code'] . '_status')) { $this->load->model('total/' . $result['code']); $this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes); } $sort_order = array(); foreach ($total_data as $key => $value) { $sort_order[$key] = $value['sort_order']; } array_multisort($sort_order, SORT_ASC, $total_data); } } $json['total'] = sprintf($this->language->get('text_items'), $this->currency->format($total),$this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0)); } else { $json['redirect'] = str_replace('&', '&', $this->url->link('product/product', 'product_id=' . $this->request->post['product_id'])); } } $this->response->setOutput(json_encode($json)); }
  5. Вот в чем гдело, при добавлении товара в корзину этона осиется нулевой, а счетлик товара рилииет нормально, не пойму в чем гдело и ггде глюк, вот код джаваскрипи $('#button-cart').bind('click', function() { $.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').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); }); я новичек еещё в opencard, и не совсем предсивляю куда уходит инфа, пжлси просвятите, тут я ик понял данные отдаются классу cart и методу add, если есть мануал по роутигну было бы круто, или на api ,чет не нашел
  6. Сам разобрался в обещём, не не тут правил, но все равно спасипотому что за помощь :)
  7. Полулил задание сгделать магазин на opencart я новичек в этом движке, плиз подскажите пжлси ггде выводится верхняя корзина, сам код я вигдел выводится в header.php , им вывод <?php echo $cart;?> а дальше что-то не могу найти, файла cart.tpl нету, opencart 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.