Thumbnail in email order confirmation and cut off

  • Posts: 56
  • Thank you received: 0
10 years 2 months ago #193108

-- url of the page with the problem -- : www.ma-collective.com
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.4
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Firefox latest
-- Error-message(debug-mod must be tuned on) -- : Not applicable

Hi there,

Right from the beginning, even before I made a change* in the email, my product thumbnails are cut off at the bottom (see attachment).
Hopefully you know why. Second question when looking at the code beneath: is there a variable for knowing the product is virtual? Thanks in advance. Kind regards, Hans

* I changed the position of the download link.

<!--{START:PRODUCT_LINE}-->
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
{LINEVAR:PRODUCT_IMG}
{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->{LINEVAR:PRODUCT_DETAILS}{LINEVAR:PRODUCT_DOWNLOAD}
</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
</tr>
<!--{END:PRODUCT_LINE}-->

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #193126

Hi,

You issue seems to be some css, you can potentially add css rules in order to increase the height of the table lines.
To know if a product is a virtual one, you have to check its weight, if equal to 0, so virtual, else shippable.
The weight can be displayed thanks to {LINEVAR:product.product_weight}

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

  • Posts: 56
  • Thank you received: 0
10 years 2 months ago #193214

Merci Xavier,

Maybe it's because I did not do the right thing, but adding css didn't solve my problem. This is what I changed (I added line-height:28px):

<td style="border-bottom:1px solid #ddd;padding-bottom:3px;line-height:28px;">
{LINEVAR:PRODUCT_IMG}
{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->{LINEVAR:PRODUCT_DETAILS}{LINEVAR:PRODUCT_DOWNLOAD}
</td>

Please have a look at the attached file to see the result. Perhaps you can point out exactly where I have to modify.
Thanks in advance.

Kind regards, Hans

Attachments:

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 2 months ago #193550

Hi,

I'm sorry but a screenshot does not help to understand what is wrong.
If you want to understand, you need to analyse the email content (text, html, image, etc).
Screenshot is just a result but it does not explain how the content really is.

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: 56
  • Thank you received: 0
10 years 2 months ago #193562

Hi,

You are completely right. Of course you can't know how the original thumbnail looks like.
Please see attachment. The border line is missing.

Kind regards, Hans

Attachments:

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

  • Posts: 83832
  • Thank you received: 13572
  • MODERATOR
10 years 2 months ago #193575

Hi,

It's better but it's not enough. We need to look at the CSS/HTML of the email itself not only see the image and the issue in order to analyze the situation.
Could you forward the email to contact AT hikashop DOT com along with a link to this thread so that we can do that ?

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

  • Posts: 83832
  • Thank you received: 13572
  • MODERATOR
10 years 2 months ago #193628

Hi,

I've check the image, both the thumbnail and the original and the border issue comes from the thumbnail generation process, not the CSS or HTML of the email.
The issue with image scale down processes is that they don't handle well stripes. If you have stripes or 1 pixels like that:




on an image and that you resize it to be half as high, you'll either get only black, or only white and no stripes anymore.
That's the same process you're experiencing here.

The solution is either to have bigger thumbnails or to modify the original image to reduce the "stripe" effect by having a thicker border.

When you edit your emails via the menu System>Emails, you have a preload area where you'll find that line of code:
$img = $imageHelper->getThumbnail($item->images[0]->file_path, array(50, 50), array('forcesize' => true, 'scale' => 'outside'));

There, the 50,50 defines the size of the thumbnails in the email. If you increase them, you'll be able to have bigger thumbnails, which hopefully will avoid the problem. So try several values there until you have the border displayed.

The following user(s) said Thank You: hans1961

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

  • Posts: 56
  • Thank you received: 0
10 years 2 months ago #193719

Xavier, you solved it! :) Hans is happy! Please see attachment. Thanks again!

Kind regrads, Hans

Attachments:

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

Time to create page: 0.076 seconds
Powered by Kunena Forum