Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/admin.css admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl admin-dev/themes/default/template/controllers/categories/helpers/form/form.tpl admin-dev/themes/default/template/controllers/home/content.tpl admin-dev/themes/default/template/controllers/localization/content.tpl admin-dev/themes/default/template/controllers/orders/_customized_data.tpl admin-dev/themes/default/template/controllers/orders/_new_product.tpl admin-dev/themes/default/template/controllers/orders/_product_line.tpl admin-dev/themes/default/template/controllers/orders/helpers/view/view.tpl admin-dev/themes/default/template/controllers/tax_rules/helpers/list/list_header.tpl admin-dev/themes/default/template/footer.tpl controllers/admin/AdminCarrierWizardController.php controllers/admin/AdminCarriersController.php controllers/admin/AdminCmsController.php controllers/admin/AdminLocalizationController.php controllers/admin/AdminManufacturersController.php controllers/admin/AdminSuppliersController.php css/admin.css js/admin-products.js js/admin_carrier_wizard.js translations/fr.gzip
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockadvertising</name>
|
||||
<displayName><![CDATA[Bloc publicité]]></displayName>
|
||||
<displayName><![CDATA[Block advertising]]></displayName>
|
||||
<version><![CDATA[0.5]]></version>
|
||||
<description><![CDATA[Ajoute un bloc affichant une publicité]]></description>
|
||||
<description><![CDATA[Adds an advertisement block to selected sections of your e-commerce webiste.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -214,26 +214,46 @@ var ajaxCart = {
|
||||
$element = $('#bigpic');
|
||||
var $picture = $element.clone();
|
||||
var pictureOffsetOriginal = $element.offset();
|
||||
pictureOffsetOriginal.right = $(window).innerWidth() - pictureOffsetOriginal.left - $element.width();
|
||||
|
||||
if ($picture.size())
|
||||
$picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left});
|
||||
if ($picture.length)
|
||||
{
|
||||
$picture.css({
|
||||
position: 'absolute',
|
||||
top: pictureOffsetOriginal.top,
|
||||
right: pictureOffsetOriginal.right
|
||||
});
|
||||
}
|
||||
|
||||
var pictureOffset = $picture.offset();
|
||||
if ($('#cart_block')[0] && $('#cart_block').offset().top && $('#cart_block').offset().left)
|
||||
var cartBlockOffset = $('#cart_block').offset();
|
||||
else
|
||||
var cartBlockOffset = $('#shopping_cart').offset();
|
||||
var cartBlock = $('#cart_block');
|
||||
if (!$('#cart_block')[0] || !$('#cart_block').offset().top || !$('#cart_block').offset().left)
|
||||
cartBlock = $('#shopping_cart');
|
||||
var cartBlockOffset = cartBlock.offset();
|
||||
cartBlockOffset.right = $(window).innerWidth() - cartBlockOffset.left - cartBlock.width();
|
||||
|
||||
// Check if the block cart is activated for the animation
|
||||
if (cartBlockOffset != undefined && $picture.size())
|
||||
if (cartBlockOffset != undefined && $picture.length)
|
||||
{
|
||||
$picture.appendTo('body');
|
||||
$picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 })
|
||||
.animate({ 'width': $element.attr('width')*0.66, 'height': $element.attr('height')*0.66, 'opacity': 0.2, 'top': cartBlockOffset.top + 30, 'left': cartBlockOffset.left + 15 }, 1000)
|
||||
.fadeOut(100, function() {
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
$(this).remove();
|
||||
});
|
||||
$picture
|
||||
.css({
|
||||
position: 'absolute',
|
||||
top: pictureOffsetOriginal.top,
|
||||
right: pictureOffsetOriginal.right,
|
||||
zIndex: 4242
|
||||
})
|
||||
.animate({
|
||||
width: $element.attr('width')*0.66,
|
||||
height: $element.attr('height')*0.66,
|
||||
opacity: 0.2,
|
||||
top: cartBlockOffset.top + 30,
|
||||
right: cartBlockOffset.right + 15
|
||||
}, 1000)
|
||||
.fadeOut(100, function() {
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
else
|
||||
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockcart</name>
|
||||
<displayName><![CDATA[Bloc panier]]></displayName>
|
||||
<displayName><![CDATA[Cart block]]></displayName>
|
||||
<version><![CDATA[1.2]]></version>
|
||||
<description><![CDATA[Ajoute un bloc avec le contenu du panier du client]]></description>
|
||||
<description><![CDATA[Adds a block containing the customer's shopping cart.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
*}
|
||||
|
||||
<li {if isset($last) && $last == 'true'}class="last"{/if}>
|
||||
<a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|strip_tags|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>
|
||||
<a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if}
|
||||
title="{$node.desc|strip_tags|trim|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a>
|
||||
{if $node.children|@count > 0}
|
||||
<ul>
|
||||
{foreach from=$node.children item=child name=categoryTreeBranch}
|
||||
|
||||
@@ -757,7 +757,7 @@ class BlockCms extends Module
|
||||
//get all cmd block to duplicate in new shop
|
||||
$cms_blocks = Db::getInstance()->executeS('
|
||||
SELECT * FROM `'._DB_PREFIX_.'cms_block` cb
|
||||
LEFT JOIN `'._DB_PREFIX_.'cms_block_shop` cbf
|
||||
JOIN `'._DB_PREFIX_.'cms_block_shop` cbf
|
||||
ON (cb.`id_cms_block` = cbf.`id_cms_block` AND cbf.`id_shop` = '.(int)$params['old_id_shop'].') ');
|
||||
|
||||
if (count($cms_blocks))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,7 @@ param_product_url = '';
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" />
|
||||
<input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" />
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
@@ -115,7 +115,7 @@ param_product_url = '';
|
||||
{if $value.nbr || !$hide_0_values}
|
||||
<li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if}">
|
||||
{if isset($filter.is_color_group) && $filter.is_color_group}
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};"/>
|
||||
<input class="radio color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($col_img_dir|cat:$id_value|cat:'.jpg')}url({$img_col_dir}{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};"/>
|
||||
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
|
||||
{else}
|
||||
<input type="radio" class="radio layered_{$filter.type_lite}_{$id_value}" name="layered_{$filter.type_lite}{if $filter.id_key}_{$filter.id_key}{else}_1{/if}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blocklayered</name>
|
||||
<displayName><![CDATA[Bloc navigation à facettes]]></displayName>
|
||||
<displayName><![CDATA[Layered navigation block]]></displayName>
|
||||
<version><![CDATA[1.8.9]]></version>
|
||||
<description><![CDATA[Affiche un bloc avec les filtres de la navigation à facettes]]></description>
|
||||
<description><![CDATA[Displays a block with layered navigation filters.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockmanufacturer</name>
|
||||
<displayName><![CDATA[Bloc fabricant]]></displayName>
|
||||
<displayName><![CDATA[Manufacturers block]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[Ajoute un bloc avec les fabricants/marques]]></description>
|
||||
<description><![CDATA[Displays a block listing product manufacturers and/or brands.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* block myaccount */
|
||||
.myaccount ul {margin-bottom:10px}
|
||||
.myaccount li {border-bottom: 1px solid #eee}
|
||||
.myaccount ul {margin-bottom:10px;}
|
||||
.myaccount .bullet .icon {display: none;}
|
||||
.myaccount li {border-bottom: 1px solid #eee;}
|
||||
.myaccount li a {
|
||||
display: block;
|
||||
padding: 7px 11px 5px 22px;
|
||||
@@ -10,16 +11,14 @@
|
||||
.myaccount p.logout {
|
||||
padding-bottom:0;
|
||||
font-weight:bold;
|
||||
text-align:right
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
/* block myaccount in footer */
|
||||
#footer .myaccount .title_block, #footer .myaccount h4 {background: none;}
|
||||
#footer .myaccount .logout {display:none;}
|
||||
#footer .myaccount .title_block, #footer .myaccount h4 {
|
||||
padding:0 0 10px 0;
|
||||
background:none
|
||||
background:none;
|
||||
}
|
||||
#footer .myaccount ul {margin-bottom:0}
|
||||
#footer .myaccount li {border-bottom:none}
|
||||
@@ -27,7 +26,6 @@
|
||||
display: block;
|
||||
padding:0;
|
||||
color: #fff;
|
||||
background: none
|
||||
}
|
||||
#footer .myaccount li.lnk_wishlist img {display:none
|
||||
background: none;
|
||||
}
|
||||
#footer .myaccount li.lnk_wishlist img {display:none;}
|
||||
@@ -111,7 +111,10 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
if (!$this->isCached('blocknewproducts.tpl', $this->getCacheId()))
|
||||
{
|
||||
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY') && !($newProducts = Product::getNewProducts((int)$params['cookie']->id_lang, 0, (int)Configuration::get('NEW_PRODUCTS_NBR'))))
|
||||
if (!Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
return;
|
||||
$newProducts = Product::getNewProducts((int) $params['cookie']->id_lang, 0, (int) Configuration::get('NEW_PRODUCTS_NBR'));
|
||||
if (!$newProducts)
|
||||
return;
|
||||
|
||||
$this->smarty->assign(array(
|
||||
@@ -151,4 +154,4 @@ class BlockNewProducts extends Module
|
||||
{
|
||||
$this->_clearCache('blocknewproducts.tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blocknewsletter</name>
|
||||
<displayName><![CDATA[Bloc newsletter]]></displayName>
|
||||
<displayName><![CDATA[Newsletter block]]></displayName>
|
||||
<version><![CDATA[1.4]]></version>
|
||||
<description><![CDATA[Ajoute un bloc newsletter pour vos clients]]></description>
|
||||
<description><![CDATA[Adds a block for newsletter subscription.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<confirmUninstall>Êtes-vous sûr de vouloir supprimer tous vos contacts ?</confirmUninstall>
|
||||
<confirmUninstall>Are you sure that you want to delete all of your contacts?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockrss</name>
|
||||
<displayName><![CDATA[Bloc flux RSS]]></displayName>
|
||||
<displayName><![CDATA[RSS feed block]]></displayName>
|
||||
<version><![CDATA[1.1]]></version>
|
||||
<description><![CDATA[Ajoute un bloc avec les messages d'un flux RSS.]]></description>
|
||||
<description><![CDATA[Adds a block displaying an RSS feed.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -80,23 +80,24 @@ public function hookDisplayMobileHeader($params)
|
||||
|
||||
public function hookRightColumn($params)
|
||||
{
|
||||
if (!$this->isCached('blocksearch.tpl', $this->getCacheId()))
|
||||
|
||||
if (Tools::getValue('search_query') || !$this->isCached('blocksearch.tpl', $this->getCacheId()))
|
||||
{
|
||||
$this->calculHookCommon($params);
|
||||
$this->smarty->assign('blocksearch_type', 'block');
|
||||
}
|
||||
return $this->display(__FILE__, 'blocksearch.tpl', $this->getCacheId());
|
||||
return $this->display(__FILE__, 'blocksearch.tpl', Tools::getValue('search_query') ? null : $this->getCacheId());
|
||||
}
|
||||
|
||||
public function hookTop($params)
|
||||
{
|
||||
if (!$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
|
||||
if (Tools::getValue('search_query') || !$this->isCached('blocksearch-top.tpl', $this->getCacheId('blocksearch-top')))
|
||||
{
|
||||
$this->calculHookCommon($params);
|
||||
$this->smarty->assign('blocksearch_type', 'top');
|
||||
}
|
||||
|
||||
return $this->display(__FILE__, 'blocksearch-top.tpl', $this->getCacheId('blocksearch-top'));
|
||||
return $this->display(__FILE__, 'blocksearch-top.tpl', Tools::getValue('search_query') ? null : $this->getCacheId('blocksearch-top'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
<form method="get" action="{$link->getPageLink('search', true)|escape:'html'}" id="searchbox">
|
||||
<p class="block_content">
|
||||
<label for="search_query_block">{l s='Enter a product name or description.' mod='blocksearch'}</label>
|
||||
<input type="hidden" name="orderby" value="position" />
|
||||
<input type="hidden" name="controller" value="search" />
|
||||
<input type="hidden" name="orderby" value="position" />
|
||||
<input type="hidden" name="orderway" value="desc" />
|
||||
<input class="search_query" type="text" id="search_query_block" name="search_query" value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|htmlentities:$ENT_QUOTES:'utf-8'|stripslashes}{/if}" />
|
||||
<input type="submit" id="search_button" class="button_mini" value="{l s='Go!' mod='blocksearch'}" />
|
||||
|
||||
@@ -92,13 +92,15 @@ class BlockStore extends Module
|
||||
return $this->displayError($this->l('Invalid image'));
|
||||
else
|
||||
{
|
||||
if (!move_uploaded_file($_FILES['store_img']['tmp_name'], dirname(__FILE__).'/'.$_FILES['store_img']['name']))
|
||||
$ext = substr($_FILES['store_img']['name'], strrpos($_FILES['store_img']['name'], '.') + 1);
|
||||
$file_name = md5($_FILES['store_img']['name']).'.'.$ext;
|
||||
if (!move_uploaded_file($_FILES['store_img']['tmp_name'], dirname(__FILE__).'/'.$file_name))
|
||||
return $this->displayError($this->l('An error occurred while attempting to upload the file.'));
|
||||
else
|
||||
{
|
||||
if (Configuration::hasContext('BLOCKSTORE_IMG', null, Shop::getContext()) && Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name'])
|
||||
if (Configuration::hasContext('BLOCKSTORE_IMG', null, Shop::getContext()) && Configuration::get('BLOCKSTORE_IMG') != $file_name)
|
||||
@unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG'));
|
||||
Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']);
|
||||
Configuration::updateValue('BLOCKSTORE_IMG', $file_name);
|
||||
$this->_clearCache('blockstore.tpl');
|
||||
return $this->displayConfirmation($this->l('The settings have been updated.'));
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="block_content blockstore">
|
||||
<p class="store_image"><a href="{$link->getPageLink('stores')|escape:'html'}" title="{l s='Our store(s)!' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our store(s)!' mod='blockstore'}" width="174" height="115" /></a></p>
|
||||
<p>
|
||||
<a href="{$link->getPageLink('stores')|escape:'html'}" title="{l s='Our store(s)!' mod='blockstore'}">» {l s='Discover our store(s)d!' mod='blockstore'}</a>
|
||||
<a href="{$link->getPageLink('stores')|escape:'html'}" title="{l s='Our store(s)!' mod='blockstore'}">» {l s='Discover our store(s)!' mod='blockstore'}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ class Blocktopmenu extends Module
|
||||
{
|
||||
$this->name = 'blocktopmenu';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = 1.5;
|
||||
$this->version = 1.6;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
@@ -69,6 +69,7 @@ class Blocktopmenu extends Module
|
||||
!Configuration::updateGlobalValue('MOD_BLOCKTOPMENU_SEARCH', '1') ||
|
||||
!$this->registerHook('actionObjectCategoryUpdateAfter') ||
|
||||
!$this->registerHook('actionObjectCategoryDeleteAfter') ||
|
||||
!$this->registerHook('actionObjectCategoryAddAfter') ||
|
||||
!$this->registerHook('actionObjectCmsUpdateAfter') ||
|
||||
!$this->registerHook('actionObjectCmsDeleteAfter') ||
|
||||
!$this->registerHook('actionObjectSupplierUpdateAfter') ||
|
||||
@@ -220,6 +221,8 @@ class Blocktopmenu extends Module
|
||||
|
||||
// BEGIN SUPPLIER
|
||||
$this->_html .= '<optgroup label="'.$this->l('Supplier').'">';
|
||||
// Option to show all Suppliers
|
||||
$this->_html .= '<option value="ALLSUP0">'.$this->l('All suppliers').'</option>';
|
||||
$suppliers = Supplier::getSuppliers(false, $id_lang);
|
||||
foreach ($suppliers as $supplier)
|
||||
$this->_html .= '<option value="SUP'.$supplier['id_supplier'].'">'.$spacer.$supplier['name'].'</option>';
|
||||
@@ -227,6 +230,8 @@ class Blocktopmenu extends Module
|
||||
|
||||
// BEGIN Manufacturer
|
||||
$this->_html .= '<optgroup label="'.$this->l('Manufacturer').'">';
|
||||
// Option to show all Manufacturers
|
||||
$this->_html .= '<option value="ALLMAN0">'.$this->l('All manufacturers').'</option>';
|
||||
$manufacturers = Manufacturer::getManufacturers(false, $id_lang);
|
||||
foreach ($manufacturers as $manufacturer)
|
||||
$this->_html .= '<option value="MAN'.$manufacturer['id_manufacturer'].'">'.$spacer.$manufacturer['name'].'</option>';
|
||||
@@ -471,12 +476,22 @@ class Blocktopmenu extends Module
|
||||
$this->_html .= '<option value="CMS_CAT'.$id.'">'.$category->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Manufacturers
|
||||
case 'ALLMAN':
|
||||
$this->_html .= '<option value="ALLMAN0">'.$this->l('All manufacturers').'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
case 'MAN':
|
||||
$manufacturer = new Manufacturer((int)$id, (int)$id_lang);
|
||||
if (Validate::isLoadedObject($manufacturer))
|
||||
$this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Suppliers
|
||||
case 'ALLSUP':
|
||||
$this->_html .= '<option value="ALLSUP0">'.$this->l('All suppliers').'</option>'.PHP_EOL;
|
||||
break;
|
||||
|
||||
case 'SUP':
|
||||
$supplier = new Supplier((int)$id, (int)$id_lang);
|
||||
if (Validate::isLoadedObject($supplier))
|
||||
@@ -548,6 +563,16 @@ class Blocktopmenu extends Module
|
||||
}
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Manufacturers
|
||||
case 'ALLMAN':
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li><a href="'.$link->getPageLink('manufacturer').'">'.$this->l('All manufacturers').'</a><ul>'.PHP_EOL;
|
||||
$manufacturers = Manufacturer::getManufacturers();
|
||||
foreach ($manufacturers as $key => $manufacturer)
|
||||
$this->_menu .= '<li><a href="'.$link->getManufacturerLink((int)$manufacturer['id_manufacturer'], $manufacturer['link_rewrite']).'">'.$manufacturer['name'].'</a></li>'.PHP_EOL;
|
||||
$this->_menu .= '</ul>';
|
||||
break;
|
||||
|
||||
case 'MAN':
|
||||
$selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';
|
||||
$manufacturer = new Manufacturer((int)$id, (int)$id_lang);
|
||||
@@ -562,6 +587,16 @@ class Blocktopmenu extends Module
|
||||
}
|
||||
break;
|
||||
|
||||
// Case to handle the option to show all Suppliers
|
||||
case 'ALLSUP':
|
||||
$link = new Link;
|
||||
$this->_menu .= '<li><a href="'.$link->getPageLink('supplier').'">'.$this->l('All suppliers').'</a><ul>'.PHP_EOL;
|
||||
$suppliers = Supplier::getSuppliers();
|
||||
foreach ($suppliers as $key => $supplier)
|
||||
$this->_menu .= '<li><a href="'.$link->getSupplierLink((int)$supplier['id_supplier'], $supplier['link_rewrite']).'">'.$supplier['name'].'</a></li>'.PHP_EOL;
|
||||
$this->_menu .= '</ul>';
|
||||
break;
|
||||
|
||||
case 'SUP':
|
||||
$selected = ($this->page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : '';
|
||||
$supplier = new Supplier((int)$id, (int)$id_lang);
|
||||
@@ -797,7 +832,11 @@ class Blocktopmenu extends Module
|
||||
|
||||
return Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
|
||||
public function hookActionObjectCategoryAddAfter($params)
|
||||
{
|
||||
$this->clearMenuCache();
|
||||
}
|
||||
|
||||
public function hookActionObjectCategoryUpdateAfter($params)
|
||||
{
|
||||
@@ -891,4 +930,4 @@ class Blocktopmenu extends Module
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>blocktopmenu</name>
|
||||
<displayName><![CDATA[Top horizontal menu]]></displayName>
|
||||
<version><![CDATA[1.5]]></version>
|
||||
<version><![CDATA[1.6]]></version>
|
||||
<description><![CDATA[Add a new horizontal menu to the top of your e-commerce website.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_6($object)
|
||||
{
|
||||
return ($object->registerHook('actionObjectCategoryAddAfter'));
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockviewed</name>
|
||||
<displayName><![CDATA[Bloc produits déjà vus]]></displayName>
|
||||
<displayName><![CDATA[Viewed products block.]]></displayName>
|
||||
<version><![CDATA[0.9]]></version>
|
||||
<description><![CDATA[Ajoute un bloc proposant les derniers produits vus par le client.]]></description>
|
||||
<description><![CDATA[Adds a block displaying recently viewed products.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<!-- MODULE WishList -->
|
||||
<li class="lnk_wishlist">
|
||||
<a href="{$wishlist_link}" title="{l s='My wishlists' mod='blockwishlist'}">
|
||||
<img src="{$module_template_dir}img/gift.gif" alt="{l s='My wishlists' mod='blockwishlist'}" class="icon" />
|
||||
{l s='My wishlists' mod='blockwishlist'}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -72,7 +72,7 @@ class CarrierCompare extends Module
|
||||
$this->postProcess();
|
||||
|
||||
$this->smarty->assign('refresh_method', Configuration::get('SE_RERESH_METHOD'));
|
||||
return $this->smarty->fetch($this->template_directory .'configuration.tpl');
|
||||
return $this->display(__FILE__, 'template/configuration.tpl');
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
@@ -155,7 +155,7 @@ class CarrierCompare extends Module
|
||||
'refresh_method' => ($refresh_method === false) ? 0 : $refresh_method
|
||||
));
|
||||
|
||||
return $this->smarty->fetch($this->template_directory.'carriercompare.tpl');
|
||||
return $this->display(__FILE__, 'template/carriercompare.tpl');
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>crossselling</name>
|
||||
<displayName><![CDATA[Cross Selling]]></displayName>
|
||||
<version><![CDATA[0.7]]></version>
|
||||
<description><![CDATA[Customers who bought this product also bought:]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<module>
|
||||
<name>crossselling</name>
|
||||
<displayName><![CDATA[Cross Selling]]></displayName>
|
||||
<version><![CDATA[0.7]]></version>
|
||||
<description><![CDATA[Customers who bought this product also bought:]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
</module>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>dateofdelivery</name>
|
||||
<displayName><![CDATA[Date de livraison]]></displayName>
|
||||
<displayName><![CDATA[Date of delivery]]></displayName>
|
||||
<version><![CDATA[1.1]]></version>
|
||||
<description><![CDATA[Afficher une date approximative de livraison]]></description>
|
||||
<description><![CDATA[Displays an approximate date of delivery]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[shipping_logistics]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>followup</name>
|
||||
<displayName><![CDATA[Relancez vos clients]]></displayName>
|
||||
<displayName><![CDATA[Customer follow-up]]></displayName>
|
||||
<version><![CDATA[1.0]]></version>
|
||||
<description><![CDATA[Relancez vos clients grâce à des envoi d'e-mails quotidiens]]></description>
|
||||
<description><![CDATA[Follow-up with your customers with daily customized e-mails.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<confirmUninstall>Etes-vous sûr de vouloir supprimer vos paramètres ainsi que vos statistiques liées aux relances ?</confirmUninstall>
|
||||
<confirmUninstall>Are you sure you want to delete all settings and your logs?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>homefeatured</name>
|
||||
<displayName><![CDATA[Produits phares sur la page d'accueil]]></displayName>
|
||||
<displayName><![CDATA[Featured products on the homepage.]]></displayName>
|
||||
<version><![CDATA[1.1]]></version>
|
||||
<description><![CDATA[Affiche les produits phares au centre de votre page d'accueil]]></description>
|
||||
<description><![CDATA[Displays featured products in the middle of your homepage.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -16,9 +16,9 @@ function upgrade_module_1_2_1($object)
|
||||
|
||||
function homeslider_stripslashes_field($field)
|
||||
{
|
||||
$quotes = array('\'\\\\\'\'', '\'\\\'\'');
|
||||
$dquotes = array('\'\\"\'', '\'"\'');
|
||||
$backslashes = array('\'\\\\\'', '\'\\\'');
|
||||
$quotes = array('"\\\'"', '"\'"');
|
||||
$dquotes = array('\'\\\\"\'', '\'"\'');
|
||||
$backslashes = array('"\\\\\\\\"', '"\\\\"');
|
||||
|
||||
return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')';
|
||||
}
|
||||
@@ -224,7 +224,7 @@ class importerosc extends ImportModule
|
||||
$keyLanguage = 'id_lang';
|
||||
$identifier = 'id_category';
|
||||
$categories = $this->executeS('
|
||||
SELECT c.categories_id as id_category, c.parent_id as id_parent, level as level_depth, cd.language_id as id_lang, cd.categories_name as name , 1 as active, categories_image as images
|
||||
SELECT c.categories_id as id_category, c.parent_id as id_parent, level as level_depth, cd.language_id as id_lang, cd.categories_name as name , 1 as active, categories_image as images, c.date_added as date_add
|
||||
FROM `'.bqSQL($this->prefix).'categories` c
|
||||
LEFT JOIN `'.bqSQL($this->prefix).'categories_description` cd ON (c.categories_id = cd.categories_id)
|
||||
WHERE cd.categories_name IS NOT NULL AND cd.language_id IS NOT NULL
|
||||
|
||||
@@ -36,6 +36,8 @@ class MailAlert extends ObjectModel
|
||||
|
||||
public $id_shop;
|
||||
|
||||
public $id_lang;
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
@@ -47,15 +49,19 @@ class MailAlert extends ObjectModel
|
||||
'customer_email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true),
|
||||
'id_product' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_product_attribute' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true)
|
||||
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true),
|
||||
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true)
|
||||
),
|
||||
);
|
||||
|
||||
public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null)
|
||||
public static function customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop = null, $id_lang = null)
|
||||
{
|
||||
if ($id_shop == null)
|
||||
$id_shop = Context::getContext()->shop->id;
|
||||
|
||||
if ($id_lang == null)
|
||||
$id_lang = Context::getContext()->language->id;
|
||||
|
||||
$customer = new Customer($id_customer);
|
||||
$customer_email = $customer->email;
|
||||
|
||||
@@ -70,14 +76,15 @@ class MailAlert extends ObjectModel
|
||||
return count(Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql));
|
||||
}
|
||||
|
||||
public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute)
|
||||
public static function deleteAlert($id_customer, $customer_email, $id_product, $id_product_attribute, $id_shop)
|
||||
{
|
||||
$sql = '
|
||||
DELETE FROM `'._DB_PREFIX_.self::$definition['table'].'`
|
||||
WHERE '.(($id_customer > 0) ? '(`customer_email` = \''.pSQL($customer_email).'\' OR `id_customer` = '.(int)$id_customer.')' :
|
||||
'`customer_email` = \''.pSQL($customer_email).'\'').
|
||||
' AND `id_product` = '.(int)$id_product.'
|
||||
AND `id_product_attribute` = '.(int)$id_product_attribute;
|
||||
AND `id_product_attribute` = '.(int)$id_product_attribute.'
|
||||
AND `id_shop` = '.(int)$id_shop;
|
||||
|
||||
return Db::getInstance()->execute($sql);
|
||||
}
|
||||
@@ -160,17 +167,23 @@ class MailAlert extends ObjectModel
|
||||
public static function sendCustomerAlert($id_product, $id_product_attribute)
|
||||
{
|
||||
$link = new Link();
|
||||
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$product = new Product((int)$id_product, false, $id_lang);
|
||||
$templateVars = array(
|
||||
'{product}' => (is_array($product->name) ? $product->name[$id_lang] : $product->name),
|
||||
'{product_link}' => $link->getProductLink($product)
|
||||
);
|
||||
|
||||
$context = Context::getContext()->cloneContext();
|
||||
$customers = self::getCustomers($id_product, $id_product_attribute);
|
||||
|
||||
foreach ($customers as $customer)
|
||||
{
|
||||
$id_shop = (int)$customer['id_shop'];
|
||||
$id_lang = (int)$customer['id_lang'];
|
||||
$context->shop->id = $id_shop;
|
||||
$context->language->id = $id_lang;
|
||||
|
||||
$product = new Product((int)$id_product, false, $id_lang, $id_shop);
|
||||
$product_link = $link->getProductLink($product, $product->link_rewrite, null, null, $id_lang, $id_shop);
|
||||
$templateVars = array(
|
||||
'{product}' => (is_array($product->name) ? $product->name[$id_lang] : $product->name),
|
||||
'{product_link}' => $product_link
|
||||
);
|
||||
|
||||
if ($customer['id_customer'])
|
||||
{
|
||||
$customer = new Customer((int)$customer['id_customer']);
|
||||
@@ -182,14 +195,30 @@ class MailAlert extends ObjectModel
|
||||
$customer_id = 0;
|
||||
$customer_email = $customer['customer_email'];
|
||||
}
|
||||
|
||||
$iso = Language::getIsoById($id_lang);
|
||||
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.txt') &&
|
||||
file_exists(dirname(__FILE__).'/mails/'.$iso.'/customer_qty.html'))
|
||||
Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'customer_qty', Mail::l('Product available', $id_lang), $templateVars, strval($customer_email), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
Mail::Send(
|
||||
$id_lang,
|
||||
'customer_qty',
|
||||
Mail::l('Product available', $id_lang),
|
||||
$templateVars,
|
||||
strval($customer_email),
|
||||
NULL,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL', null, null, $id_shop)),
|
||||
strval(Configuration::get('PS_SHOP_NAME', null, null, $id_shop)),
|
||||
NULL,
|
||||
NULL,
|
||||
dirname(__FILE__).'/mails/',
|
||||
false,
|
||||
$id_shop
|
||||
);
|
||||
|
||||
Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $link->getProductLink($product), 'customer' => $customer, 'product_obj' => $product));
|
||||
self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute);
|
||||
Hook::exec('actionModuleMailAlertSendCustomer', array('product' => (is_array($product->name) ? $product->name[$id_lang] : $product->name), 'link' => $product_link, 'customer' => $customer, 'product_obj' => $product));
|
||||
|
||||
self::deleteAlert((int)$customer_id, strval($customer_email), (int)$id_product, (int)$id_product_attribute, $id_shop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +273,7 @@ class MailAlert extends ObjectModel
|
||||
public static function getCustomers($id_product, $id_product_attribute)
|
||||
{
|
||||
$sql = '
|
||||
SELECT id_customer, customer_email
|
||||
SELECT id_customer, customer_email, id_shop, id_lang
|
||||
FROM `'._DB_PREFIX_.self::$definition['table'].'`
|
||||
WHERE `id_product` = '.(int)$id_product.' AND `id_product_attribute` = '.(int)$id_product_attribute;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>mailalerts</name>
|
||||
<displayName><![CDATA[Alertes email]]></displayName>
|
||||
<displayName><![CDATA[Mail alerts]]></displayName>
|
||||
<version><![CDATA[2.4]]></version>
|
||||
<description><![CDATA[Envoie des notifications par e-mail aux clients et aux marchands.]]></description>
|
||||
<description><![CDATA[Sends e-mail notifications to customers and merchants.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<confirmUninstall>Etes-vous sûr de vouloir supprimer toutes les notifications clients ?</confirmUninstall>
|
||||
<confirmUninstall>Are you sure you want to delete all customer notifications?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -64,8 +64,10 @@ class MailalertsActionsModuleFrontController extends ModuleFrontController
|
||||
if (!Validate::isLoadedObject($product))
|
||||
die('0');
|
||||
|
||||
if (MailAlert::deleteAlert((int)Context::getContext()->customer->id, (int)Context::getContext()->customer->email, (int)$product->id, (int)$this->id_product_attribute))
|
||||
$context = Context::getContext();
|
||||
if (MailAlert::deleteAlert((int)$context->customer->id, (int)$context->customer->email, (int)$product->id, (int)$this->id_product_attribute))
|
||||
die('0');
|
||||
|
||||
die(1);
|
||||
}
|
||||
|
||||
@@ -74,29 +76,32 @@ class MailalertsActionsModuleFrontController extends ModuleFrontController
|
||||
*/
|
||||
public function processAdd()
|
||||
{
|
||||
if (Context::getContext()->customer->isLogged())
|
||||
$context = Context::getContext();
|
||||
|
||||
if ($context->customer->isLogged())
|
||||
{
|
||||
$id_customer = (int)Context::getContext()->customer->id;
|
||||
$id_customer = (int)$context->customer->id;
|
||||
$customer = new Customer($id_customer);
|
||||
$customer_email = strval($customer->email);
|
||||
}
|
||||
else
|
||||
{
|
||||
$customer_email = strval(Tools::getValue('customer_email'));
|
||||
$customer = Context::getContext()->customer->getByEmail($customer_email);
|
||||
$customer = $context->customer->getByEmail($customer_email);
|
||||
$id_customer = (isset($customer->id) && ($customer->id != null)) ? (int)$customer->id : null;
|
||||
}
|
||||
|
||||
$id_product = (int)Tools::getValue('id_product');
|
||||
$id_product_attribute = (int)Tools::getValue('id_product_attribute');
|
||||
$id_shop = (int)Context::getContext()->shop->id;
|
||||
$product = new Product($id_product, null, null, $id_shop, Context::getContext());
|
||||
$id_shop = (int)$context->shop->id;
|
||||
$id_lang = (int)$context->language->id;
|
||||
$product = new Product($id_product, false, $id_lang, $id_shop, $context);
|
||||
|
||||
$mailAlert = MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute, $id_shop);
|
||||
|
||||
if ($mailAlert)
|
||||
die('2');
|
||||
else if (!Validate::isLoadedObject($product))
|
||||
elseif (!Validate::isLoadedObject($product))
|
||||
die('0');
|
||||
|
||||
$mailAlert = new MailAlert();
|
||||
@@ -106,10 +111,11 @@ class MailalertsActionsModuleFrontController extends ModuleFrontController
|
||||
$mailAlert->id_product = (int)$id_product;
|
||||
$mailAlert->id_product_attribute = (int)$id_product_attribute;
|
||||
$mailAlert->id_shop = (int)$id_shop;
|
||||
$mailAlert->id_lang = (int)$id_lang;
|
||||
|
||||
if ($mailAlert->add() !== false)
|
||||
die('1');
|
||||
|
||||
|
||||
die('0');
|
||||
}
|
||||
|
||||
@@ -122,15 +128,15 @@ class MailalertsActionsModuleFrontController extends ModuleFrontController
|
||||
die('0');
|
||||
|
||||
$id_customer = (int)$this->context->customer->id;
|
||||
|
||||
if (!$id_product = (int)(Tools::getValue('id_product')))
|
||||
die ('0');
|
||||
$id_product_attribute = (int)(Tools::getValue('id_product_attribute'));
|
||||
$id_shop = (int)Context::getContext()->shop->id;
|
||||
|
||||
if (MailAlert::customerHasNotification((int)$id_customer, (int)$id_product, (int)$id_product_attribute, (int)$id_shop))
|
||||
die ('1');
|
||||
|
||||
if (!$id_product = (int)(Tools::getValue('id_product')))
|
||||
die('0');
|
||||
|
||||
$id_product_attribute = (int)(Tools::getValue('id_product_attribute'));
|
||||
|
||||
if (MailAlert::customerHasNotification((int)$id_customer, (int)$id_product, (int)$id_product_attribute, (int)$this->context->shop->id))
|
||||
die('1');
|
||||
|
||||
die('0');
|
||||
}
|
||||
}
|
||||
@@ -40,13 +40,13 @@ class MailAlerts extends Module
|
||||
private $_merchant_coverage;
|
||||
private $_product_coverage;
|
||||
|
||||
const __MA_MAIL_DELIMITOR__ = ',';
|
||||
const __MA_MAIL_DELIMITOR__ = "\n";
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'mailalerts';
|
||||
$this->tab = 'administration';
|
||||
$this->version = '2.4';
|
||||
$this->version = '2.5';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
@@ -100,7 +100,8 @@ class MailAlerts extends Module
|
||||
`id_product` int(10) unsigned NOT NULL,
|
||||
`id_product_attribute` int(10) unsigned NOT NULL,
|
||||
`id_shop` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_customer`,`customer_email`,`id_product`,`id_product_attribute`)
|
||||
`id_lang` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id_customer`,`customer_email`,`id_product`,`id_product_attribute`,`id_shop`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci';
|
||||
|
||||
if (!Db::getInstance()->execute($sql))
|
||||
@@ -161,7 +162,7 @@ class MailAlerts extends Module
|
||||
$errors[] = $this->l('Invalid e-mail:').' '.Tools::safeOutput($email);
|
||||
break;
|
||||
}
|
||||
else if (!empty($email) && count($email) > 0)
|
||||
elseif (!empty($email) && count($email) > 0)
|
||||
$emails[$k] = $email;
|
||||
else
|
||||
unset($emails[$k]);
|
||||
@@ -171,15 +172,15 @@ class MailAlerts extends Module
|
||||
|
||||
if (!Configuration::updateValue('MA_MERCHANT_MAILS', strval($emails)))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
else if (!Configuration::updateValue('MA_MERCHANT_ORDER', (int)Tools::getValue('mA_merchand_order')))
|
||||
elseif (!Configuration::updateValue('MA_MERCHANT_ORDER', (int)Tools::getValue('mA_merchand_order')))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
else if (!Configuration::updateValue('MA_MERCHANT_OOS', (int)Tools::getValue('mA_merchand_oos')))
|
||||
elseif (!Configuration::updateValue('MA_MERCHANT_OOS', (int)Tools::getValue('mA_merchand_oos')))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
else if (!Configuration::updateValue('MA_LAST_QTIES', (int)Tools::getValue('MA_LAST_QTIES')))
|
||||
elseif (!Configuration::updateValue('MA_LAST_QTIES', (int)Tools::getValue('MA_LAST_QTIES')))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
else if (!Configuration::updateGlobalValue('MA_MERCHANT_COVERAGE', (int)Tools::getValue('mA_merchant_coverage')))
|
||||
elseif (!Configuration::updateGlobalValue('MA_MERCHANT_COVERAGE', (int)Tools::getValue('mA_merchant_coverage')))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
else if (!Configuration::updateGlobalValue('MA_PRODUCT_COVERAGE', (int)Tools::getValue('MA_PRODUCT_COVERAGE')))
|
||||
elseif (!Configuration::updateGlobalValue('MA_PRODUCT_COVERAGE', (int)Tools::getValue('MA_PRODUCT_COVERAGE')))
|
||||
$errors[] = $this->l('Cannot update settings');
|
||||
}
|
||||
}
|
||||
@@ -262,14 +263,16 @@ class MailAlerts extends Module
|
||||
return;
|
||||
|
||||
// Getting differents vars
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$context = Context::getContext();
|
||||
$id_lang = (int)$context->language->id;
|
||||
$id_shop = (int)$context->shop->id;
|
||||
$currency = $params['currency'];
|
||||
$configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME'));
|
||||
$order = $params['order'];
|
||||
$customer = $params['customer'];
|
||||
$configuration = Configuration::getMultiple(array('PS_SHOP_EMAIL', 'PS_MAIL_METHOD', 'PS_MAIL_SERVER', 'PS_MAIL_USER', 'PS_MAIL_PASSWD', 'PS_SHOP_NAME', 'PS_MAIL_COLOR'), $id_lang, null, $id_shop);
|
||||
$delivery = new Address((int)$order->id_address_delivery);
|
||||
$invoice = new Address((int)$order->id_address_invoice);
|
||||
$order_date_text = Tools::displayDate($order->date_add);
|
||||
$order_date_text = Tools::displayDate($order->date_add, (int)$id_lang);
|
||||
$carrier = new Carrier((int)$order->id_carrier);
|
||||
$message = $order->getFirstMessage();
|
||||
|
||||
@@ -288,8 +291,7 @@ class MailAlerts extends Module
|
||||
$customization_text = '';
|
||||
if (isset($customized_datas[$product['product_id']][$product['product_attribute_id']]))
|
||||
{
|
||||
|
||||
foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']] as $customization)
|
||||
foreach ($customized_datas[$product['product_id']][$product['product_attribute_id']][$order->id_address_delivery] as $customization)
|
||||
{
|
||||
if (isset($customization['datas'][_CUSTOMIZE_TEXTFIELD_]))
|
||||
foreach ($customization['datas'][_CUSTOMIZE_TEXTFIELD_] as $text)
|
||||
@@ -339,11 +341,11 @@ class MailAlerts extends Module
|
||||
'{delivery_block_txt}' => MailAlert::getFormatedAddress($delivery, "\n"),
|
||||
'{invoice_block_txt}' => MailAlert::getFormatedAddress($invoice, "\n"),
|
||||
'{delivery_block_html}' => MailAlert::getFormatedAddress($delivery, '<br />', array(
|
||||
'firstname' => '<span style="color:'.Configuration::get('PS_MAIL_COLOR').'; font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:'.Configuration::get('PS_MAIL_COLOR').'; font-weight:bold;">%s</span>')),
|
||||
'firstname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>')),
|
||||
'{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '<br />', array(
|
||||
'firstname' => '<span style="color:'.Configuration::get('PS_MAIL_COLOR').' font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:'.Configuration::get('PS_MAIL_COLOR').'; font-weight:bold;">%s</span>')),
|
||||
'firstname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].' font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:'.$configuration['PS_MAIL_COLOR'].'; font-weight:bold;">%s</span>')),
|
||||
'{delivery_company}' => $delivery->company,
|
||||
'{delivery_firstname}' => $delivery->firstname,
|
||||
'{delivery_lastname}' => $delivery->lastname,
|
||||
@@ -353,9 +355,7 @@ class MailAlerts extends Module
|
||||
'{delivery_postal_code}' => $delivery->postcode,
|
||||
'{delivery_country}' => $delivery->country,
|
||||
'{delivery_state}' => $delivery->id_state ? $delivery_state->name : '',
|
||||
'{delivery_phone}' => $delivery->phone,
|
||||
'{delivery_phone_mobile}' => $delivery->phone_mobile,
|
||||
'{delivery_vat_number}' => $delivery->vat_number,
|
||||
'{delivery_phone}' => $delivery->phone ? $delivery->phone : $delivery->phone_mobile,
|
||||
'{delivery_other}' => $delivery->other,
|
||||
'{invoice_company}' => $invoice->company,
|
||||
'{invoice_firstname}' => $invoice->firstname,
|
||||
@@ -366,14 +366,12 @@ class MailAlerts extends Module
|
||||
'{invoice_postal_code}' => $invoice->postcode,
|
||||
'{invoice_country}' => $invoice->country,
|
||||
'{invoice_state}' => $invoice->id_state ? $invoice_state->name : '',
|
||||
'{invoice_phone}' => $invoice->phone,
|
||||
'{invoice_phone_mobile}' => $invoice->phone_mobile,
|
||||
'{invoice_vat_number}' => $invoice->vat_number,
|
||||
'{invoice_phone}' => $invoice->phone ? $invoice->phone : $invoice->phone_mobile,
|
||||
'{invoice_other}' => $invoice->other,
|
||||
'{order_name}' => sprintf('%06d', $order->id),
|
||||
'{shop_name}' => Configuration::get('PS_SHOP_NAME'),
|
||||
'{shop_name}' => $configuration['PS_SHOP_NAME'],
|
||||
'{date}' => $order_date_text,
|
||||
'{carrier}' => (($carrier->name == '0') ? Configuration::get('PS_SHOP_NAME') : $carrier->name),
|
||||
'{carrier}' => (($carrier->name == '0') ? $configuration['PS_SHOP_NAME'] : $carrier->name),
|
||||
'{payment}' => Tools::substr($order->payment, 0, 32),
|
||||
'{items}' => $items_table,
|
||||
'{total_paid}' => Tools::displayPrice($order->total_paid, $currency),
|
||||
@@ -389,19 +387,28 @@ class MailAlerts extends Module
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.txt') &&
|
||||
file_exists(dirname(__FILE__).'/mails/'.$iso.'/'.$template.'.html'))
|
||||
Mail::Send(
|
||||
$id_lang,
|
||||
$template,
|
||||
sprintf(Mail::l('New order - #%06d', $id_lang), $order->id),
|
||||
$template_vars,
|
||||
explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails),
|
||||
null,
|
||||
$configuration['PS_SHOP_EMAIL'],
|
||||
$configuration['PS_SHOP_NAME'],
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/'
|
||||
);
|
||||
{
|
||||
// Send 1 email by merchant mail, because Mail::Send doesn't work with an array of recipients
|
||||
$merchant_mails = explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails);
|
||||
foreach ($merchant_mails as $merchant_mail)
|
||||
{
|
||||
Mail::Send(
|
||||
$id_lang,
|
||||
$template,
|
||||
sprintf(Mail::l('New order - #%06d', $id_lang), $order->id),
|
||||
$template_vars,
|
||||
$merchant_mail,
|
||||
null,
|
||||
$configuration['PS_SHOP_EMAIL'],
|
||||
$configuration['PS_SHOP_NAME'],
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/',
|
||||
null,
|
||||
$id_shop
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionProductOutOfStock($params)
|
||||
@@ -409,18 +416,20 @@ class MailAlerts extends Module
|
||||
if (!$this->_customer_qty || !Configuration::get('PS_STOCK_MANAGEMENT') || Product::isAvailableWhenOutOfStock($params['product']->out_of_stock))
|
||||
return;
|
||||
|
||||
$context = Context::getContext();
|
||||
$id_product = (int)$params['product']->id;
|
||||
$id_product_attribute = 0;
|
||||
$id_customer = (int)Context::getContext()->customer->id;
|
||||
$id_customer = (int)$context->customer->id;
|
||||
|
||||
if (!(int)Context::getContext()->customer->isLogged())
|
||||
if ((int)$context->customer->id <= 0)
|
||||
$this->context->smarty->assign('email', 1);
|
||||
else if (MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute))
|
||||
elseif (MailAlert::customerHasNotification($id_customer, $id_product, $id_product_attribute, (int)$context->shop->id))
|
||||
return;
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'id_product' => $id_product,
|
||||
'id_product_attribute' => $id_product_attribute));
|
||||
'id_product' => $id_product,
|
||||
'id_product_attribute' => $id_product_attribute
|
||||
));
|
||||
|
||||
return $this->display(__FILE__, 'product.tpl');
|
||||
}
|
||||
@@ -430,33 +439,47 @@ class MailAlerts extends Module
|
||||
$id_product = (int)$params['id_product'];
|
||||
$id_product_attribute = (int)$params['id_product_attribute'];
|
||||
$quantity = (int)$params['quantity'];
|
||||
$id_shop = (int)Context::getContext()->shop->id;
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$product = new Product($id_product, true, $id_lang, $id_shop, Context::getContext());
|
||||
$ma_last_qties = (int)Configuration::get('MA_LAST_QTIES');
|
||||
$context = Context::getContext();
|
||||
$id_shop = (int)$context->shop->id;
|
||||
$id_lang = (int)$context->language->id;
|
||||
$product = new Product($id_product, true, $id_lang, $id_shop, $context);
|
||||
$configuration = Configuration::getMultiple(array('MA_LAST_QTIES', 'PS_STOCK_MANAGEMENT', 'PS_SHOP_EMAIL', 'PS_SHOP_NAME'), $id_lang, null, $id_shop);
|
||||
$ma_last_qties = (int)$configuration['MA_LAST_QTIES'];
|
||||
|
||||
if ($product->active == 1 && (int)$quantity <= $ma_last_qties && !(!$this->_merchant_oos || empty($this->_merchant_mails)) && Configuration::get('PS_STOCK_MANAGEMENT'))
|
||||
if ($product->active == 1 && (int)$quantity <= $ma_last_qties && !(!$this->_merchant_oos || empty($this->_merchant_mails)) && $configuration['PS_STOCK_MANAGEMENT'])
|
||||
{
|
||||
$iso = Language::getIsoById($id_lang);
|
||||
$product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang);
|
||||
$template_vars = array(
|
||||
'{qty}' => $quantity,
|
||||
'{last_qty}' => $ma_last_qties,
|
||||
'{product}' => $product_name);
|
||||
'{qty}' => $quantity,
|
||||
'{last_qty}' => $ma_last_qties,
|
||||
'{product}' => $product_name
|
||||
);
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.txt') &&
|
||||
file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.html'))
|
||||
Mail::Send($id_lang,
|
||||
'productoutofstock',
|
||||
Mail::l('Product out of stock', $id_lang),
|
||||
$template_vars,
|
||||
explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails),
|
||||
null,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL')),
|
||||
strval(Configuration::get('PS_SHOP_NAME')),
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/');
|
||||
{
|
||||
// Send 1 email by merchant mail, because Mail::Send doesn't work with an array of recipients
|
||||
$merchant_mails = explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails);
|
||||
foreach ($merchant_mails as $merchant_mail)
|
||||
{
|
||||
Mail::Send(
|
||||
$id_lang,
|
||||
'productoutofstock',
|
||||
Mail::l('Product out of stock', $id_lang),
|
||||
$template_vars,
|
||||
$merchant_mail,
|
||||
null,
|
||||
strval($configuration['PS_SHOP_EMAIL']),
|
||||
strval($configuration['PS_SHOP_NAME']),
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/',
|
||||
false,
|
||||
$id_shop
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->_customer_qty && $quantity > 0)
|
||||
@@ -540,31 +563,44 @@ class MailAlerts extends Module
|
||||
$coverage = StockManagerFactory::getManager()->getProductCoverage($id_product, $id_product_attribute, $warning_coverage, $id_warehouse);
|
||||
|
||||
// if we need to send a notification
|
||||
if ($product->active == 1 && $coverage !== -1 && ($coverage < $warning_coverage) && !empty($this->_merchant_mails) &&
|
||||
if ($product->active == 1 &&
|
||||
($coverage < $warning_coverage) && !empty($this->_merchant_mails) &&
|
||||
Configuration::getGlobalValue('MA_MERCHANT_COVERAGE'))
|
||||
{
|
||||
$id_lang = (int)Context::getContext()->language->id;
|
||||
$context = Context::getContext();
|
||||
$id_lang = (int)$context->language->id;
|
||||
$id_shop = (int)$context->shop->id;
|
||||
$iso = Language::getIsoById($id_lang);
|
||||
$product_name = Product::getProductName($id_product, $id_product_attribute, $id_lang);
|
||||
$template_vars = array(
|
||||
'{current_coverage}' => $coverage,
|
||||
'{warning_coverage}' => $warning_coverage,
|
||||
'{product}' => pSQL($product_name));
|
||||
'{current_coverage}' => $coverage,
|
||||
'{warning_coverage}' => $warning_coverage,
|
||||
'{product}' => pSQL($product_name)
|
||||
);
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productcoverage.txt') &&
|
||||
file_exists(dirname(__FILE__).'/mails/'.$iso.'/productcoverage.html'))
|
||||
{
|
||||
Mail::Send($id_lang,
|
||||
'productcoverage',
|
||||
Mail::l('Stock coverage', $id_lang),
|
||||
$template_vars,
|
||||
explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails),
|
||||
null,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL')),
|
||||
strval(Configuration::get('PS_SHOP_NAME')),
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/');
|
||||
// Send 1 email by merchant mail, because Mail::Send doesn't work with an array of recipients
|
||||
$merchant_mails = explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails);
|
||||
foreach ($merchant_mails as $merchant_mail)
|
||||
{
|
||||
Mail::Send(
|
||||
$id_lang,
|
||||
'productcoverage',
|
||||
Mail::l('Stock coverage', $id_lang),
|
||||
$template_vars,
|
||||
$merchant_mail,
|
||||
null,
|
||||
strval(Configuration::get('PS_SHOP_EMAIL')),
|
||||
strval(Configuration::get('PS_SHOP_NAME')),
|
||||
null,
|
||||
null,
|
||||
dirname(__FILE__).'/mails/',
|
||||
null,
|
||||
$id_shop
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
<td style="background-color: #dde2e6; padding: 0.6em 0.4em;" colspan="4">Shipping</td>
|
||||
<td style="background-color: #dde2e6; padding: 0.6em 0.4em;">{total_shipping}</td>
|
||||
</tr>
|
||||
<tr style="text-align: right;">
|
||||
<td style="background-color: #dde2e6; padding: 0.6em 0.4em;" colspan="4">Total Tax paid</td>
|
||||
<td style="background-color: #dde2e6; padding: 0.6em 0.4em;">{total_tax_paid}</td>
|
||||
</tr>
|
||||
<tr style="text-align: right; font-weight: bold;">
|
||||
<td style="background-color: #f1aecf; padding: 0.6em 0.4em;" colspan="4">Total paid</td>
|
||||
<td style="background-color: #f1aecf; padding: 0.6em 0.4em;">{total_paid}</td>
|
||||
|
||||
@@ -8,6 +8,7 @@ Carrier : {carrier}
|
||||
Payment: {payment}
|
||||
Discounts: {total_discounts}
|
||||
Shipping: {total_shipping}
|
||||
Total Tax paid: {total_tax_paid}
|
||||
Products: {total_products}
|
||||
Gift-wrapping: {total_wrapping}
|
||||
Total paid: {total_paid}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_2_5($object)
|
||||
{
|
||||
return Db::getInstance()->execute('
|
||||
ALTER TABLE '._DB_PREFIX_.'mailalert_customer_oos
|
||||
ADD '.mailalerts_stripslashes_field('id_lang').' INT( 10 ) UNSIGNED NOT NULL ,
|
||||
DROP PRIMARY KEY ,
|
||||
ADD PRIMARY KEY (
|
||||
'.mailalerts_stripslashes_field('id_customer').' ,
|
||||
'.mailalerts_stripslashes_field('customer_email').' ,
|
||||
'.mailalerts_stripslashes_field('id_product').' ,
|
||||
'.mailalerts_stripslashes_field('id_product_attribute').' ,
|
||||
'.mailalerts_stripslashes_field('id_shop').'
|
||||
)'
|
||||
);
|
||||
}
|
||||
|
||||
function mailalerts_stripslashes_field($field)
|
||||
{
|
||||
$quotes = array('"\\\'"', '"\'"');
|
||||
$dquotes = array('\'\\\\"\'', '\'"\'');
|
||||
$backslashes = array('"\\\\\\\\"', '"\\\\"');
|
||||
|
||||
return '`'.bqSQL($field).'` = replace(replace(replace(`'.bqSQL($field).'`, '.$quotes[0].', '.$quotes[1].'), '.$dquotes[0].', '.$dquotes[1].'), '.$backslashes[0].', '.$backslashes[1].')';
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>newsletter</name>
|
||||
<displayName><![CDATA[Lettre d'informations]]></displayName>
|
||||
<displayName><![CDATA[Newsletter]]></displayName>
|
||||
<version><![CDATA[2]]></version>
|
||||
<description><![CDATA[Génère un fichier .CSV pour votre envoi d'e-mails]]></description>
|
||||
<description><![CDATA[Generates a .CSV file for mass mailings]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -56,11 +56,11 @@ $(function() {
|
||||
e.preventDefault();
|
||||
|
||||
// Form element
|
||||
|
||||
|
||||
url_options = parseInt(productcomments_url_rewrite) ? '?' : '&';
|
||||
$.ajax({
|
||||
url: productcomments_controller_url + url_options + 'action=add_comment&secure_key=' + secure_key + '&rand=' + new Date().getTime(),
|
||||
data: $('#fancybox-content form').serialize(),
|
||||
data: $('#id_new_comment_form').serialize(),
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
dataType: "json",
|
||||
@@ -68,7 +68,9 @@ $(function() {
|
||||
if (data.result)
|
||||
{
|
||||
$.fancybox.close();
|
||||
document.location.href = document.location.href;
|
||||
var buttons = {};
|
||||
buttons[productcomment_ok] = "productcommentRefreshPage";
|
||||
fancyChooseBox(productcomment_added, productcomment_title, buttons);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,3 +85,7 @@ $(function() {
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function productcommentRefreshPage() {
|
||||
window.location.reload();
|
||||
}
|
||||
@@ -89,7 +89,7 @@ var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
|
||||
<!-- Fancybox -->
|
||||
<div style="display: none;">
|
||||
<div id="new_comment_form">
|
||||
<form action="#">
|
||||
<form id="id_new_comment_form" action="#">
|
||||
<h2 class="title">{l s='Write your review' mod='productcomments'}</h2>
|
||||
<div class="product clearfix">
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $productcomment_cover, 'home_default')|escape:'html'}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product->name|escape:html:'UTF-8'}" />
|
||||
@@ -102,7 +102,7 @@ var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
|
||||
<div class="new_comment_form_content">
|
||||
<h2>{l s='Write your review' mod='productcomments'}</h2>
|
||||
|
||||
<div id="new_comment_form_error" class="error" style="display: none;">
|
||||
<div id="new_comment_form_error" class="error" style="display: none; padding: 15px 25px">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@ var productcomments_url_rewrite = '{$productcomments_url_rewriting_activated}';
|
||||
{/if}
|
||||
|
||||
<div id="new_comment_form_footer">
|
||||
<input id="id_product_comment_send" name="id_product" type="hidden" value='{$id_product_comment_form}'></input>
|
||||
<input id="id_product_comment_send" name="id_product" type="hidden" value='{$id_product_comment_form}' />
|
||||
<p class="fl required"><sup>*</sup> {l s='Required fields' mod='productcomments'}</p>
|
||||
<p class="fr">
|
||||
<button id="submitNewMessage" name="submitMessage" type="submit">{l s='Send' mod='productcomments'}</button>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>productscategory</name>
|
||||
<displayName><![CDATA[Products Category]]></displayName>
|
||||
<version><![CDATA[1.4]]></version>
|
||||
<description><![CDATA[Display products of the same category on the product page.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<module>
|
||||
<name>productscategory</name>
|
||||
<displayName><![CDATA[Products Category]]></displayName>
|
||||
<version><![CDATA[1.4]]></version>
|
||||
<description><![CDATA[Display products of the same category on the product page.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[front_office_features]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
</module>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>pscleaner</name>
|
||||
<displayName><![CDATA[Nettoyage de PrestaShop]]></displayName>
|
||||
<displayName><![CDATA[PrestaShop Cleaner]]></displayName>
|
||||
<version><![CDATA[0.9]]></version>
|
||||
<description><![CDATA[Vérifie et répare les problèmes d'intégrité fonctionnelle et supprime les données par défaut (produits, commandes, clients)]]></description>
|
||||
<description><![CDATA[Check and fix functional integrity constraints and remove default data]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -560,7 +560,7 @@ class PSCleaner extends Module
|
||||
|
||||
protected static function clearAllCaches()
|
||||
{
|
||||
$index = file_get_contents(_PS_TMP_IMG_DIR_.'index.php');
|
||||
$index = file_exists(_PS_TMP_IMG_DIR_.'index.php') ? file_get_contents(_PS_TMP_IMG_DIR_.'index.php') : '';
|
||||
Tools::deleteDirectory(_PS_TMP_IMG_DIR_, false);
|
||||
file_put_contents(_PS_TMP_IMG_DIR_.'index.php', $index);
|
||||
Context::getContext()->smarty->clearAllCache();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>referralprogram</name>
|
||||
<displayName><![CDATA[Programme de parrainage]]></displayName>
|
||||
<displayName><![CDATA[Customer referral program]]></displayName>
|
||||
<version><![CDATA[1.5.1]]></version>
|
||||
<description><![CDATA[Intègre un programme de parrainage à votre boutique]]></description>
|
||||
<description><![CDATA[Integrate a referral program system into your shop.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<confirmUninstall>Tous les informations relatives aux parrains et filleuls</confirmUninstall>
|
||||
<confirmUninstall>All sponsors and friends will be deleted. Are you sure you want to uninstall this module?</confirmUninstall>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>sekeywords</name>
|
||||
<displayName><![CDATA[Mots clés]]></displayName>
|
||||
<displayName><![CDATA[Search engine keywords]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[Affiche les mots clés qui ont mené les visiteurs jusqu'à votre boutique]]></description>
|
||||
<description><![CDATA[Display which keywords have led visitors to your website.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[analytics_stats]]></tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
|
||||
@@ -83,7 +83,7 @@ class SEKeywords extends ModuleGraph
|
||||
|
||||
public function hookTop($params)
|
||||
{
|
||||
if (!isset($_SERVER['HTTP_REFERER']) || strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost(false, false)))
|
||||
if (!isset($_SERVER['HTTP_REFERER']) || strpos($_SERVER['HTTP_REFERER'], Tools::getHttpHost(false, false) == 0))
|
||||
return;
|
||||
|
||||
if ($keywords = $this->getKeywords($_SERVER['HTTP_REFERER']))
|
||||
@@ -161,6 +161,7 @@ class SEKeywords extends ModuleGraph
|
||||
$parsedUrl = parse_url($url);
|
||||
if (!isset($parsedUrl['query']) && isset($parsedUrl['fragment']))
|
||||
$parsedUrl['query'] = $parsedUrl['fragment'];
|
||||
|
||||
if (!isset($parsedUrl['query']))
|
||||
return false;
|
||||
|
||||
@@ -172,13 +173,17 @@ class SEKeywords extends ModuleGraph
|
||||
if (strstr($parsedUrl['host'], $host))
|
||||
{
|
||||
$kArray = array();
|
||||
preg_match('/[^a-z]'.$varname.'=.+\&'.'/U', $parsedUrl['query'], $kArray);
|
||||
preg_match('/[^a-zA-Z&]?'.$varname.'=.*\&'.'/U', $parsedUrl['query'], $kArray);
|
||||
|
||||
if (!isset($kArray[0]) || empty($kArray[0]))
|
||||
preg_match('/[^a-z]'.$varname.'=.+$'.'/', $parsedUrl['query'], $kArray);
|
||||
preg_match('/[^a-zA-Z&]?'.$varname.'=.*$'.'/', $parsedUrl['query'], $kArray);
|
||||
|
||||
if (!isset($kArray[0]) || empty($kArray[0]))
|
||||
return false;
|
||||
if ($kArray[0][0] == '&')
|
||||
|
||||
if ($kArray[0][0] == '&' && Tools::strlen($kArray[0]) == 1)
|
||||
return false;
|
||||
|
||||
return urldecode(str_replace('+', ' ', ltrim(substr(rtrim($kArray[0], '&'), strlen($varname) + 1), '=')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script text="javascript">
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
$('document').ready(function(){
|
||||
$('#send_friend_button').fancybox({
|
||||
@@ -49,8 +49,11 @@ $('document').ready(function(){
|
||||
headers: {"cache-control": "no-cache"},
|
||||
data: {action: 'sendToMyFriend', secure_key: '{/literal}{$stf_secure_key}{literal}', friend: unescape(JSON.stringify(datas).replace(/\\u/g, '%u'))},{/literal}{literal}
|
||||
dataType: "json",
|
||||
success: function(result){
|
||||
success: function(result) {
|
||||
$.fancybox.close();
|
||||
var msg = result ? "{/literal}{l s='Your e-mail has been sent successfully' mod='sendtoafriend'}{literal}" : "{/literal}{l s='Your e-mail could not be sent. Please check the e-mail address and try again.' mod='sendtoafriend'}{literal}";
|
||||
var title = "{/literal}{l s='Send to a friend' mod='sendtoafriend'}{literal}";
|
||||
fancyMsgBox(msg, title);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -77,6 +80,7 @@ $('document').ready(function(){
|
||||
|
||||
<div class="send_friend_form_content" id="send_friend_form_content">
|
||||
<div id="send_friend_form_error"></div>
|
||||
<div id="send_friend_form_success"></div>
|
||||
<div class="form_container">
|
||||
<p class="intro_form">{l s='Recipient' mod='sendtoafriend'} :</p>
|
||||
<p class="text">
|
||||
|
||||
@@ -434,7 +434,7 @@ class shopimporter extends ImportModule
|
||||
if ((sizeof($rules['requiredLang']) || sizeof($rules['sizeLang']) || sizeof($rules['validateLang']) || Tools::isSubmit('syncLang') || Tools::isSubmit('syncCurrency')))
|
||||
{
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
if (Validate::isModuleName($moduleName) && Validate::file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
|
||||
if (Validate::isModuleName($moduleName) && file_exists('../../modules/'.$moduleName.'/'.$moduleName.'.php'))
|
||||
{
|
||||
require_once('../../modules/'.$moduleName.'/'.$moduleName.'.php');
|
||||
$importModule = new $moduleName();
|
||||
@@ -844,19 +844,15 @@ class shopimporter extends ImportModule
|
||||
default:
|
||||
case 'Product':
|
||||
$path = _PS_PROD_IMG_DIR_;
|
||||
$type = 'products';
|
||||
break;
|
||||
case 'Category':
|
||||
$path = _PS_CAT_IMG_DIR_;
|
||||
$type = 'categories';
|
||||
break;
|
||||
case 'Manufacturer':
|
||||
$path = _PS_MANU_IMG_DIR_;
|
||||
$type = 'manufacturers';
|
||||
break;
|
||||
case 'Supplier':
|
||||
$path = _PS_SUPP_IMG_DIR_;
|
||||
$type = 'suppliers';
|
||||
break;
|
||||
}
|
||||
$cover = 1;
|
||||
@@ -865,11 +861,8 @@ class shopimporter extends ImportModule
|
||||
foreach($item['images'] as $key => $image)
|
||||
{
|
||||
$tmpfile = tempnam(_PS_TMP_IMG_DIR_, 'import');
|
||||
if (@copy(str_replace(' ', '%20', $image), $tmpfile))
|
||||
if (@copy(str_replace(' ', '%20', $image), $tmpfile))
|
||||
{
|
||||
|
||||
$imagesTypes = ImageType::getImagesTypes($type);
|
||||
ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'.jpg');
|
||||
if ($className == 'Product')
|
||||
{
|
||||
$image = new Image();
|
||||
@@ -884,13 +877,13 @@ class shopimporter extends ImportModule
|
||||
$legend[Configuration::get('PS_LANG_DEFAULT')] = Tools::link_rewrite($val);
|
||||
$image->legend = $legend;
|
||||
$image->add();
|
||||
ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.(int)$image->id.'.jpg');
|
||||
foreach ($imagesTypes AS $k => $imageType)
|
||||
ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.(int)$image->id.'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']);
|
||||
$path = $image->getPathForCreation();
|
||||
ImageManager::resize($tmpfile, $path.'.jpg');
|
||||
}
|
||||
else
|
||||
foreach ($imagesTypes as $imageType)
|
||||
ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'-'.stripslashes($imageType['name']).'.jpg', $imageType['width'], $imageType['height']);
|
||||
{
|
||||
ImageManager::resize($tmpfile, $path.(int)$matchId[$item[$identifier]].'.jpg');
|
||||
}
|
||||
}
|
||||
else
|
||||
@unlink($tmpfile);
|
||||
@@ -959,7 +952,15 @@ class shopimporter extends ImportModule
|
||||
c.id_parent = c2.`id_category_'.bqSQL($moduleName).'`
|
||||
SET
|
||||
c.id_parent = c2.id_category
|
||||
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0');
|
||||
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0
|
||||
AND c.`id_parent` != 0');
|
||||
|
||||
// get PS home category
|
||||
Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'category c
|
||||
SET c.id_parent = '.Configuration::get('PS_HOME_CATEGORY').'
|
||||
WHERE c.`id_category_'.bqSQL($moduleName).'` != 0
|
||||
AND c.`id_parent` = 0');
|
||||
|
||||
$category = new Category();
|
||||
$cats = $category->getSimpleCategories((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach($cats as $cat)
|
||||
@@ -1482,9 +1483,11 @@ class shopimporter extends ImportModule
|
||||
$order->total_products_wt = (float)$item['total_products_wt'];
|
||||
$order->total_discounts = (float)$item['total_discounts'];
|
||||
$order->total_shipping = (float)$item['total_shipping'];
|
||||
$order->total_shipping_tax_incl = (float)$item['total_shipping'];
|
||||
$order->carrier_tax_rate = (float)$carrier->getTaxesRate(new Address((int)$item[Configuration::get('PS_TAX_ADDRESS_TYPE')]));
|
||||
$order->total_wrapping = (float)$item['total_wrapping'];
|
||||
$order->total_paid = (float)$item['total_paid'];
|
||||
$order->total_paid_tax_incl = (float)$item['total_paid'];
|
||||
$order->total_paid_real = (float)$item['total_paid_real'];
|
||||
$order->invoice_date = '0000-00-00 00:00:00';
|
||||
$order->delivery_date = '0000-00-00 00:00:00';
|
||||
@@ -1497,6 +1500,20 @@ class shopimporter extends ImportModule
|
||||
$order->valid = 1;
|
||||
else
|
||||
$order->valid = 0;
|
||||
|
||||
if (array_key_exists('current_state', $item))
|
||||
$order->current_state = $item['current_state'];
|
||||
if (array_key_exists('reference', $item))
|
||||
$order->reference = $item['reference'];
|
||||
if (array_key_exists('invoice_number', $item))
|
||||
$order->invoice_number = $item['invoice_number'];
|
||||
if (array_key_exists('delivery_number', $item))
|
||||
$order->delivery_number = $item['delivery_number'];
|
||||
if (array_key_exists('invoice_date', $item))
|
||||
$order->invoice_date = $item['invoice_date'];
|
||||
if (array_key_exists('delivery_date', $item))
|
||||
$order->delivery_date = $item['delivery_date'];
|
||||
|
||||
$order->save(false, false);
|
||||
|
||||
$this->saveMatchId('order', (int)$order->id, (int)$item['id_cart']);
|
||||
|
||||
@@ -125,15 +125,13 @@ class StatsBestCustomers extends ModuleGrid
|
||||
<p class="space">
|
||||
'.$this->l('Keeping a client is more profitable than gaining a new one. That is one of the many reasons it is necessary to cultivate customer loyalty.').' <br />
|
||||
'.$this->l('Word of mouth is also a means for getting new, satisfied clients. A dissatisfied customer can hurt your e-reputation and obstruct future sales goals.').'<br />
|
||||
'.$this->l('In order to achieve this goal, you can organize: ').'
|
||||
'.$this->l('In order to achieve this goal, you can organize:').'
|
||||
<ul>
|
||||
<li>'.$this->l('Punctual operations: commercial rewards (personalized special offers, product or service offered),
|
||||
non commercial rewards (priority handling of an order or a product), pecuniary rewards (bonds, discount coupons, payback).').'</li>
|
||||
<li>'.$this->l('Sustainable operations: loyalty points or cards, which not only justify communication between merchant and client,
|
||||
but also offer advantages to clients (private offers, discounts).').'</li>
|
||||
<li>'.$this->l('Punctual operations: commercial rewards (personalized special offers, product or service offered), non commercial rewards (priority handling of an order or a product), pecuniary rewards (bonds, discount coupons, payback).').'</li>
|
||||
<li>'.$this->l('Sustainable operations: loyalty points or cards, which not only justify communication between merchant and client, but also offer advantages to clients (private offers, discounts).').'</li>
|
||||
</ul>
|
||||
'.$this->l('These operations encourage clients to buy products and visit your e-store regularly.').' <br />
|
||||
</p><br />
|
||||
'.$this->l('These operations encourage clients to buy products and visit your e-store regularly.').'
|
||||
</p>
|
||||
</div>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>statsforecast</name>
|
||||
<displayName><![CDATA[Tableau de bord statistiques]]></displayName>
|
||||
<displayName><![CDATA[Stats Dashboard]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>statslive</name>
|
||||
<displayName><![CDATA[Visiteurs en ligne]]></displayName>
|
||||
<displayName><![CDATA[Visitors online]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[Affiche la liste des clients et visiteurs en ligne actuellement]]></description>
|
||||
<description><![CDATA[Display the list of customers and visitors currently online.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[analytics_stats]]></tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>trackingfront</name>
|
||||
<displayName><![CDATA[Affiliation - Accès boutique]]></displayName>
|
||||
<displayName><![CDATA[Tracking - Front office]]></displayName>
|
||||
<version><![CDATA[1]]></version>
|
||||
<description><![CDATA[Permet aux affiliés de consulter leurs statistiques]]></description>
|
||||
<description><![CDATA[Enable your affiliates to access their own statistics.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[shipping_logistics]]></tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
|
||||
Reference in New Issue
Block a user