Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -368,6 +368,18 @@ class ImageCore extends ObjectModel
|
|||||||
return self::$_cacheGetSize[$type];
|
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
|
* Clear all images in tmp dir
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ abstract class ObjectModelCore
|
|||||||
return (int)$value;
|
return (int)$value;
|
||||||
|
|
||||||
case self::TYPE_FLOAT :
|
case self::TYPE_FLOAT :
|
||||||
return (float)$value;
|
return (float)str_replace(',', '.', $value);
|
||||||
|
|
||||||
case self::TYPE_DATE :
|
case self::TYPE_DATE :
|
||||||
if (!$value)
|
if (!$value)
|
||||||
|
|||||||
@@ -176,6 +176,9 @@ class AdminControllerCore extends Controller
|
|||||||
/** @var array required_fields to display in the Required Fields form */
|
/** @var array required_fields to display in the Required Fields form */
|
||||||
public $required_fields = array();
|
public $required_fields = array();
|
||||||
|
|
||||||
|
/** @var Helper */
|
||||||
|
protected $helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array actions to execute on multiple selections
|
* @var array actions to execute on multiple selections
|
||||||
* Usage:
|
* Usage:
|
||||||
@@ -1635,6 +1638,8 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
// For each action, try to add the corresponding skip elements list
|
// For each action, try to add the corresponding skip elements list
|
||||||
$helper->list_skip_actions = $this->list_skip_actions;
|
$helper->list_skip_actions = $this->list_skip_actions;
|
||||||
|
|
||||||
|
$this->helper = $helper;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMedia()
|
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, 'modifier', 'convertAndFormatPrice', array('Product', 'convertAndFormatPrice')); // used twice
|
||||||
smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty'));
|
smartyRegisterFunction($smarty, 'function', 'getAdminToken', array('Tools', 'getAdminTokenLiteSmarty'));
|
||||||
smartyRegisterFunction($smarty, 'function', 'displayAddressDetail', array('AddressFormat', 'generateAddressSmarty'));
|
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)
|
function smartyDieObject($params, &$smarty)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -746,4 +746,14 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
return ($echo == '0' ? Configuration::get('PS_SHOP_NAME') : $echo);
|
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 */
|
/* cart */
|
||||||
#shopping_cart {
|
.lt-ie6 #shopping_cart {width: 130px;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
#shopping_cart a{
|
#shopping_cart a{
|
||||||
height: 15px;
|
height: 15px;
|
||||||
padding:15px 27px 10px 43px;
|
padding:15px 27px 10px 43px;
|
||||||
|
|||||||
@@ -44,11 +44,11 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
|||||||
<!-- MODULE Block cart -->
|
<!-- MODULE Block cart -->
|
||||||
<div id="cart_block" class="block exclusive">
|
<div id="cart_block" class="block exclusive">
|
||||||
<p class="title_block">
|
<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}
|
{if $ajax_allowed}
|
||||||
<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}> </span>
|
<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>
|
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}> </span>
|
||||||
{/if}
|
{/if}</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="block_content">
|
<div class="block_content">
|
||||||
<!-- block summary -->
|
<!-- block summary -->
|
||||||
|
|||||||
Reference in New Issue
Block a user