Product Thumb in Wishlist and Product Orders in Backend

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
6 years 5 months ago #281493

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.0

1) I made the product thumb in the wish list of the customer account bigger using CSS but the image is blurry. I cannot find how to make those larger without them being blurry. It's showing the size as 50x50 via firebug, but in the backend the thumnails are 200x200. I removed the entire folder here: /images/com_hikashop/upload/thumbnails/ hoping it would recreate the thumnails at the correct size but no luck. What am I missing please? Please see attached images showing the backend set-up and the folders via FTP.

2) In the backend, where the orders are listed, I tried to add a thumb of the product image but it's not showing so I'm not sure what I'm doing wrong. I reversed the changes but I used the instructions below. Is that instruction for an older version of Hikashop or should it work with my version? If it should work I will try it again but I just wanted to confirm before.

www.hikashop.com/forum/reports-statistic...my-orders-image.html

Thanks!

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #281494

Hello,

The image size is directly in the view and not based on settings ; you need to perform an override to change the dimension for the call of the function getThumbnail.
www.hikashop.com/support/documentation/1...-display.html#layout

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
6 years 5 months ago #281572

I took care of #1 - thank you. However, I cannot figure out what the answer to #2 is or if that question was not answered.

The orders section that would need editing for the image to show is view: order > show_products.php but I don't see that in displays > views. And will that code, via the link that I provided, work with the version of Hikashop that I have?

Sorry but I thought the product image would automatically be a default in the shop.

Thanks!

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #281575

Hello,

I first thought that the Nicolas' code was right but I realized a little typo.
It's not :

$img = $imageHelper->getThumbnail(@reset($product->images->file_path), array('width' => $width, 'height' => $height), $image_options);
But
$pimg = @reset($product->images);
$img = $imageHelper->getThumbnail(@$pimg->file_path, array('width' => $width, 'height' => $height), $image_options);
Afterwards, I suppose that product images will be available in the context you're using the code.
But if it's not the case, it will be require to load the images for the product (using a SQL query).

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
6 years 5 months ago #281797

I tried what you suggested but still no luck. I also tried the links below but no luck so I'm wondering if it's because the order is created already why it's not working and if it will only show when a new order is made?

www.hikashop.com/forum/reports-statistic...o-order-history.html
www.hikashop.com/forum/reports-statistic...my-orders-image.html

It would have been really really nice if product thumbs were a default in the product orders both the backend and customer account.

Thanks!

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #281798

Hello,

Without more details about what is not working (error, warning, message, etc) I'm afraid it will be difficult to give you any hint.
About your feature request ; please read the Nicolas message in the other thread you have mentioned.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
5 years 2 months ago #303909

I would like to try this again as it's important. Although there are a few postings about it, Hikashop has been updated a lot so I don't want to use the wrong code, etc... Can you please tell me/provide the following:

1) What file should I edit
2) What code should I add
3) Where should I add the code

I would really like to get this working. A picture is worth a thousand words and it helps to eliminates mistakes. Please see example attached.

Thanks!

Attachments:

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
5 years 2 months ago #303930

Hello,

I will anwser you step by step :
" 1) What file should I edit "
In Main HikaShop Configuration, in Advanced tab and in Advanced settings, you will find the "Display view files option", switch it to All


Result :


With this it's easy to get which view you have to edit.

" 2) What code should I add "
The last code sent by Jerome will be fine,

" 3) Where should I add the code "
The point is to replace, the code that process and display after the :
<div id="hikashop_small_image_div<?php echo $variant_name;?>" class="hikashop_small_image_div"> around line 13

Hope this will help you
Regards

Last edit: 5 years 2 months ago by Philip.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
5 years 2 months ago #304031

Hi Philip,

It's showing that the file to edit is Order > Show_Products. I don't seem to have that view in Display > Views. Please see attached.

Thanks!

Attachments:
Last edit: 5 years 2 months ago by MyWorld.

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
5 years 2 months ago #304036

Hello,

That's normal, you have restricted the search with your front end template, here for your need you have restrict your search with your back end template (by default Isis), note that you can restrict your search for the back end only as well.

hope this will help you.
Regards

Last edit: 5 years 2 months ago by Philip.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
5 years 4 weeks ago #305049

I found the Order > Show_Products view, but that code that I need to replace is not in the file at all.

<div id="hikashop_small_image_div<?php echo $variant_name;?>" class="hikashop_small_image_div"> around line 13

Thanks!

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
5 years 4 weeks ago #305067

Hello,

You'right, my bad... You haven't to replace but to add your code in order to manage thumb image.
Because in the backend order view their isn't image managing, so you have to add the code to manage it, but you can take inspiration from what you see on the product page (product/show_block_img.php).

Regards

Last edit: 5 years 4 weeks ago by Philip.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
4 years 9 months ago #308413

What do I take from here: product > show_block_img.php to put in: Order > Show_Products?

