Skip to main content

Problem when trying to create an invoice

More
4 years 4 months ago #341998 by grayt7
When trying to create the invoice (attach invoice plugin installed)

An error has occurred.

2 Unable to get the size of the image [https://xxxxxxxxxx/images/com_hikashop/upload/thumbnails/50x50fsO/GOAL/656482 - Goal Training Jersey/656482-13-F.jpg]

Any ideas please?

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

More
4 years 4 months ago #341999 by nicolas
Hi,

This usually happens because your PHP is not allowing access to external files:
help.dreamhost.com/hc/en-us/articles/214199238-allow-url-fopen
How to allow this depends on how your hosting company configured your server so I can't say what to do exactly to activate it.
the best is to check with your hosting support on this.

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

More
4 years 4 months ago #342037 by grayt7
Hi,

Thank you for getting back to me.

This error only happens on this invoice - all others work fine?

Many thanks,

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

More
4 years 4 months ago #342038 by nicolas
Hi,

Then maybe there is a link to this image ?
Do you see the image in "images/com_hikashop/upload/thumbnails/50x50fsO/GOAL/656482 - Goal Training Jersey/656482-13-F.jpg" if you look for it via FTP ?
Do you have spaces for the folders for other images or is it only for this one ?

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

More
4 years 3 months ago #342239 by grayt7
Hi,

Thanks for your fast feedback.

Yeah it seems that images where there are spaces causes the problem. There are over 40,000 products on the site and a very large amount have spaces in the folder names. Is there any way this can be sorted?

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

More
4 years 3 months ago #342246 by nicolas
Hi,

I'm not sure. I would need a clearer picture of the situation to be able to say what to do.
Could you edit the product corresponding to that error and edit the image with the error ? That should open a popup with the file path. Could you provide that file path ?

Best regards,
Nicolas

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

More
4 years 3 months ago - 4 years 3 months ago #342251 by grayt7
Hi,

The file path is:

/GOAL/656482 - Goal Training Jersey/656482-13-F

The main image link on the front of the site:
Code:
<img id="hikashop_main_image" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" title="Puma Goal Training Jersey - Steel Grey / Asphalt" alt="/GOAL/656482 - Goal Training Jersey/656482-13-F" src="/images/com_hikashop/upload/thumbnails/400x400f/GOAL/656482 - Goal Training Jersey/656482-13-F.jpg">


Many thanks.
Last edit: 4 years 3 months ago by grayt7.

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

More
4 years 3 months ago #342255 by nicolas
Hi,

Isn't that the name ? Do you have the same for the path ?
Could you do a screenshot of the popup ?
Normally the path should end by .jpg

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

More
4 years 3 months ago #342281 by grayt7
Hi,

Please see screenshot the path is not shown. but the alt does seem to have the path in it and yes, just add .jpg at the end and then that is the path.

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

More
4 years 3 months ago #342283 by nicolas
Hi,

Ok.
Could you provide a backend access ?
Also which code are you using to display the thumbnail of the product image on the PDF invoice ? Could you provide the exact code ? It's likely that this custom code doesn't handle spaces properly and you need to replace spaces by %20 in that code.
You can provide these via our contact form:
www.hikashop.com/support/contact-us.html

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

More
4 years 3 months ago #342290 by grayt7
HI

Excellent. I made a small tweak to the code to replace the URL with %20 and it worked - thanks.
Code:
<?php $config = hikashop_config(); $imageHelper = hikashop_get('helper.image'); if(!empty($product->images[0]->file_path) && $config->get('thumbnail', 1) != 0) { $img = $imageHelper->getThumbnail($product->images[0]->file_path, array(50, 50), array('forcesize' => true, 'scale' => 'outside')); if($img->success) { $no_space = str_replace(' ', '%20', $img->url); echo '<img src="'.$no_space.'" alt="" style="float:left;margin-top:3px;margin-bottom:3px;margin-right:6px;"/>'; } } ?>
The following user(s) said Thank You: Philip

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

Time to create page: 0.238 seconds
Powered by Kunena Forum