my orders image

  • Posts: 25
  • Thank you received: 1
8 years 8 months ago #207033

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.37

Hi,
How I can show the thumbnails of the ordered products in hikashop- my orders page?
Thank you.

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

  • Posts: 25
  • Thank you received: 1
8 years 8 months ago #207098

Actually, I need to have a product listing for the purchased products. Is it posibsle to filter products according to their order_status in product listing ? Or how to reach product data of purchased products from database?
Thank you.

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

  • Posts: 81361
  • Thank you received: 13036
  • MODERATOR
8 years 8 months ago #207101

Hi,

You will have to edit the view "order / show" via the menu Display>Views and add some PHP code to display the products image on the order details page.
The code to display the image is:

<?php
	$height = (int)$this->config->get('thumbnail_y');
	$width = (int)$this->config->get('thumbnail_x');
	if(empty($height)) $height = (int)$this->config->get('product_image_y');
	if(empty($width)) $width = (int)$this->config->get('product_image_x');
	$image_options = array('default' => true,'forcesize'=>$this->config->get('image_force_size',true),'scale'=>$this->config->get('image_scale_mode','inside'));
	$imageHelper = hikashop_get('helper.image');
	$img = $imageHelper->getThumbnail(@reset($product->images->file_path), array('width' => $width, 'height' => $height), $image_options);
	if(@$img->success) {
		echo '<img src="'.$img->url.'" alt="'.$img->filename.'"/>';
	}
?>

It's not possible to filter on the order status on products listings with the options available since products don't have order statuses. Orders have an order status but the products listings are not linked to that.
If you want do that, it would require the development of a small HikaShop plugin to handle it with the onBeforeProductListingLoad trigger:
www.hikashop.com/support/documentation/6...reProductListingLoad

The following user(s) said Thank You: nabukadnezar

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

Time to create page: 0.057 seconds
Powered by Kunena Forum