Adding Images to Order History?

  • Posts: 140
  • Thank you received: 18
6 years 7 months ago #277631

Hi Just me again,

A very useful but seemingly missing feature is having the product images on the Order History page. This would be the page that basically looks like a receipt and provides the item level detail of a particular order. For some reason, the thumbnail of the product is not included in this view.

I would like to add the thumbnail image for each item in the order history so the customer can easily see what he ordered rather than having to rely on the product names. Granted having all the current detail that displays is a must but I would like to add the image to the far left of the product details.

What pretty much has me baffled is that the images are available in the order details that is emailed to the customer but when you go online to view the order details, the image is not available.

Sadly, I do not see any requests for this in the forums, and perhaps its the way I am searching but I would think that this would be a widely requested feature.

If someone could point me in the proper direction for getting this done, I would greatly appreciate it.

Cheers.


(HikaShop Business 3.2.0 [1709061916])

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 75
6 years 7 months ago #277694

Hi,

you can customize everything in Hikashop to your needs, I would first recommend reading the documentation: www.hikashop.com/support/documentation/1...-display.html#layout

In this case you want to modify the file "show" of the view "order" of your template by going to Display > Views.
To get the product image thumbnail you can add something like:

<?php
$imageHelper = hikashop_get('helper.image');
if(!empty($product->images[0]->file_path) && $this->config->get('thumbnail', 1) != 0) {
	$img = $imageHelper->getThumbnail($product->images[0]->file_path, array(50, 50), array('forcesize' => true, 'scale' => 'outside'));
	if($img->success) {
		echo '<img src="'.$img->url.'" alt="" style="float:left;margin-top:3px;margin-bottom:3px;margin-right:6px;"/>';
	}
}
?>

Add this for example right before the line
<?php echo $product->order_product_name;?>
or wherever you prefer. Hope that helps.

The following user(s) said Thank You: dvddvd, Dardwizzle

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 7 months ago #277653

Hi,

I would also recommend reading this thread which talks about that:
www.hikashop.com/forum/reports-statistic...my-orders-image.html

It's indeed not much requested.
We'll see if we add that or not in the future.

Last edit: 6 years 7 months ago by Jerome.
The following user(s) said Thank You: Dardwizzle

Please Log in or Create an account to join the conversation.

  • Posts: 140
  • Thank you received: 18
6 years 7 months ago #277722

I will give it a shot and see how I make out :) Im by no means a code monkey, but I do what I can! I will see where this takes me! Thank you so much!


(HikaShop Business 3.2.0 [1709061916])

Please Log in or Create an account to join the conversation.

  • Posts: 140
  • Thank you received: 18
6 years 7 months ago #277725

Well this was certainly a step in the right direction, and it does kind of work :) I need to learn some more about what the code you provided does and how it does it. The only problem is that rather then have the images each be each on the row with their respective product listing, it lists all the images at the very top in their own row. So they are not actually associated with their own product. The code will somehow need to be iterated once per products, and to get the image associated with each individual product id, quite a daunting task if I may say so :)

I have attached an image of how this looks if anyone is interested. I will give it my all, but I make sure you leave the light on for me, because I have a feeling I will be back begging for someone to work with me on this one.

I know you guys have some people here that will work one on one with people lacking the skill set, and I think I might need to go that route with this issue. I don't know if they charge for their services, as I don't have a budget for this kind of thing which is why I am doing everything possible to learn this, but if this turns out to be a case where it will take considerable talent, please help me get in touch with someone. I will update you guys and let you know if I have a snowballs chance in heck on this one :)

But, I am not going to complain as this is a great start, now I have to take what you have given me and try to figure out how to get each image to associate with it's own product one thumbnail per row, per product.

Sadly that likely involves coding outside my scope but I will try anything a few times before I call in for reinforcements.

Thank you GW and Nicholas, this has me a few steps in the right direction.

Cheers!


(HikaShop Business 3.2.0 [1709061916])
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum