Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
Gregory Roussac
2013-02-05 16:13:59 +01:00
7 changed files with 34 additions and 8 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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)
{

View File

@@ -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);
}
}

View File

@@ -13,11 +13,7 @@
}
/* cart */
#shopping_cart {
}
.lt-ie6 #shopping_cart {width: 130px;}
#shopping_cart a{
height: 15px;
padding:15px 27px 10px 43px;

View File

@@ -44,11 +44,11 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
<!-- MODULE Block cart -->
<div id="cart_block" class="block exclusive">
<p class="title_block">
<a href="{$link->getPageLink("$order_process", true)}" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">{l s='Cart' mod='blockcart'}</a>
<a href="{$link->getPageLink("$order_process", true)}" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">{l s='Cart' mod='blockcart'}
{if $ajax_allowed}
<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}>&nbsp;</span>
{/if}
{/if}</a>
</p>
<div class="block_content">
<!-- block summary -->