Skip to main content

my orders image

More
11 years 2 months ago #207033 by nabukadnezar
my orders image was created by nabukadnezar
-- 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.

More
11 years 2 months ago #207098 by nabukadnezar
Replied by nabukadnezar on topic my orders image
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.

More
11 years 2 months ago #207101 by nicolas
Replied by nicolas on topic my orders image
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:
Code:
<?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.151 seconds
Powered by Kunena Forum