Merge remote-tracking branch 'origin/development' into development
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "index.php",
|
||||
data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}¬e="+noteContent,
|
||||
data: "token={getAdminToken tab='AdminCustomers'}&tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer={$customer->id}¬e="+encodeURIComponent(noteContent),
|
||||
async : true,
|
||||
success: function(r) {
|
||||
$('#note_feedback').html('').hide();
|
||||
|
||||
@@ -227,6 +227,10 @@
|
||||
$(".import_products_categories, label[for=regenerate], #regenerate").show();
|
||||
else
|
||||
$(".import_products_categories, label[for=regenerate], #regenerate").hide();
|
||||
if ($("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6)
|
||||
$("label[for=regenerate], #regenerate").show()
|
||||
else
|
||||
$("label[for=regenerate], #regenerate").hide();
|
||||
if ($("#entity > option:selected").val() == 0 || $("#entity > option:selected").val() == 1 || $("#entity > option:selected").val() == 3 || $("#entity > option:selected").val() == 5 || $("#entity > option:selected").val() == 6 || $("#entity > option:selected").val() == 7)
|
||||
$("label[for=forceIDs], #forceIDs").show();
|
||||
else
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
<td>{$module->categoryName}</td>
|
||||
<td>
|
||||
<select name="i_{$module->name}" class="moduleFavorite" style="width:50px">
|
||||
<option value="" selected="selected">---</option>
|
||||
<option value="" selected="selected">-</option>
|
||||
<option value="1" {if isset($module->preferences.interest) && $module->preferences.interest eq '1'}selected="selected"{/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if isset($module->preferences.interest) && $module->preferences.interest eq '0'}selected="selected"{/if}>{l s='No'}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="f_{$module->name}" class="moduleFavorite" style="width:50px">
|
||||
<option value="" selected="selected">---</option>
|
||||
<option value="" selected="selected">-</option>
|
||||
<option value="1" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '1'}selected="selected"{/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '0'}selected="selected"{/if}>{l s='No'}</option>
|
||||
</select>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
{l s='Show'} :
|
||||
<select id="show_modules" onChange="autoUrl('show_modules', '{$url_show_modules}')">
|
||||
<option value="all">{l s='All modules'} </option>
|
||||
<option>---------------</option>
|
||||
<option>-</option>
|
||||
|
||||
{foreach $modules as $module}
|
||||
<option value="{$module->id|intval}" {if $display_key == $module->id}selected="selected"{/if}>{$module->displayName}</option>
|
||||
|
||||
@@ -715,6 +715,16 @@
|
||||
$('#payment_list').html(payment_list);
|
||||
}
|
||||
|
||||
function fixPriceFormat(price)
|
||||
{
|
||||
if(price.indexOf(',') > 0 && price.indexOf('.') > 0) // if contains , and .
|
||||
if(price.indexOf(',') < price.indexOf('.')) // if , is before .
|
||||
price = price.replace(',',''); // remove ,
|
||||
price = price.replace(' ',''); // remove any spaces
|
||||
price = price.replace(',','.'); // remove , if price did not cotain both , and .
|
||||
return price;
|
||||
}
|
||||
|
||||
function displaySummary(jsonSummary)
|
||||
{
|
||||
currency_format = jsonSummary.currency.format;
|
||||
@@ -750,13 +760,13 @@
|
||||
if (!changed_shipping_price)
|
||||
$('#shipping_price').html('<b>' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + '</b>');
|
||||
shipping_price_selected_carrier = jsonSummary.summary.total_shipping;
|
||||
|
||||
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
$('#total_shipping').html(formatCurrency(parseFloat(jsonSummary.summary.total_shipping_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
$('#total_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_products.replace(',', '.')), currency_format, currency_sign, currency_blank));
|
||||
|
||||
$('#total_vouchers').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_discounts_tax_exc)), currency_format, currency_sign, currency_blank));
|
||||
$('#total_shipping').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_shipping_tax_exc)), currency_format, currency_sign, currency_blank));
|
||||
$('#total_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_tax)), currency_format, currency_sign, currency_blank));
|
||||
$('#total_without_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_price_without_tax)), currency_format, currency_sign, currency_blank));
|
||||
$('#total_with_taxes').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_price)), currency_format, currency_sign, currency_blank));
|
||||
$('#total_products').html(formatCurrency(parseFloat(fixPriceFormat(jsonSummary.summary.total_products)), currency_format, currency_sign, currency_blank));
|
||||
id_currency = jsonSummary.cart.id_currency;
|
||||
$('#id_currency option').removeAttr('selected');
|
||||
$('#id_currency option[value="'+id_currency+'"]').attr('selected', true);
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
<a href="{$link->getAdminLink('AdminCustomerThreads')|escape:'htmlall':'UTF-8'}"><b>{l s='Click here'}</b> {l s='to see all messages.'}</a><br>
|
||||
<div id="message" style="display: {if Tools::getValue('message')}block{else}none{/if}">
|
||||
<select name="order_message" id="order_message" onchange="orderOverwriteMessage(this, '{l s='Do you want to overwrite your existing message?'}')">
|
||||
<option value="0" selected="selected">-- {l s='Choose a standard message'} --</option>
|
||||
<option value="0" selected="selected">- {l s='Choose a standard message'} -</option>
|
||||
{foreach from=$orderMessages item=orderMessage}
|
||||
<option value="{$orderMessage['message']|escape:'htmlall':'UTF-8'}">{$orderMessage['name']}</option>
|
||||
{/foreach}
|
||||
|
||||
@@ -103,11 +103,11 @@
|
||||
<td class="col-left"><label>{l s='Manufacturer:'}</label></td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="id_manufacturer" id="id_manufacturer">
|
||||
<option value="0">-- {l s='Choose (optional)'} --</option>
|
||||
<option value="0">- {l s='Choose (optional)'} -</option>
|
||||
{if $product->id_manufacturer}
|
||||
<option value="{$product->id_manufacturer}" selected="selected">{$product->manufacturer_name}</option>
|
||||
{/if}
|
||||
<option disabled="disabled">----------</option>
|
||||
<option disabled="disabled">-</option>
|
||||
</select>
|
||||
<a class="button bt-icon confirm_leave" style="margin-bottom:0" href="{$link->getAdminLink('AdminManufacturers')|escape:'htmlall':'UTF-8'}&addmanufacturer">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Create new manufacturer'}" title="{l s='Create new manufacturer'}" />
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</td>
|
||||
<td style="padding-bottom:5px;">
|
||||
<select name="attribute" id="attribute" style="width: 200px;">
|
||||
<option value="0">---</option>
|
||||
<option value="0">-</option>
|
||||
</select>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
@@ -375,7 +375,7 @@ $(document).ready(function () {
|
||||
<div class="margin-form">
|
||||
<input type="text" name="sp_reduction" value="0.00" size="11" />
|
||||
<select name="sp_reduction_type">
|
||||
<option selected="selected">---</option>
|
||||
<option selected="selected">-</option>
|
||||
<option value="amount">{l s='Amount'}</option>
|
||||
<option value="percentage">{l s='Percentage'}</option>
|
||||
</select>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<label>{l s='Filter by product:'}</label>
|
||||
<div class="margin-left">
|
||||
<select id="selectProduct" name="selectProduct" style="width: 200px;" onfocus="fillProducts();" onchange="updateConversionRate(this.value);">
|
||||
<option value="0" selected="selected">-- {l s='All'} --</option>
|
||||
<option value="0" selected="selected">- {l s='All'} -</option>
|
||||
</select>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
{/if}
|
||||
>{$option->$input.options.name}</option>
|
||||
{elseif $option == "-"}
|
||||
<option value="">--</option>
|
||||
<option value="">-</option>
|
||||
{else}
|
||||
<option value="{$option[$input.options.id]}"
|
||||
{if isset($input.multiple)}
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
{else}
|
||||
{if $params.type == 'bool'}
|
||||
<select onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$key}">
|
||||
<option value="">--</option>
|
||||
<option value="">-</option>
|
||||
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
@@ -197,7 +197,7 @@
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
<select onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>--</option>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if $option_display == $params.value || $option_value == $params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
|
||||
@@ -1500,7 +1500,7 @@ abstract class AdminTabCore
|
||||
case 'bool':
|
||||
echo '
|
||||
<select name="'.$this->table.'Filter_'.$key.'">
|
||||
<option value="">--</option>
|
||||
<option value="">-</option>
|
||||
<option value="1"'.($value == 1 ? ' selected="selected"' : '').'>'.$this->l('Yes').'</option>
|
||||
<option value="0"'.(($value == 0 && $value != '') ? ' selected="selected"' : '').'>'.$this->l('No').'</option>
|
||||
</select>';
|
||||
@@ -1524,7 +1524,7 @@ abstract class AdminTabCore
|
||||
if (isset($params['filter_key']))
|
||||
{
|
||||
echo '<select onchange="$(\'#submitFilter'.$this->table.'\').focus();$(\'#submitFilter'.$this->table.'\').click();" name="'.$this->table.'Filter_'.$params['filter_key'].'" '.(isset($params['width']) ? 'style="width: '.$params['width'].'px"' : '').'>
|
||||
<option value=""'.(($value == 0 && $value != '') ? ' selected="selected"' : '').'>--</option>';
|
||||
<option value=""'.(($value == 0 && $value != '') ? ' selected="selected"' : '').'>-</option>';
|
||||
if (isset($params['select']) && is_array($params['select']))
|
||||
foreach ($params['select'] as $optionValue => $optionDisplay)
|
||||
{
|
||||
|
||||
@@ -1139,7 +1139,7 @@ abstract class ObjectModelCore
|
||||
{
|
||||
$vars = get_class_vars($class_name);
|
||||
foreach ($vars['shopIDs'] as $id_shop)
|
||||
$or[] = ' main.id_shop = '.(int)$id_shop.' ';
|
||||
$or[] = '(main.id_shop = '.(int)$id_shop.(isset($this->def['fields']['id_shop_group']) ? ' OR (id_shop = 0 AND id_shop_group='.(int)Shop::getGroupFromShop((int)$id_shop).')' : '').')';
|
||||
|
||||
$prepend = '';
|
||||
if (count($or))
|
||||
@@ -1658,4 +1658,4 @@ abstract class ObjectModelCore
|
||||
{
|
||||
$this->update_fields = $fields;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1695,7 +1695,9 @@ class ToolsCore
|
||||
fwrite($write_fd, "<IfModule mod_rewrite.c>\n");
|
||||
|
||||
// Ensure HTTP_MOD_REWRITE variable is set in environment
|
||||
fwrite($write_fd, "<IfModule mod_env.c>\n");
|
||||
fwrite($write_fd, "SetEnv HTTP_MOD_REWRITE On\n");
|
||||
fwrite($write_fd, "</IfModule>\n\n");
|
||||
|
||||
// Disable multiviews ?
|
||||
if ($disable_multiviews)
|
||||
|
||||
@@ -157,6 +157,8 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
$this->errors[] = $this->l('Failed to copy the file.');
|
||||
$_POST['file_name'] = $_FILES['file']['name'];
|
||||
@unlink($_FILES['file']['tmp_name']);
|
||||
if (!sizeof($this->errors) && isset($a) && file_exists(_PS_DOWNLOAD_DIR_.$a->file))
|
||||
unlink(_PS_DOWNLOAD_DIR_.$a->file);
|
||||
$_POST['file'] = $uniqid;
|
||||
$_POST['mime'] = $_FILES['file']['type'];
|
||||
}
|
||||
@@ -172,11 +174,14 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
'<b>'.$upload_mb.'</b>'
|
||||
);
|
||||
}
|
||||
else if (!empty($_FILES['file']['tmp_name']))
|
||||
else
|
||||
$this->errors[] = $this->l('Upload error. Please check your server configurations for the maximum upload size allowed.');
|
||||
}
|
||||
$this->validateRules();
|
||||
}
|
||||
return parent::postProcess();
|
||||
$return = parent::postProcess();
|
||||
if (!$return && isset($uniqid) && file_exists(_PS_DOWNLOAD_DIR_.$uniqid))
|
||||
unlink(_PS_DOWNLOAD_DIR_.$uniqid);
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,6 +382,7 @@ class AdminImportControllerCore extends AdminController
|
||||
'meta_title' => array('label' => $this->l('Meta title')),
|
||||
'meta_keywords' => array('label' => $this->l('Meta keywords')),
|
||||
'meta_description' => array('label' => $this->l('Meta description')),
|
||||
'image' => array('label' => $this->l('Image URL')),
|
||||
'shop' => array(
|
||||
'label' => $this->l('ID / Name of group shop'),
|
||||
'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'),
|
||||
@@ -882,6 +883,12 @@ class AdminImportControllerCore extends AdminController
|
||||
case 'categories':
|
||||
$path = _PS_CAT_IMG_DIR_.(int)$id_entity;
|
||||
break;
|
||||
case 'manufacturers':
|
||||
$path = _PS_MANU_IMG_DIR_.(int)$id_entity;
|
||||
break;
|
||||
case 'suppliers':
|
||||
$path = _PS_SUPP_IMG_DIR_.(int)$id_entity;
|
||||
break;
|
||||
}
|
||||
$url = str_replace(' ', '%20', trim($url));
|
||||
|
||||
@@ -2370,6 +2377,11 @@ class AdminImportControllerCore extends AdminController
|
||||
if (!$res)
|
||||
$res = $manufacturer->add();
|
||||
|
||||
//copying images of manufacturer
|
||||
if (isset($manufacturer->image) && !empty($manufacturer->image))
|
||||
if (!AdminImportController::copyImg($manufacturer->id, null, $manufacturer->image, 'manufacturers', !Tools::getValue('regenerate')))
|
||||
$this->warnings[] = $manufacturer->image.' '.Tools::displayError('cannot be copied.');
|
||||
|
||||
if ($res)
|
||||
{
|
||||
// Associate supplier to group shop
|
||||
@@ -2443,6 +2455,11 @@ class AdminImportControllerCore extends AdminController
|
||||
if (!$res)
|
||||
$res = $supplier->add();
|
||||
|
||||
//copying images of suppliers
|
||||
if (isset($supplier->image) && !empty($supplier->image))
|
||||
if (!AdminImportController::copyImg($supplier->id, null, $supplier->image, 'suppliers', !Tools::getValue('regenerate')))
|
||||
$this->warnings[] = $supplier->image.' '.Tools::displayError('cannot be copied.');
|
||||
|
||||
if (!$res)
|
||||
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
@@ -3100,4 +3117,4 @@ class AdminImportControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -149,7 +149,7 @@ class ParentOrderControllerCore extends FrontController
|
||||
if ((Configuration::get('PS_ORDER_PROCESS_TYPE') == 0 && Tools::getValue('step') == 1) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
|
||||
$this->addJS(_THEME_JS_DIR_.'order-address.js');
|
||||
$this->addJqueryPlugin('fancybox');
|
||||
if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1)
|
||||
if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')) || Configuration::get('PS_ORDER_PROCESS_TYPE') == 1 || Tools::getValue('step') == 2)
|
||||
{
|
||||
$this->addJqueryPlugin('typewatch');
|
||||
$this->addJS(_THEME_JS_DIR_.'cart-summary.js');
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description
|
||||
1;1;Apple Computer, Inc;;;;;
|
||||
2;1;Shure Incorporated;;;;;
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description;Image URL
|
||||
1;1;Apple Computer, Inc;;;;;http://youdomain.com/img.jpg
|
||||
2;1;Shure Incorporated;;;;;http://youdomain.com/img.jpg
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
ID;Active (0/1);Name*;Categories (x,y,z,…);Price tax excl. Or Price tax excl;Tax rules id;Wholesale price;On sale (0/1);Discount amount;Discount percent;Discount from (yyy-mm-dd);Discount to (yyy-mm-dd);Reference #;Supplier reference #;Supplier;Manufacturer;EAN13;UPC;Ecotax;Width;Height;Depth;Weight;Quantity;Minimum quantity;Visibility;Additional shipping cost;Unity;Unity price ratio;Short description;Description;Tags (x,y,z,...);Meta-title;Meta-keywords;Meta-description;URL rewritten;Text when in-stock;Text if back-order allowed;Available for order (0 = No, 1 = Yes);Product available date;Product creation date;Show price (0 = No, 1 = Yes);Image URLs (x,y,z,...);Delete existing images (0 = No, 1 = Yes);Feature (Name:Value:Position);Available online only (0 = No, 1 = Yes);Condition (new,used,refurbished);Customizable;File fields;Text fields;Out of stock;Advanced stock management;ID / Name of shop
|
||||
1;1;iPod Nano;Home, iPods;49;1;40;0;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;5605055055056;560505505555;0;0,1;0,2;0,3;0.5;800;1;both;0.00;;0.00;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;Meta title;Meta keywords;Meta description;ipod-nano;In stock;Out stock;1;;;1;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;0;Music:Rock:1;0;new;0;0;0;2;0;1
|
||||
2;1;iPod shuffle;Home, iPods;66.05;1;50;0;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;5605055055057;560505505556;0;0,1;0,2;0,3;0.5;800;1;both;0.00;;0.00;iPod shuffle, the world’s most wearabl….;You want listen to music;ipod, shuffle;Meta title;Meta keywords;Meta description;ipod-shuffle;In stock;Out stock;1;;;1;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;0;Music:Blues:2;0;new;0;0;0;2;0;1
|
||||
1;1;iPod Nano;Home, iPods;49;1;40;0;;;;;92458844;54778855;AppleStore;Apple Computer, Inc;5605055055056;560505505555;0;1;2;3;0.5;800;1;both;0.00;;0.00;New design. New features. Now i….;Curved ahead of the curve. For those about to rock, we give you nine amazing colors. But that's only part of the story. Feel the curved, all-aluminum and glass de...;apple, ipod, nano;Meta title;Meta keywords;Meta description;ipod-nano;In stock;Out stock;1;;;1;http://youdomain.com/img.jpg, http://yourdomain.com/img1.jpg;0;Music:Rock:1;0;new;0;0;0;2;0;1
|
||||
2;1;iPod shuffle;Home, iPods;66.05;1;50;0;;;;;92458845;54778855;AppleStore;Apple Computer, Inc;5605055055057;560505505556;0;1;2;3;0.5;800;1;both;0.00;;0.00;iPod shuffle, the world’s most wearabl….;You want listen to music;ipod, shuffle;Meta title;Meta keywords;Meta description;ipod-shuffle;In stock;Out stock;1;;;1;http://youdomain.com/img25.jpg, http://yourdomain.com/img30.jpg;0;Music:Blues:2;0;new;0;0;0;2;0;1
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description
|
||||
1;1;Applestore;;;;;
|
||||
2;1;Shure Online Store;;;;;
|
||||
id;Active (0/1);Name*;Description;Short description;Meta-title;Meta-keywords;Meta-description;Image URL
|
||||
1;1;Applestore;;;;;http://youdomain.com/img.jpg
|
||||
2;1;Shure Online Store;;;;;http://youdomain.com/img.jpg
|
||||
|
||||
|
@@ -66,7 +66,7 @@ echo '
|
||||
<body>
|
||||
<form action="translate.php" method="post">
|
||||
<select name="iso" onchange="document.location = \'translate.php?iso=\'+this.value;">
|
||||
<option>-- Choose your language --</option>';
|
||||
<option>- Choose your language -</option>';
|
||||
foreach ($languages as $language)
|
||||
if (file_exists('../langs/'.$language.'/install.php'))
|
||||
echo '<option value="'.htmlspecialchars($language, ENT_COMPAT, 'utf-8').'" '.($iso == $language ? 'selected="selected"' : '').'>'.htmlspecialchars($language, ENT_NOQUOTES, 'utf-8').'</option>'."\n";
|
||||
|
||||
@@ -39,9 +39,27 @@ function update_customer_default_group()
|
||||
$str_old = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', '.(int)_PS_DEFAULT_CUSTOMER_GROUP_.');';
|
||||
$str_new = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', '.(int)$ps_customer_group.');';
|
||||
$content = str_replace($str_old, $str_new, $content);
|
||||
|
||||
$carriers = Db::getInstance()->executeS('
|
||||
SELECT `id_carrier`
|
||||
FROM `'._DB_PREFIX_.'carrier`
|
||||
WHERE `deleted` = 0');
|
||||
|
||||
$groups = Db::getInstance()->executeS('
|
||||
SELECT `value` as id_group
|
||||
FROM `'._DB_PREFIX_.'configuration`
|
||||
WHERE `name` IN (\'PS_UNIDENTIFIED_GROUP\', \'PS_GUEST_GROUP\')');
|
||||
|
||||
$result = false;
|
||||
if (count($carriers) && is_array($carriers) && count($groups) && is_array($groups))
|
||||
foreach ($carriers as $carrier)
|
||||
foreach ($groups as $group)
|
||||
Db::getInstance()->execute('
|
||||
INSERT IGNORE INTO `'._DB_PREFIX_.'carrier_group`
|
||||
VALUES ('.(int)$carrier['id_carrier'].', '.(int)$group['id_group'].')');
|
||||
|
||||
if(file_exists($filename) && is_writable($filename))
|
||||
$result = (bool)@file_put_contents($filename, $content);
|
||||
$result &= (bool)@file_put_contents($filename, $content);
|
||||
if($result === true && file_exists($filename) && file_exists($filename_old))
|
||||
{
|
||||
@unlink($filename_old);
|
||||
|
||||
+2
-2
@@ -385,7 +385,7 @@ function getAnchorListHTML(id, target) {
|
||||
html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
|
||||
+ ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
|
||||
+ '>'
|
||||
+ '<option value="">---</option>'
|
||||
+ '<option value="">-</option>'
|
||||
+ html
|
||||
+ '</select>';
|
||||
|
||||
@@ -494,7 +494,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
||||
if (typeof(onchange_func) != "undefined")
|
||||
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
||||
|
||||
html += '"><option value="">---</option>';
|
||||
html += '"><option value="">-</option>';
|
||||
|
||||
for (var i=0; i<tinyMCELinkList.length; i++)
|
||||
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@
|
||||
var html = "";
|
||||
|
||||
html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
|
||||
html += '<option value="">---</option>';
|
||||
html += '<option value="">-</option>';
|
||||
|
||||
for (var i=0; i<tinyMCEMediaList.length; i++)
|
||||
html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
|
||||
|
||||
+2
-2
@@ -385,7 +385,7 @@ function getAnchorListHTML(id, target) {
|
||||
html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
|
||||
+ ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
|
||||
+ '>'
|
||||
+ '<option value="">---</option>'
|
||||
+ '<option value="">-</option>'
|
||||
+ html
|
||||
+ '</select>';
|
||||
|
||||
@@ -494,7 +494,7 @@ function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
||||
if (typeof(onchange_func) != "undefined")
|
||||
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
||||
|
||||
html += '"><option value="">---</option>';
|
||||
html += '"><option value="">-</option>';
|
||||
|
||||
for (var i=0; i<tinyMCELinkList.length; i++)
|
||||
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
||||
|
||||
+1
-1
@@ -413,7 +413,7 @@
|
||||
var html = "";
|
||||
|
||||
html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
|
||||
html += '<option value="">---</option>';
|
||||
html += '<option value="">-</option>';
|
||||
|
||||
for (var i=0; i<tinyMCEMediaList.length; i++)
|
||||
html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
|
||||
|
||||
@@ -111,12 +111,13 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))
|
||||
{
|
||||
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
if (!Configuration::get('NEW_PRODUCTS_NBR'))
|
||||
return;
|
||||
$newProducts = Product::getNewProducts((int) $params['cookie']->id_lang, 0, (int) Configuration::get('NEW_PRODUCTS_NBR'));
|
||||
if (!$newProducts)
|
||||
$newProducts = false;
|
||||
if (Configuration::get('PS_NB_DAYS_NEW_PRODUCT'))
|
||||
$newProducts = Product::getNewProducts((int) $params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'));
|
||||
if (!$newProducts && !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
return;
|
||||
|
||||
$this->smarty->assign(array(
|
||||
'new_products' => $newProducts,
|
||||
'mediumSize' => Image::getSize(ImageType::getFormatedName('medium')),
|
||||
@@ -159,4 +160,4 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
$this->_clearCache('blocknewproducts.tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class BlockSpecials extends Module
|
||||
));
|
||||
}
|
||||
|
||||
return $this->display(__FILE__, 'blockspecials.tpl', $this->getCacheId('blockspecials|'.$random));
|
||||
return $this->display(__FILE__, 'blockspecials.tpl', (Configuration::get('BLOCKSPECIALS_NB_CACHES') ? $this->getCacheId('blockspecials|'.$random) : null));
|
||||
}
|
||||
|
||||
public function hookLeftColumn($params)
|
||||
|
||||
@@ -196,8 +196,8 @@ class DateOfDelivery extends Module
|
||||
|
||||
$id_carrier = (int)OrderInvoice::getCarrierId($order_invoice->id);
|
||||
$return = '';
|
||||
if ($datesDelivery = $this->_getDatesOfDelivery($id_carrier, $oos, $order_invoice->date_add))
|
||||
$return = sprintf($this->l('Approximate date of delivery is between %1$s and %2$s'), $datesDelivery[0], $datesDelivery[1]);
|
||||
if (($datesDelivery = $this->_getDatesOfDelivery($id_carrier, $oos, $order_invoice->date_add)) && isset($datesDelivery[0][0]) && isset($datesDelivery[1][0]))
|
||||
$return = sprintf($this->l('Approximate date of delivery is between %1$s and %2$s'), $datesDelivery[0][0], $datesDelivery[1][0]);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
require_once(dirname(__FILE__).'/../../init.php');
|
||||
|
||||
if (!Module::getInstanceByName('feeder')->active)
|
||||
exit;
|
||||
|
||||
// Get data
|
||||
$number = ((int)(Tools::getValue('n')) ? (int)(Tools::getValue('n')) : 10);
|
||||
$orderBy = Tools::getProductsOrder('by', Tools::getValue('orderby'));
|
||||
@@ -64,7 +67,7 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
if (is_array($image) AND sizeof($image))
|
||||
{
|
||||
$imageObj = new Image($image[0]['id_image']);
|
||||
echo "<![CDATA[<img src='"._PS_BASE_URL_._THEME_PROD_DIR_.$imageObj->getExistingImgPath()."-small_default.jpg' title='".str_replace('&', '', $product['name'])."' alt='thumb' />";
|
||||
echo "<![CDATA[<img src='".$link->getImageLink($product['link_rewrite'], $image[0]['id_image'], 'small_default')."' title='".str_replace('&', '', $product['name'])."' alt='thumb' />";
|
||||
$cdata = false;
|
||||
}
|
||||
if ($cdata)
|
||||
@@ -76,4 +79,4 @@ echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
}
|
||||
?>
|
||||
</channel>
|
||||
</rss>
|
||||
</rss>
|
||||
@@ -69,13 +69,13 @@ class importerosc extends ImportModule
|
||||
|
||||
$html .= '<label style=\'width:220px\'>'.$this->l('Default osCommerce language : ').'</label>
|
||||
<div class="margin-form">
|
||||
<select name=\'defaultOscLang\'><option value=\'0\'>------</option>';
|
||||
<select name=\'defaultOscLang\'><option value=\'0\'>-</option>';
|
||||
foreach($langagues AS $lang)
|
||||
$html .= '<option value="'.$lang['languages_id'].'">'.$lang['name'].'</option>';
|
||||
$html .= '</select></div>
|
||||
<label style=\'width:220px\'>'.$this->l('Default osCommerce currency : ').'</label>
|
||||
<div class=\'margin-form\'>
|
||||
<select name=\'defaultOscCurrency\'><option value=\'0\'>------</option>';
|
||||
<select name=\'defaultOscCurrency\'><option value=\'0\'>-</option>';
|
||||
foreach($curencies AS $curency)
|
||||
$html .= '<option value=\''.$curency['currencies_id'].'\'>'.$curency['title'].'</option>';
|
||||
$html .= '</select></div>';
|
||||
|
||||
@@ -561,7 +561,7 @@ class ProductComments extends Module
|
||||
<div class="margin-form">
|
||||
">
|
||||
<select name="id_product_comment_criterion" id="id_product_comment_criterion" onchange="window.location=\''.Tools::safeOutput($this->_baseUrl).'&updateCriterion=\'+$(\'#id_product_comment_criterion option:selected\').val()">
|
||||
<option value="--">-- '.$this->l('Choose a criterion').' --</option>';
|
||||
<option value="-">- '.$this->l('Choose a criterion').' -</option>';
|
||||
foreach ($criterions as $foo)
|
||||
$this->_html .= '<option value="'.(int)($foo['id_product_comment_criterion']).'" '.($foo['id_product_comment_criterion'] == $id_criterion ? 'selected="selected"' : '').'>'.$foo['name'].'</option>';
|
||||
$this->_html .= '</select>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if count($categoryProducts) > 0 && $categoryProducts !== false}
|
||||
{if isset($categoryProducts) && count($categoryProducts) > 0 && $categoryProducts !== false}
|
||||
<div class="clearfix blockproductscategory">
|
||||
<h2 class="productscategory_h2">{$categoryProducts|@count} {l s='other products in the same category:' mod='productscategory'}</h2>
|
||||
<div id="{if count($categoryProducts) > 5}productscategory{else}productscategory_noscroll{/if}">
|
||||
|
||||
@@ -333,7 +333,7 @@ class shopimporter extends ImportModule
|
||||
<label>'.$this->l('Choose your import').' : </label>
|
||||
<div class="margin-form">
|
||||
<select name="import_module_name" id="import_module_name">
|
||||
<option value="0">---</option>';
|
||||
<option value="0">-</option>';
|
||||
|
||||
foreach($exportModules as $key => $module)
|
||||
(($module->name != $this->name AND $module->id) ? $html .= '<option value="'.$module->name.'">'.$module->displayName.'</option>' : '' );
|
||||
|
||||
@@ -88,7 +88,7 @@ class StatsStock extends Module
|
||||
<form action="'.$ru.'" method="post">
|
||||
<input type="hidden" name="submitCategory" value="1" />
|
||||
'.$this->l('Category').' : <select name="statsstock_id_category" onchange="this.form.submit();">
|
||||
<option value="0">-- '.$this->l('All').' --</option>';
|
||||
<option value="0">- '.$this->l('All').' -</option>';
|
||||
foreach (Category::getSimpleCategories($this->context->language->id) as $category)
|
||||
$this->html .= '<option value="'.(int)$category['id_category'].'" '.
|
||||
($this->context->cookie->statsstock_id_category == $category['id_category'] ? 'selected="selected"' : '').'>'.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<description><![CDATA[Protect image by watermark.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<confirmUninstall>Are you sure you want to delete your details ?</confirmUninstall>
|
||||
<confirmUninstall>Are you sure you want to delete these details?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -94,8 +94,8 @@ $(function(){ldelim}
|
||||
<input type="text" class="text" name="dni" id="dni" value="{if isset($smarty.post.dni)}{$smarty.post.dni}{else}{if isset($address->dni)}{$address->dni|escape:'html'}{/if}{/if}" />
|
||||
<span class="form_info">{l s='DNI / NIF / NIE'}</span>
|
||||
</p>
|
||||
{assign var="stateExist" value="false"}
|
||||
{assign var="postCodeExist" value="false"}
|
||||
{assign var="stateExist" value=false}
|
||||
{assign var="postCodeExist" value=false}
|
||||
{foreach from=$ordered_adr_fields item=field_name}
|
||||
{if $field_name eq 'company'}
|
||||
<p class="text">
|
||||
@@ -138,7 +138,7 @@ $(function(){ldelim}
|
||||
</p>
|
||||
{/if}
|
||||
{if $field_name eq 'postcode'}
|
||||
{assign var="postCodeExist" value="true"}
|
||||
{assign var="postCodeExist" value=true}
|
||||
<p class="required postcode text">
|
||||
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
||||
<input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||
@@ -187,7 +187,7 @@ $(function(){ldelim}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $field_name eq 'State:name'}
|
||||
{assign var="stateExist" value="true"}
|
||||
{assign var="stateExist" value=true}
|
||||
<p class="required id_state select">
|
||||
<label for="id_state">{l s='State'} <sup>*</sup></label>
|
||||
<select name="id_state" id="id_state">
|
||||
@@ -196,13 +196,13 @@ $(function(){ldelim}
|
||||
</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $postCodeExist eq "false"}
|
||||
{if !$postCodeExist}
|
||||
<p class="required postcode text hidden">
|
||||
<label for="postcode">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
||||
<input type="text" id="postcode" name="postcode" value="{if isset($smarty.post.postcode)}{$smarty.post.postcode}{else}{if isset($address->postcode)}{$address->postcode|escape:'html'}{/if}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||
</p>
|
||||
{/if}
|
||||
{if $stateExist eq "false"}
|
||||
{if !$stateExist}
|
||||
<p class="required id_state select">
|
||||
<label for="id_state">{l s='State'} <sup>*</sup></label>
|
||||
<select name="id_state" id="id_state">
|
||||
|
||||
@@ -64,14 +64,14 @@ $(document).ready(function() {
|
||||
});
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
if (($('#company').length) && ($('#company').val() != ''))
|
||||
$('#vat_number').show();
|
||||
else
|
||||
$('#vat_number').hide();
|
||||
}
|
||||
function vat_number_invoice()
|
||||
{
|
||||
if ($('#company_invoice').val() != '')
|
||||
if (($('#company_invoice').length) && ($('#company_invoice').val() != ''))
|
||||
$('#vat_number_block_invoice').show();
|
||||
else
|
||||
$('#vat_number_block_invoice').hide();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
{/foreach}
|
||||
{else}
|
||||
<select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')">
|
||||
<option value="0">-- {l s='Subject Heading'} --</option>
|
||||
<option value="0">- {l s='Subject Heading'} -</option>
|
||||
{foreach from=$contacts item=contact}
|
||||
<option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"{/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
@@ -65,7 +65,7 @@
|
||||
{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
|
||||
<fieldset>
|
||||
{if !isset($customerThread.id_order) && isset($isLogged) && $isLogged == 1}
|
||||
<select name="id_order" ><option value="0">-- {l s='Order ID'} --</option>
|
||||
<select name="id_order" ><option value="0">- {l s='Order ID'} -</option>
|
||||
{foreach from=$orderList item=order}
|
||||
<option value="{$order.value|intval}" {if $order.selected|intval}selected="selected"{/if}>{$order.label|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
{if !isset($customerThread.id_product)}
|
||||
{foreach from=$orderedProductList key=id_order item=products name=products}
|
||||
<select name="id_product"><option value="0">-- {l s='Product'} --</option>
|
||||
<select name="id_product"><option value="0">- {l s='Product'} -</option>
|
||||
{foreach from=$products item=product}
|
||||
<option value="{$product.value|intval}">{$product.label|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
|
||||
@@ -74,14 +74,14 @@
|
||||
{literal}
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
if (($('#company').length) && ($('#company').val() != ''))
|
||||
$('#vat_number_block').show();
|
||||
else
|
||||
$('#vat_number_block').hide();
|
||||
}
|
||||
function vat_number_invoice()
|
||||
{
|
||||
if ($('#company_invoice').val() != '')
|
||||
if (($('#company_invoice').length) && ($('#company_invoice').val() != ''))
|
||||
$('#vat_number_block_invoice').show();
|
||||
else
|
||||
$('#vat_number_block_invoice').hide();
|
||||
@@ -206,7 +206,7 @@
|
||||
{elseif $field_name eq "address2"}
|
||||
<p class="text is_customer_param">
|
||||
<label for="address2">{l s='Address (Line 2)'}</label>
|
||||
<input type="text" class="text" name="address2" id="address2" value="" />
|
||||
<input type="text" class="text" name="address2" id="address2" value="{if isset($guestInformations) && $guestInformations.address2}{$guestInformations.address2}{/if}" />
|
||||
</p>
|
||||
{elseif $field_name eq "postcode"}
|
||||
{$postCodeExist = true}
|
||||
@@ -332,7 +332,7 @@
|
||||
{$postCodeExist = true}
|
||||
<p class="required postcode_invoice text">
|
||||
<label for="postcode_invoice">{l s='Zip / Postal Code'} <sup>*</sup></label>
|
||||
<input type="text" class="text" name="postcode_invoice" id="postcode_invoice" value="{if isset($guestInformations) && $guestInformations.postcode_invoice}{$guestInformations.postcode_invoice}{/if}" onkeyup="$('#postcode').val($('#postcode').val().toUpperCase());" />
|
||||
<input type="text" class="text" name="postcode_invoice" id="postcode_invoice" value="{if isset($guestInformations) && $guestInformations.postcode_invoice}{$guestInformations.postcode_invoice}{/if}" onkeyup="$('#postcode_invoice').val($('#postcode_invoice').val().toUpperCase());" />
|
||||
</p>
|
||||
{elseif $field_name eq "city"}
|
||||
<p class="required text">
|
||||
@@ -405,4 +405,4 @@
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user