diff --git a/classes/Image.php b/classes/Image.php index 41e24bbe8..f2b749bf1 100644 --- a/classes/Image.php +++ b/classes/Image.php @@ -367,6 +367,18 @@ class ImageCore extends ObjectModel '); return self::$_cacheGetSize[$type]; } + + public static function getWidth($params, &$smarty) + { + $result = self::getSize($params['type']); + return $result['width']; + } + + public static function getHeight($params, &$smarty) + { + $result = self::getSize($params['type']); + return $result['height']; + } /** * Clear all images in tmp dir diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 29e48fe79..d0b70720d 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -389,7 +389,7 @@ abstract class ObjectModelCore return (int)$value; case self::TYPE_FLOAT : - return (float)$value; + return (float)str_replace(',', '.', $value); case self::TYPE_DATE : if (!$value) diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index d7cc66f89..d5954f850 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -175,6 +175,9 @@ class AdminControllerCore extends Controller /** @var array required_fields to display in the Required Fields form */ public $required_fields = array(); + + /** @var Helper */ + protected $helper; /** * @var array actions to execute on multiple selections @@ -1635,6 +1638,8 @@ class AdminControllerCore extends Controller // For each action, try to add the corresponding skip elements list $helper->list_skip_actions = $this->list_skip_actions; + + $this->helper = $helper; } public function setMedia() diff --git a/config/smarty.config.inc.php b/config/smarty.config.inc.php index 2ddefc55a..892a22dd3 100644 --- a/config/smarty.config.inc.php +++ b/config/smarty.config.inc.php @@ -80,6 +80,9 @@ smartyRegisterFunction($smarty, 'function', 'displayPrice', array('Tools', 'disp smartyRegisterFunction($smarty, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty')); smartyRegisterFunction($smarty, 'function', 'displayAddressDetail', array('AddressFormat', 'generateAddressSmarty')); +smartyRegisterFunction($smarty, 'function', 'getWidthSize', array('Image', 'getWidth')); +smartyRegisterFunction($smarty, 'function', 'getHeightSize', array('Image', 'getHeight')); + function smartyDieObject($params, &$smarty) { diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 8a99921a5..a0a85295e 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -746,4 +746,14 @@ class AdminCartsControllerCore extends AdminController { return ($echo == '0' ? Configuration::get('PS_SHOP_NAME') : $echo); } + + public function displayDeleteLink($token = null, $id, $name = null) + { + // don't display ordered carts + foreach ($this->_list as $row) + if ($row['id_cart'] == $id && isset($row['id_order']) && $row['id_order']) + return ; + + return $this->helper->displayDeleteLink($token, $id, $name); + } } diff --git a/modules/blockuserinfo/blockuserinfo.css b/modules/blockuserinfo/blockuserinfo.css index cb3f68e1b..235a1b271 100644 --- a/modules/blockuserinfo/blockuserinfo.css +++ b/modules/blockuserinfo/blockuserinfo.css @@ -13,11 +13,7 @@ } /* cart */ -#shopping_cart { - - - -} +.lt-ie6 #shopping_cart {width: 130px;} #shopping_cart a{ height: 15px; padding:15px 27px 10px 43px; diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl index 3430c5e31..34320bd5b 100644 --- a/themes/default/modules/blockcart/blockcart.tpl +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -44,11 +44,11 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';