Jump to content
Sign in to follow this  
alexfear1985

Отображение картинки в истории заказов

Recommended Posts

Как вывести изображение товара в истории заказа на OcStore 2,3?

Пробывал изменять не помогло. Картинки нет.

<!-- Контроллер -->
  	<file path="admin/controller/sale/order.php">        
	  <operation>
	      <search><![CDATA[$data['products'][] = array(]]></search>
	      <add position="before"><![CDATA[ 
	        $this->load->model('tool/image');
                $product_qimage = $this->db->query("SELECT image FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product['product_id'] . "'");
                $product_image = $product_qimage->row['image'];
	      ]]></add>
	  </operation> 
	  <operation>
	      <search><![CDATA['product_id'       => $product['product_id'],]]></search>
	      <add position="after"><![CDATA[ 
	        'thumb'     		=> $this->model_tool_image->resize($product_image, 100, 100),
	      ]]></add>
	  </operation> 
	</file>
	
	
    
    
    <!-- Шаблон -->
    
	<file path="admin/view/template/account/order_info.tpl">        
	  <operation>
	      <search><![CDATA[<td class="text-left"><?php echo $column_product; ?></td>]]></search>
	      <add position="before"><![CDATA[ 
	        <td class="text-center">Изображение</td>
	      ]]></add>
	  </operation>
	  <operation>
	      <search><![CDATA[<td class="text-left"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>]]></search>
	      <add position="before"><![CDATA[ 
	        <td class="text-center"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" style="padding: 1px; border: 1px solid #DDDDDD;" title="<?php echo $product['name']; ?>"  /></td>
	      ]]></add>
	  </operation> 
	</file>

 

Share this post


Link to post
Share on other sites
<!-- Шаблон -->

 

<file path="admin/view/template/account/order_info.tpl">

--------->

<file path="admin/view/template/sale/order_info.tpl"> 

Share this post


Link to post
Share on other sites

Спасибо уже вопрос решил. Сделал также мод и для почтовых уведомлений.

Share this post


Link to post
Share on other sites
В 21.03.2017 в 01:17, alexfear1985 сказал:

Спасибо уже вопрос решил. Сделал также мод и для почтовых уведомлений.

 

А где мод?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.