Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
+1
-1
@@ -2557,7 +2557,7 @@ exit;
|
|||||||
$fileAttachment = null;
|
$fileAttachment = null;
|
||||||
if (isset($_FILES[$input]['name']) && !empty($_FILES[$input]['name']) && !empty($_FILES[$input]['tmp_name']))
|
if (isset($_FILES[$input]['name']) && !empty($_FILES[$input]['name']) && !empty($_FILES[$input]['tmp_name']))
|
||||||
{
|
{
|
||||||
$fileAttachment['rename'] = uniqid(). self::strtolower(substr($_FILES[$input]['name'], -5));
|
$fileAttachment['rename'] = uniqid(). Tools::strtolower(substr($_FILES[$input]['name'], -5));
|
||||||
$fileAttachment['content'] = file_get_contents($_FILES[$input]['tmp_name']);
|
$fileAttachment['content'] = file_get_contents($_FILES[$input]['tmp_name']);
|
||||||
$fileAttachment['tmp_name'] = $_FILES[$input]['tmp_name'];
|
$fileAttachment['tmp_name'] = $_FILES[$input]['tmp_name'];
|
||||||
$fileAttachment['name'] = $_FILES[$input]['name'];
|
$fileAttachment['name'] = $_FILES[$input]['name'];
|
||||||
|
|||||||
@@ -87,11 +87,7 @@ class AdminCarriersControllerCore extends AdminController
|
|||||||
'is_free' => array(
|
'is_free' => array(
|
||||||
'title' => $this->l('Free Shipping'),
|
'title' => $this->l('Free Shipping'),
|
||||||
'align' => 'center',
|
'align' => 'center',
|
||||||
'icon' => array(
|
'active' => 'isFree',
|
||||||
0 => 'disabled.gif',
|
|
||||||
1 => 'enabled.gif',
|
|
||||||
'default' => 'disabled.gif'
|
|
||||||
),
|
|
||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'orderby' => false,
|
'orderby' => false,
|
||||||
'width' => 150
|
'width' => 150
|
||||||
@@ -534,6 +530,10 @@ class AdminCarriersControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||||
}
|
}
|
||||||
|
else if (isset($_GET['isFree'.$this->table]))
|
||||||
|
{
|
||||||
|
$this->processIsFree();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox')))
|
if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox')))
|
||||||
@@ -566,6 +566,17 @@ class AdminCarriersControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function processIsFree()
|
||||||
|
{
|
||||||
|
$carrier = new Carrier($this->id_object);
|
||||||
|
if (!Validate::isLoadedObject($carrier))
|
||||||
|
$this->errors[] = Tools::displayError('An error occurred while updating carrier information.');
|
||||||
|
$carrier->is_free = $carrier->is_free ? 0 : 1;
|
||||||
|
if (!$carrier->update())
|
||||||
|
$this->errors[] = Tools::displayError('An error occurred while updating carrier information.');
|
||||||
|
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overload the property $fields_value
|
* Overload the property $fields_value
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -767,6 +767,11 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name').$params);
|
Tools::redirectAdmin('index.php?controller=adminmodules&configure='.Tools::getValue('module_name').'&token='.Tools::getValue('token').'&module_name='.Tools::getValue('module_name').$params);
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
Tools::redirectAdmin(self::$currentIndex.'&conf='.$return.'&token='.$this->token.'&tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($_GET['update']))
|
||||||
|
{
|
||||||
|
Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token.'&updated=1tab_module='.$module->tab.'&module_name='.$module->name.'&anchor=anchor'.ucfirst($module->name).(isset($modules_list_save) ? '&modules_list='.$modules_list_save : '').$params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
@@ -1013,6 +1018,14 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
// Browse modules list
|
// Browse modules list
|
||||||
foreach ($modules as $km => $module)
|
foreach ($modules as $km => $module)
|
||||||
{
|
{
|
||||||
|
//Add succes message for one module update
|
||||||
|
if (Tools::getValue('updated') && Tools::getValue('module_name'))
|
||||||
|
{
|
||||||
|
if ($module->name === (string)Tools::getValue('module_name'))
|
||||||
|
$module_success[] = array('name' => $module->displayName, 'message' => array(
|
||||||
|
0 => $this->l('Current version:').$module->version));
|
||||||
|
}
|
||||||
|
|
||||||
//if we are in favorites view we only display installed modules
|
//if we are in favorites view we only display installed modules
|
||||||
if (Tools::getValue('select') == 'favorites' && !$module->id)
|
if (Tools::getValue('select') == 'favorites' && !$module->id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -201,7 +201,6 @@ function changeAddressDelivery(obj)
|
|||||||
|
|
||||||
function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line)
|
function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (typeof(line) == 'undefined' || line.length == 0)
|
if (typeof(line) == 'undefined' || line.length == 0)
|
||||||
line = $('#cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_0_], #cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_nocustom_]');
|
line = $('#cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_0_], #cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_nocustom_]');
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
|
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} />
|
||||||
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}
|
{if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if}
|
||||||
</a>
|
</a>
|
||||||
<h3><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>
|
<h3>{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}<a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}</a></h3>
|
||||||
<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p>
|
<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</a></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="right_block">
|
<div class="right_block">
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
|||||||
{if $field.type == 1}
|
{if $field.type == 1}
|
||||||
<li class="customizationUploadLine{if $field.required} required{/if}">
|
<li class="customizationUploadLine{if $field.required} required{/if}">
|
||||||
<label for ="textField{$customizationField}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}</label>
|
<label for ="textField{$customizationField}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}</label>
|
||||||
<textarea type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>
|
<textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>
|
||||||
</li>
|
</li>
|
||||||
{counter}
|
{counter}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user