Jump to content

Crossselling Images Dont Show PS 1.5.3


Recommended Posts

Hi,

 

Another bug on the new version of Prestashop 1.5.3.

 

On Prestashop 1.4.x templates uses a image called "medium" , when update to the new version of Prestashop 1.5.0 is renamed to "medium_default" and all templates/modules use this new alias.

 

The Crossselling module of version PS1.5.0 to PS1.5.2 use the new image "medium_default", but the new version PS1.5.3 is renamed to the old alias another time. If you dont have configured the old image or you have removed after update the prestashop 1.4 to 1.5, cross selling block dont show the images.

 

To solve this inssue, you can create on image preferences a new image called menium (another time) or change this lines on crossselling.php

 

LINE 161

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));

TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium_default'));

 

LINE 215

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));

TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default');

  • Like 5
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
  • 1 month later...

It dosent work for me in the card, the pictures is missing.

 

The IMG link is: domainname.dk/286-medium_default/productname.jpg

 

It seems like the procuct ID is missing in the IMG URL.

 

Like it should be: domainname.dk/57-286-medium_default/productname.jpg

 

The productid is 57-

If i paste "domainname.dk/57-286-medium_default/productname.jpg" to my browser - the picture is showing. But how do i get it into the crosselling.php?

 

Has "product_id" changed after the update from 1.4.8.2 to 1.5.3.1?

Edited by mortenbennedsen (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Here is what I found out by examining the image path after making the change suggested above. The images in the shopping cart have the theme name appended to the src call for them. See the script directly below.

<img alt="Dickies Cargo Work Pants" src="http://75.98.175.59/36-gameworld_medium_default/dickies-cargo-work-pants.jpg">

 

While the image call on the actual product pages does not. See script directly below.

<img alt="Dickies Cargo Work Pants" src="http://75.98.175.59/36-medium_default/dickies-cargo-work-pants.jpg">

 

Any idea how to remove the theme directory call from this as that is why the images are not showing in the shopping cart??

Edited by toninovak66 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...

I am still facing the same problem as toninovak66 mentioned earlier.

 

It was fine before I did a migration from one domain to another. I compare the category module to the cross selling.

 

Category module img (working fine): http://domain.com/145-1907-medium_default/pre.jpg

Cross selling module img (with broken img): http://domain.com/1907-medium_default/pre.jpg

 

I am using 1.5.4.1. Anyone knows how to fix this rewrite issue?

Link to comment
Share on other sites

  • 1 month later...

Medium size is correct, the problem there is a error on line215

 

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));

 

to

$this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium');

For me works just changing that in Prestashop 1.5.4

Link to comment
Share on other sites

Hello, for picture on card, you must paste this line

 

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'size_image');

 

in line 215 AND 161

 

line 215 is for product page

line 161 work for card page

 

it work correctly for me

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi,

 

Another bug on the new version of Prestashop 1.5.3.

 

On Prestashop 1.4.x templates uses a image called "medium" , when update to the new version of Prestashop 1.5.0 is renamed to "medium_default" and all templates/modules use this new alias.

 

The Crossselling module of version PS1.5.0 to PS1.5.2 use the new image "medium_default", but the new version PS1.5.3 is renamed to the old alias another time. If you dont have configured the old image or you have removed after update the prestashop 1.4 to 1.5, cross selling block dont show the images.

 

To solve this inssue, you can create on image preferences a new image called menium (another time) or change this lines on crossselling.php

 

LINE 161

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium_default'));
LINE 215

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default');

 

 

For me it works on a custom theme when I use:

 $orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default'); 

For both...

Edited by B.Köring (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

Another bug on the new version of Prestashop 1.5.3.

 

On Prestashop 1.4.x templates uses a image called "medium" , when update to the new version of Prestashop 1.5.0 is renamed to "medium_default" and all templates/modules use this new alias.

 

The Crossselling module of version PS1.5.0 to PS1.5.2 use the new image "medium_default", but the new version PS1.5.3 is renamed to the old alias another time. If you dont have configured the old image or you have removed after update the prestashop 1.4 to 1.5, cross selling block dont show the images.

 

To solve this inssue, you can create on image preferences a new image called menium (another time) or change this lines on crossselling.php

 

LINE 161

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium_default'));
LINE 215

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], ImageType::getFormatedName('medium'));
TO

$orderProduct['image'] = $this->context->link->getImageLink($orderProduct['link_rewrite'], (int)$orderProduct['product_id'].'-'.(int)$orderProduct['id_image'], 'medium_default');

 

Thanks, worked for me on 1.5.3.1

Link to comment
Share on other sites

×
×
  • Create New...