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

AlexeySH

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

AlexeySH's Achievements

Newbie

Newbie (1/14)

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

Recent Badges

0

Reputation

  1. Сам спросил, сам ответил ). Может кому пригодится. Изменяем 3 файла: 1. /catalog/model/account/order.php В функции public function getOrderProducts($order_id) изменяем запрос: $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'"); на $query = $this->db->query("SELECT op.*,p.image FROM " . DB_PREFIX . "order_product op LEFT JOIN " . DB_PREFIX . "product p ON op.product_id=p.product_id WHERE order_id = '" . (int)$order_id . "'"); 2. /catalog/controller/account/order.php После public function info() { добавляем: $this->load->model('tool/image'); Перед $this->data['products'][] = array( добавляем: if ($product['image']) { $image = $product['image']; } else { $image = 'no_image.jpg'; } После $this->data['products'][] = array( добавляем: 'thumb' => $this->model_tool_image->resize($image, $this->config->get('config_image_cart_width'), $this->config->get('config_image_cart_height')), 3. /catalog/view/theme/default/template/account/order_info.tpl Вставляем в нужном месте: <img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" />
  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.