Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
}
|
||||
|
||||
/* cart */
|
||||
#shopping_cart {
|
||||
|
||||
|
||||
|
||||
}
|
||||
.lt-ie6 #shopping_cart {width: 130px;}
|
||||
#shopping_cart a{
|
||||
height: 15px;
|
||||
padding:15px 27px 10px 43px;
|
||||
|
||||
@@ -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}> </span>
|
||||
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}> </span>
|
||||
{/if}
|
||||
{/if}</a>
|
||||
</p>
|
||||
<div class="block_content">
|
||||
<!-- block summary -->
|
||||
|
||||
Reference in New Issue
Block a user