I tried doing it and blew up the page :(

I really wish this was a default of the shop as it is an ecommerce component. Images should be included in every part of it whenever possible - it would be better to want to remove them rather than struggling to add them.

Thanks!

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

  • Posts: 4509
  • Thank you received: 611
  • MODERATOR
4 years 9 months ago #308420

Hello,

First, you have to know that an e-commerce component have to manage lots of different parameters and data, and we have to keep in mind to have a solution that must be suitable for most peoples needs.
we are close to have almost as many different needs as e-commerce.
That's why in this kind of specific demands, as you're the first, you can ask for a custom from our partner

Regards

Last edit: 4 years 9 months ago by Philip.

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
4 years 9 months ago #308448

What I'm suggesting is something that every ecommerce site needs - and from my experience what every ecommerce have - it's not anything out of the ordinary. I'm sure majority of users would agree that this is good to have.

That's why in this kind of specific demands, as you're the first, you can ask for a custom from our partner

So in other words you are saying... I can't help you find someone else - Loool

Thanks anyways.

Last edit: 4 years 9 months ago by MyWorld.

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
4 years 9 months ago #308464

Hi,

Your questions were about adding these to the current HikaShop you already have on your website. That's only possible with complex development. That's why we recommended to have someone work on that for you.

Now if you actually wanted to request that addition to HikaShop in a future version, note that we have a feature request section on our forum for that:
www.hikashop.com/forum/2-general-talk-about-hikashop.html
I agree that it's could be a good improvement to add that. It's added to the todo list on our end. Thanks for your feedback.

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

  • Posts: 1119
  • Thank you received: 114
4 years 9 months ago #308467

Hi,

@MyWorld

For the back-end product images modify order / show_products.php and after line 103:

$manage = hikashop_isAllowed($this->config->get('acl_product_manage','all'));

add this:
$imageHelper = hikashop_get('helper.image');
    $width = (int)$this->config->get('cart_thumbnail_x', 68);
	$height = (int)$this->config->get('cart_thumbnail_y', 100);
	$image_options = array(
		'default' => true,
		'forcesize' => $this->config->get('image_force_size', true),
		'scale' => $this->config->get('image_scale_mode','inside')
	);

and after line 117, after:
<tr>

add this:
<td class="hikashop_order_item_image">
            <?php
	$image_path = (!empty($product->images) ? @$product->images[0]->file_path : '');
	$img = $imageHelper->getThumbnail($image_path, array('width' => $width, 'height' => $height), $image_options);
	if($img->success) {
	  echo '<img class="img-responsive" title="'.$this->escape(@$product->images[0]->file_description).'" alt="'.$this->escape(@$product->images[0]->file_name).'" src="'.$img->url.'"/>';
  }?>
          </td>

Now to show thumbs in front-end user order modify order / show.php and after line 165:
$group = $this->config->get('group_options',0);

add again:
$imageHelper = hikashop_get('helper.image');
    $width = (int)$this->config->get('cart_thumbnail_x', 68);
	$height = (int)$this->config->get('cart_thumbnail_y', 100);
	$image_options = array(
		'default' => true,
		'forcesize' => $this->config->get('image_force_size', true),
		'scale' => $this->config->get('image_scale_mode','inside')
	);

and after line 173:
<tr class="row<?php echo $k;?>">

add this second part of the code:
<td class="hikashop_order_item_image">
            <?php
	$image_path = (!empty($product->images) ? @$product->images[0]->file_path : '');
	$img = $imageHelper->getThumbnail($image_path, array('width' => $width, 'height' => $height), $image_options);
	if($img->success) {
	  echo '<img class="img-responsive" title="'.$this->escape(@$product->images[0]->file_description).'" alt="'.$this->escape(@$product->images[0]->file_name).'" src="'.$img->url.'"/>';
  }?>
          </td>

If you did it right, you should have new column in your table with image thumbs.

If you want to modify thumbs hight or width, just change this numbers bellow:
$width = (int)$this->config->get('cart_thumbnail_x', 68);
	$height = (int)$this->config->get('cart_thumbnail_y', 100);

I hope you success.

Thank you

The following user(s) said Thank You: nicolas

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

  • Posts: 1119
  • Thank you received: 114
4 years 9 months ago #308469

And one more which i forgot:

in order / show_products.php you need to change this line (around 60):

<th class="hikashop_order_item_name_title title"><?php echo JText::_('PRODUCT'); ?></th>

with this:
<th class="hikashop_order_item_image_title title"><?php echo JText::_('PRODUCT'); ?></th>
			<th class="hikashop_order_item_name_title title"></th>

and in order / show.php do same thing on around line 99.

This will make table columns look corectly.

Thanks

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

  • Posts: 962
  • Thank you received: 11
  • Hikashop Business
4 years 9 months ago #308785

So strange sometimes I get the forum emails in my mailbox sometimes I don't. Just realized that there were replies to this.

Thank you. Really appreciate it kyratn. Will try it out and see how it goes.

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

  • Posts: 1119
  • Thank you received: 114
4 years 9 months ago #308787

Hi,

This has been added with new Hikashop 4.2.0 version. So you just need to update and nothing more :)

Thanks

The following user(s) said Thank You: Mohamed Thelji

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

Time to create page: 0.128 seconds
Powered by Kunena Forum