Jump to content

How to made some changes in Orders/Overview ?


Recommended Posts

I have some goods which have same names (books with same names, but different publishers). As a result it's difficult to assembly order without pictures of goods.

Could it be possible to add a small picture of each product in Order/Overview tab? For example, as in Product section? Also, it would be nice to convert a name of product from text to hyperlink on the product.

I tried to play with admin/skins/default/templates/orders.index.php (line 165 ish):

         <fieldset id="items">
               <legend>{$LANG.catalogue.title_items}</legend>
               {foreach from=$PRODUCTS item=product}
               <div id="item">

            <a href="{$product.image_path_large}" class="colorbox" title="{$product.name}" target="_blank"><img src="{$product.image_path_tiny}" style="max-width: 30px; max-height: 30px" alt="{$product.name}"></a>
                  {$product.quantity} x {$product.name} - {$product.product_code} ({$product.line_formatted}) {if $product.digital}{/if}

<span>{$product.price_total_formatted}</span>

...

But in real life $product.image_path_large and $product.image_path_tiny are empty... As I understand it is necessary to load their values from database, but I don't have any clue how and where to do it...

P.S. The current configuration is 6.1.5.

 

Link to comment
Share on other sites

I don't know how to make the data available to orders.index.php, but I did come up with a work around.

	       <!--MY PRODUCT LINKS --> 
               {foreach from=$PRODUCTS item=product}
	       <div id="item">
                  {$product.quantity} x {$product.name} - <a href="?_g=products&sort[updated]=DESC&action=edit&product_id={$product.product_id}#image" target="_blank">{$product.product_code}</a> ({$product.line_formatted}) {if $product.digital}{/if}<span>{$product.price_total_formatted}</span>
                  {if $product.accesskey}
                  <div class="download_info"><i class="fa fa-download"></i>{$STORE_URL}/index.php?_a=download&amp;accesskey={$product.accesskey}<br>
                  <a href="{$VAL_SELF}&reset_id={$product.id}"><i class="fa fa-recycle"></i>{$LANG.orders.reset_download_link}</a> <font class="{if $product.expired}link_expired{else}link_active{/if}">({$LANG.common.downloads}: {$product.downloads}/{$CONFIG.download_count} {$LANG.catalogue.title_coupon_expires}: {$product.expire})</font></div>
                  {/if}
		  <p align="left">Catalog Listing for <a href="{$STORE_URL}/admin_XXX.php?_g=products&q={$product.product_code}&_a=category" target="_blank">{$product.product_code}</a>
                  {if $product.options_text}
                  <br>{$product.options_text}
                  {/if}
                  {if $product.custom}
                  {foreach from=$product.custom key=k item=v}
                  <br><strong>{$k}</strong>: {$v}
                  {/foreach}
                  {/if}
               </div>
               {/foreach}
 	       <!--END MY LINKS-->

Hopefully someone will be able to help with adding the photo to the order summary page.

Link to comment
Share on other sites

40 minutes ago, Dirty Butter said:

I don't know how to make the data available to orders.index.php, but I did come up with a work around.


	       <!--MY PRODUCT LINKS --> 
               {foreach from=$PRODUCTS item=product}
	       <div id="item">
                  {$product.quantity} x {$product.name} - <a href="?_g=products&sort[updated]=DESC&action=edit&product_id={$product.product_id}#image" target="_blank">{$product.product_code}</a> ({$product.line_formatted}) {if $product.digital}{/if}<span>{$product.price_total_formatted}</span>
                  {if $product.accesskey}
                  <div class="download_info"><i class="fa fa-download"></i>{$STORE_URL}/index.php?_a=download&amp;accesskey={$product.accesskey}<br>
                  <a href="{$VAL_SELF}&reset_id={$product.id}"><i class="fa fa-recycle"></i>{$LANG.orders.reset_download_link}</a> <font class="{if $product.expired}link_expired{else}link_active{/if}">({$LANG.common.downloads}: {$product.downloads}/{$CONFIG.download_count} {$LANG.catalogue.title_coupon_expires}: {$product.expire})</font></div>
                  {/if}
		  <p align="left">Catalog Listing for <a href="{$STORE_URL}/admin_XXX.php?_g=products&q={$product.product_code}&_a=category" target="_blank">{$product.product_code}</a>
                  {if $product.options_text}
                  <br>{$product.options_text}
                  {/if}
                  {if $product.custom}
                  {foreach from=$product.custom key=k item=v}
                  <br><strong>{$k}</strong>: {$v}
                  {/foreach}
                  {/if}
               </div>
               {/foreach}
 	       <!--END MY LINKS-->

Hopefully someone will be able to help with adding the photo to the order summary page.

Great thank you! It's not the best solution, but is good enough!

Link to comment
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
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.

×
×
  • Create New...