Author Topic: "Enable Dynamic Thumbnail Resizing" => OFF and still resizing *solved*  (Read 11611 times)

dokape

  • Beginner
  • *
  • Posts: 20
Hello,

Joomla 1.5.7 and Virtuemart 1.1.2

Administration / Configuration / Tab Site /
Setting: "Enable Dynamic Thumbnail Resizing?" at the layout Configuration.

For each product, I saved special images, different from the standard-product-image.
I don't won't the images to be resized by virtuemart. The setting "Enable Dynamic Thumbnail Resizing?" is OFF.
Well, but in the Category-Browse-Page, the image is sill resized to the setting given in the Configuration.
The settings "Thumbnail Image Width" and "Thumbnail Image Height" are used, even, if I do not check the "Enable Dynamic Thumbnail Resizing?"

This line in the browse-page does call the image:
Code: [Select]
echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"' )
The " $product_thumb_image " keeps the correct image name, but by call of the ps_product::image_tag the image is rendered...

This is not really nice :-(

Greetings from Germany,
Peter

dokape

  • Beginner
  • *
  • Posts: 20
Re: "Enable Dynamic Thumbnail Resizing" => OFF and still resizing
« Reply #1 on: December 20, 2008, 14:11:43 pm »
ok, solved.

There's an optional parameter resize=1 on the ps_product::image_tag.
If set to 0, it works.

Thanks for reading.


drew23

  • Beginner
  • *
  • Posts: 3
Thanks this worked for me. To be more specific the optional parameter is located in ps_products.php.

$resize
(1 = resize the image by using height and width attributes, 0 = do not resize the image)

Not sure why this exists, as it seems more logical to have this in the glogal config.

rgibbs421

  • Beginner
  • *
  • Posts: 32
Re: "Enable Dynamic Thumbnail Resizing" => OFF and still resizing *solved*
« Reply #3 on: October 12, 2009, 23:27:37 pm »
I found the option in Joomla --> VirtueMart --> Admin --> Configuration --> Site --> Layout --> Enable Dynamic Thumbnail Resizing? check box

ABunning

  • Beginner
  • *
  • Posts: 8
    • ToolForce
Re: "Enable Dynamic Thumbnail Resizing" => OFF and still resizing *solved*
« Reply #4 on: October 21, 2009, 16:06:01 pm »
Hi,

I am having this same issue - all the products in my browse page are being resized to 90px high - making many of them FAR to wide!

I have tried adding the resize='0'parameter but I must have done something wrong as the page stops loading.  I had:
Code: [Select]
echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" border="0" title="'.$product_name.'" alt="'.$product_name .'"', resize='0' )I also tried it without the quotes round the 0 but just the same.

Am I putting it in the right place of should this be put somewhere else?

Thanks,
   Andrew

jgentile

  • Beginner
  • *
  • Posts: 25
The reason it stayed on is becuase there are TWO spots in the  ps_product.php file where you need to set $resize=1 to $resiz=0.

Here are both lines.

/**
    * Prints the img tag for the given product image
    *
    * @param string $image The name of the imahe OR the full URL to the image
    * @param string $args Additional attributes for the img tag
    * @param int $resize
    * (1 = resize the image by using height and width attributes,
    * 0 = do not resize the image)
    * @param string $path_appendix The path to be appended to IMAGEURL / IMAGEPATH
    */
   function show_image($image, $args="", $resize=0, $path_appendix="product") {
      echo $this->image_tag($image, $args, $resize, $path_appendix);
   }

   /**
    * Returns the img tag for the given product image
    *
    * @param string $image The name of the imahe OR the full URL to the image
    * @param string $args Additional attributes for the img tag
    * @param int $resize
    * (1 = resize the image by using height and width attributes,
    * 0 = do not resize the image)
    * @param string $path_appendix The path to be appended to IMAGEURL / IMAGEPATH
    * @return The HTML code of the img tag
    */
   function image_tag($image, $args="", $resize=0, $path_appendix='product', $thumb_width=0, $thumb_height=0 ) {

------------------------

See just above the dotted line there is a $resize=0 string. But a few lines up also there is another $resize string in the function show_image  line. BOTH OF THEM have $resize strings in them and BOTH need to be set to $resize=0

If you only change one, then your images will keep showing up resized even though you think you turned it off.