Author Topic: Error in ps_product.php  (Read 26494 times)

dbierer

  • Beginner
  • *
  • Posts: 1
Error in ps_product.php
« on: February 23, 2009, 05:59:30 AM »
RE: joomla/administrator/components/mod_virtuemart/classes/ps_product.php

Received an error message from ps_product.php when thumbnail graphic was missing. 
getimagesize() reported error when file was not found.
Fixed problem by adding a simple check to see if the file exists before calling getimagesize()

Replaced line 1381:

$arr = getimagesize(str_replace( IMAGEURL, IMAGEPATH, $url ));

With this:

$f = str_replace( IMAGEURL, IMAGEPATH, $url );

if ( file_exists($f) ) {

   $arr = getimagesize( $f );

   $width = $arr[0]; $height = $arr[1];

} else {

   $width = 100; $height = 100;
                  }                  



rcflash

  • Beginner
  • *
  • Posts: 5
Re: Error in ps_product.php
« Reply #2 on: July 23, 2009, 18:23:29 PM »
Hello,
Dont work this problem?

      } elseif( file_exists($mosConfig_absolute_path.'/'.$image)) {
      $url = $mosConfig_live_site.'/'.$image;
      }
               
      if( !strpos( $args, "height=" ) ) {
      $ f = str_replace (ImageURL, ImagePath, $ url);
      if (file_exists ($ f)) (
      $ arr = getimagesize ($ f);
      $ width = $ arr
  • ; $ height = $ arr [1];

      ) Else (
      $ width = 100; $ height = 100; )       
      }

      if( $resize ) {
      if( $height < $width ) {
      $width = round($width / ($height / PSHOP_IMG_HEIGHT));
      $height = PSHOP_IMG_HEIGHT;

Help me!!

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in J:\wamp\www\test\Site\administrator\components\com_virtuemart\classes\ps_product.php on line 1380


Thaks

rcflash

  • Beginner
  • *
  • Posts: 5
Re: Error in ps_product.php
« Reply #3 on: July 24, 2009, 13:35:20 PM »
Help Pelease!!!

kitchin

  • Beginner
  • *
  • Posts: 45
Re: Error in ps_product.php
« Reply #4 on: July 29, 2009, 23:45:49 PM »
Try copying the fix again.

) Else (

should be

} else {

Braces, not parentheses.

rcflash

  • Beginner
  • *
  • Posts: 5
Re: Error in ps_product.php
« Reply #5 on: July 30, 2009, 02:22:22 AM »
Try copying the fix again.

) Else (

should be

} else {

Braces, not parentheses.


Thank you, very very gooooody

Work

 :D :D :D

detlilto

  • Beginner
  • *
  • Posts: 11
Re: Error in ps_product.php
« Reply #6 on: July 31, 2009, 00:06:52 AM »
Hi,
could You place here ps_product.php file?

rcflash

  • Beginner
  • *
  • Posts: 5
Re: Error in ps_product.php
« Reply #7 on: July 31, 2009, 16:48:58 PM »
   
Attached

Goody Look

 ;D ;D

[attachment cleanup by admin]

detlilto

  • Beginner
  • *
  • Posts: 11
Re: Error in ps_product.php
« Reply #8 on: August 01, 2009, 00:42:02 AM »
Thank You! it's working, but I still have a problem with pictures in list of products... :( like here:

http://www.szpejarnia.pl/index.php?page=shop.browse&category_id=111&option=com_virtuemart&Itemid=2

Karol

rcflash

  • Beginner
  • *
  • Posts: 5
Re: Error in ps_product.php
« Reply #9 on: August 01, 2009, 01:19:53 AM »
Thank You! it's working, but I still have a problem with pictures in list of products... :( like here:

http://www.szpejarnia.pl/index.php?page=shop.browse&category_id=111&option=com_virtuemart&Itemid=2

Karol

   
The problem is with IE in Firefox it all normal.

Do not put accents and spaces in names of images. Jpg

example: imagen_90x90.jpg (do not ask)

imagen90x90.jpg (so that has to be)

Tks


joetraff

  • Beginner
  • *
  • Posts: 2
    • how to make money online
Re: Error in ps_product.php
« Reply #10 on: June 04, 2010, 16:40:02 PM »
Thank You! it's working, but I still have a problem with pictures in list of products... :( like here:

http://www.szpejarnia.pl/index.php?page=shop.browse&category_id=111&option=com_virtuemart&Itemid=2

Karol

   
The problem is with IE in Firefox it all normal.

Do not put accents and spaces in names of images. Jpg

example: imagen_90x90.jpg (do not ask)

imagen90x90.jpg (so that has to be)

Tks


Thanks for the help.
It was due to firefox problem in my case I guess.
Anyway, I got my problem solved.
Your post helped a lot.

itcoll

  • Beginner
  • *
  • Posts: 1
Re: Error in ps_product.php
« Reply #11 on: November 09, 2010, 08:51:41 AM »
i got it fixed too .

Hanin

  • Beginner
  • *
  • Posts: 2
Re: Error in ps_product.php
« Reply #12 on: May 08, 2012, 18:03:38 PM »
i got it fixed too .

Thanks for this thread, I had a slightly different problem but this this thread and a some thinking helped me out!