From 13482914158857d5977f2a1b8d42f979e2689cd1 Mon Sep 17 00:00:00 2001 From: nturato Date: Tue, 15 Jan 2013 10:17:02 +0100 Subject: [PATCH 01/67] [WS] images are only shown as jpg or gif If you enable BO to also use the PNG file you can not use these images in WS because there are no controls on the image type --- .../WebserviceSpecificManagementImages.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/classes/webservice/WebserviceSpecificManagementImages.php b/classes/webservice/WebserviceSpecificManagementImages.php index d2e20108f..c7e282bd7 100755 --- a/classes/webservice/WebserviceSpecificManagementImages.php +++ b/classes/webservice/WebserviceSpecificManagementImages.php @@ -33,7 +33,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage /** * @var string The extension of the image to display */ - protected $imgExtension = 'jpg'; + protected $imgExtension; /** * @var array The type of images (general, categories, manufacturers, suppliers, stores...) @@ -119,10 +119,18 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage // display image content if needed else if ($this->imgToDisplay) { + if(empty($this->imgExtension)){ + $imginfo = getimagesize($this->imgToDisplay); + $this->imgExtension = image_type_to_extension($imginfo[2],false); + } + $imageResource = false; - $types = array('jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), - 'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif') - ); + $types = array( + 'jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), + 'jpeg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'), + 'png' => array('function' => 'imagecreatefrompng', 'Content-Type' => 'image/png'), + 'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif') + ); if (array_key_exists($this->imgExtension, $types)) $imageResource = @$types[$this->imgExtension]['function']($this->imgToDisplay); From a7cfe1c0143a9af384fef0688dd1fe885d91b66d Mon Sep 17 00:00:00 2001 From: pxls Date: Sat, 23 Mar 2013 11:43:15 +0100 Subject: [PATCH 02/67] [-] FO : bad variable used for free product text Bad variable used for free product text (set in blcokcart.tpl). --- modules/blockcart/ajax-cart.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 2eb44e093..445af7245 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -449,8 +449,8 @@ var ajaxCart = { content += ' '; else content += ''; - if (typeof(freeShippingTranslation) != 'undefined') - content += '' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeShippingTranslation) + ''; + if (typeof(freeProductTranslation) != 'undefined') + content += '' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeProductTranslation) + ''; content += ''; if (this.hasAttributes) content += '