Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -664,4 +664,8 @@ ul.listForm li {padding-bottom:3px;}
|
||||
/******** CREATE AN ORDER **************/
|
||||
|
||||
#carrier_form label{padding-top:0}
|
||||
#carrier_form input{margin-top:3px}
|
||||
#carrier_form input{margin-top:3px}
|
||||
|
||||
/************** SCENE *****************/
|
||||
|
||||
#large_scene_image{clear:both;border:1px solid transparent;}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
{block name="label"}
|
||||
{if $input.type == 'color'}
|
||||
<div id="colorAttributeProperties" style="display:{if $colorAttributeProperties}block{else}none{/if}";>
|
||||
<div id="colorAttributeProperties" style="display:{if $colorAttributeProperties}block{else}none{/if};">
|
||||
{/if}
|
||||
{$smarty.block.parent}
|
||||
{/block}
|
||||
|
||||
@@ -321,6 +321,46 @@
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.toggle_favorite').live('click', function(event)
|
||||
{
|
||||
var el = $(this);
|
||||
var value_pref = el.data('value');
|
||||
var module_pref = el.data('module');
|
||||
var action_pref = 'f';
|
||||
try
|
||||
{
|
||||
resAjax = $.ajax({
|
||||
type:"POST",
|
||||
url : ajaxCurrentIndex,
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
token : token,
|
||||
controller : "AdminModules",
|
||||
action : "saveFavoritePreferences",
|
||||
action_pref : action_pref,
|
||||
module_pref : module_pref,
|
||||
value_pref : value_pref
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
// res.status = cache or refresh
|
||||
if (data == 'OK')
|
||||
{
|
||||
el.parent('div').find('.toggle_favorite').toggle();
|
||||
}
|
||||
|
||||
},
|
||||
error: function(res,textStatus,jqXHR)
|
||||
{
|
||||
//jAlert("TECHNICAL ERROR"+res);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch(e){}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
{/literal}
|
||||
|
||||
@@ -79,7 +79,18 @@
|
||||
<p class="desc">{if isset($module->description) && $module->description ne ''}{l s='Description'} : {$module->description}{else} {/if}</p>
|
||||
{if isset($module->message)}<div class="conf">{$module->message}</div>{/if}
|
||||
<div class="row-actions-module">
|
||||
{if !isset($module->not_on_disk)}{$module->optionsHtml}{else} {/if}
|
||||
{if !isset($module->not_on_disk)}
|
||||
{$module->optionsHtml}
|
||||
{if isset($module->preferences) && $module->preferences['favorite'] == 1}
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">{l s='Remove from Favorites'}</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">{l s='Mark as Favorite'}</a>
|
||||
{else}
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">{l s='Remove from Favorites'}</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">{l s='Mark as Favorite'}</a>
|
||||
{/if}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
{else if !isset($module->not_on_disk)}
|
||||
{$module->optionsHtml}
|
||||
<div class="clear"> </div>
|
||||
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">Valider</a>
|
||||
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">{l s='Submit'}</a>
|
||||
{else}
|
||||
<a href="{$module->options.install_url}" class="button">{l s='Install'}</a>
|
||||
{/if}
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
{if isset($params.color) && isset($tr.color)}
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
{block name="close_td"}
|
||||
</td>
|
||||
{/block}
|
||||
{/foreach}
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($value.0)}$value.0{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
|
||||
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($value.1)}$value.1{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
||||
{l s='From'} <input type="text" class="filter datepicker" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}"{if isset($params.width)} style="width:70px"{/if}/><br />
|
||||
{l s='To'} <input type="text" class="filter datepicker" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}"{if isset($params.width)} style="width:70px"{/if}/>
|
||||
{elseif $params.type == 'select'}
|
||||
{if isset($params.filter_key)}
|
||||
<select onchange="$('#submitFilterButton{$table}').focus();$('#submitFilterButton{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
|
||||
+7
-2
@@ -953,6 +953,7 @@ class CartCore extends ObjectModel
|
||||
$this->update(true);
|
||||
$context = Context::getContext()->cloneContext();
|
||||
$context->cart = $this;
|
||||
Cache::clean('getContextualValue_*');
|
||||
if ($auto_add_cart_rule)
|
||||
CartRule::autoAddToCart($context);
|
||||
|
||||
@@ -2869,8 +2870,12 @@ class CartCore extends ObjectModel
|
||||
{
|
||||
$cart_rule['value_real'] -= $total_shipping;
|
||||
$cart_rule['value_tax_exc'] -= $total_shipping_tax_exc;
|
||||
$total_discounts -= $total_shipping;
|
||||
$total_discounts_tax_exc -= $total_shipping_tax_exc;
|
||||
$cart_rule['value_real'] = Tools::ps_round($cart_rule['value_real'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
|
||||
$cart_rule['value_tax_exc'] = Tools::ps_round($cart_rule['value_tax_exc'], (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_);
|
||||
if ($total_discounts > $cart_rule['value_real'])
|
||||
$total_discounts -= $total_shipping;
|
||||
if ($total_discounts_tax_exc > $cart_rule['value_tax_exc'])
|
||||
$total_discounts_tax_exc -= $total_shipping_tax_exc;
|
||||
|
||||
// Update total shipping
|
||||
$total_shipping = 0;
|
||||
|
||||
@@ -912,7 +912,7 @@ class CartRuleCore extends ObjectModel
|
||||
if ($cart_vat_amount == 0 || $cart_amount_te == 0)
|
||||
$cart_average_vat_rate = 0;
|
||||
else
|
||||
$cart_average_vat_rate = $cart_vat_amount / $cart_amount_te;
|
||||
$cart_average_vat_rate = Tools::ps_round($cart_vat_amount / $cart_amount_te, 3);
|
||||
|
||||
if ($this->reduction_tax && !$use_tax)
|
||||
$reduction_value += $prorata * $reduction_amount / (1 + $cart_average_vat_rate);
|
||||
@@ -1079,12 +1079,12 @@ class CartRuleCore extends ObjectModel
|
||||
if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart))
|
||||
return;
|
||||
|
||||
$result = Db::getInstance()->executeS('
|
||||
$sql = '
|
||||
SELECT cr.*
|
||||
FROM '._DB_PREFIX_.'cart_rule cr
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule
|
||||
'.($context->cart->id_carrier ? 'INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').'
|
||||
'.($context->cart->id_carrier ? 'LEFT JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').'
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule
|
||||
WHERE cr.active = 1
|
||||
AND cr.code = ""
|
||||
@@ -1108,9 +1108,9 @@ class CartRuleCore extends ObjectModel
|
||||
'.($context->customer->id ? 'OR 0 < (
|
||||
SELECT cg.id_group
|
||||
FROM '._DB_PREFIX_.'customer_group cg
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON cg.id_group = crg.id_group
|
||||
LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON (cg.id_group = crg.id_group AND cg.id_group = '.(int)$context->customer->id_default_group.')
|
||||
WHERE cr.id_cart_rule = crg.id_cart_rule
|
||||
AND cg.id_customer = '.(int)$context->customer->id.'
|
||||
AND cg.id_customer = '.(int)$context->customer->id.' LIMIT 1
|
||||
)' : '').'
|
||||
)
|
||||
AND (
|
||||
@@ -1122,8 +1122,8 @@ class CartRuleCore extends ObjectModel
|
||||
)
|
||||
)
|
||||
AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.')
|
||||
ORDER BY priority');
|
||||
|
||||
ORDER BY priority';
|
||||
$result = Db::getInstance()->executeS($sql);
|
||||
if ($result)
|
||||
{
|
||||
$cart_rules = ObjectModel::hydrateCollection('CartRule', $result);
|
||||
|
||||
@@ -801,6 +801,8 @@ class LanguageCore extends ObjectModel
|
||||
$files_list = $gz->listContent();
|
||||
if (!$gz->extract(_PS_TRANSLATIONS_DIR_.'../', false))
|
||||
$errors[] = Tools::displayError('Cannot decompress the translation file for the following language: ').(string)$iso;
|
||||
// Clear smarty modules cache
|
||||
Tools::clearCache();
|
||||
if (!Language::checkAndAddLanguage((string)$iso, $lang_pack, false, $params))
|
||||
$errors[] = Tools::displayError('An error occurred while creating the language: ').(string)$iso;
|
||||
else
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ class MailCore
|
||||
$template_vars['{shop_logo}'] = $message->attach(new Swift_Message_EmbeddedFile(new Swift_File($logo), null, ImageManager::getMimeTypeByExtension($logo)));
|
||||
|
||||
$template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME', null, null, $id_shop));
|
||||
$template_vars['{shop_url}'] = Tools::getShopDomain(true, true).__PS_BASE_URI__.'index.php';
|
||||
$template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->language->id);
|
||||
$template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id);
|
||||
$template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id);
|
||||
$template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id);
|
||||
|
||||
@@ -429,12 +429,14 @@ abstract class PaymentModuleCore extends Module
|
||||
|
||||
// Set the new voucher value
|
||||
if ($voucher->reduction_tax)
|
||||
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt;
|
||||
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - $order->total_shipping_tax_incl;
|
||||
else
|
||||
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products;
|
||||
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products - $order->total_shipping_tax_excl;
|
||||
|
||||
$voucher->id_customer = $order->id_customer;
|
||||
$voucher->quantity = 1;
|
||||
$voucher->quantity_per_user = 1;
|
||||
$voucher->free_shipping = 0;
|
||||
if ($voucher->add())
|
||||
{
|
||||
// If the voucher has conditions, they are now copied to the new voucher
|
||||
|
||||
+8
-1
@@ -458,6 +458,10 @@ class ProductCore extends ObjectModel
|
||||
$this->tax_rate = $this->getTaxesRate(new Address($address));
|
||||
|
||||
$this->new = $this->isNew();
|
||||
|
||||
// keep base price
|
||||
$this->base_price = $this->price;
|
||||
|
||||
$this->price = Product::getPriceStatic((int)$this->id, false, null, 6, null, false, true, 1, false, null, null, null, $this->specificPrice);
|
||||
$this->unit_price = ($this->unit_price_ratio != 0 ? $this->price / $this->unit_price_ratio : 0);
|
||||
if ($this->id)
|
||||
@@ -2135,7 +2139,10 @@ class ProductCore extends ObjectModel
|
||||
|
||||
$sql = 'SELECT p.*, product_shop.*, stock.`out_of_stock` out_of_stock, pl.`description`, pl.`description_short`,
|
||||
pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`,
|
||||
p.`ean13`, p.`upc`, MAX(image_shop.`id_image`) id_image, il.`legend`
|
||||
p.`ean13`, p.`upc`, MAX(image_shop.`id_image`) id_image, il.`legend`,
|
||||
DATEDIFF(product_shop.`date_add`, DATE_SUB(NOW(),
|
||||
INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).'
|
||||
DAY)) > 0 AS new
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (
|
||||
p.`id_product` = pl.`id_product`
|
||||
|
||||
+7
-7
@@ -2119,7 +2119,7 @@ exit;
|
||||
*
|
||||
* @param Smarty $smarty
|
||||
*/
|
||||
public static function clearCache($smarty, $tpl = false, $cache_id = null, $compile_id = null)
|
||||
public static function clearCache($smarty = null, $tpl = false, $cache_id = null, $compile_id = null)
|
||||
{
|
||||
if (is_null($smarty))
|
||||
$smarty = Context::getContext()->smarty;
|
||||
@@ -2349,16 +2349,16 @@ exit;
|
||||
$addons_url = 'api.addons.prestashop.com';
|
||||
$postData = '';
|
||||
$postDataArray = array(
|
||||
'version' => _PS_VERSION_,
|
||||
'iso_lang' => strtolower(Context::getContext()->language->iso_code),
|
||||
'iso_code' => strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
|
||||
'shop_url' => urlencode(Tools::getShopDomain()),
|
||||
'mail' => urlencode(Configuration::get('PS_SHOP_EMAIL'))
|
||||
'version' => isset($params['version']) ? $params['version'] : _PS_VERSION_,
|
||||
'iso_lang' => Tools::strtolower(isset($params['iso_lang']) ? $params['iso_lang'] : Context::getContext()->language->iso_code),
|
||||
'iso_code' => Tools::strtolower(isset($params['iso_country']) ? $params['iso_country'] : Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))),
|
||||
'shop_url' => urlencode(isset($params['shop_url']) ? $params['shop_url'] : Tools::getShopDomain()),
|
||||
'mail' => urlencode(isset($params['email']) ? $params['email'] : Configuration::get('email'))
|
||||
);
|
||||
foreach ($postDataArray as $postDataKey => $postDataValue)
|
||||
$postData .= '&'.$postDataKey.'='.$postDataValue;
|
||||
$postData = ltrim($postData, '&');
|
||||
|
||||
|
||||
// Config for each request
|
||||
if ($request == 'native')
|
||||
{
|
||||
|
||||
@@ -176,7 +176,7 @@ abstract class ControllerCore
|
||||
if ($this->ajax)
|
||||
{
|
||||
$action = Tools::getValue('action');
|
||||
if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true)))
|
||||
if (!empty($action) && method_exists($this, 'displayAjax'.Tools::toCamelCase($action, true)))
|
||||
$this->{'displayAjax'.$action}();
|
||||
elseif (method_exists($this, 'displayAjax'))
|
||||
$this->displayAjax();
|
||||
|
||||
@@ -60,7 +60,7 @@ abstract class ModuleCore
|
||||
/** @var int need_instance */
|
||||
public $need_instance = 1;
|
||||
|
||||
/** @var string Admin tab correponding to the module */
|
||||
/** @var string Admin tab corresponding to the module */
|
||||
public $tab = null;
|
||||
|
||||
/** @var boolean Status */
|
||||
@@ -1597,7 +1597,7 @@ abstract class ModuleCore
|
||||
{
|
||||
if ($name === null)
|
||||
$name = $this->name;
|
||||
return $name.'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id;
|
||||
return $name.'|'.(int)Tools::usingSecureMode().'|'.(int)$this->context->shop->id.'|'.(int)Group::getCurrent()->id.'|'.(int)$this->context->language->id;
|
||||
}
|
||||
|
||||
public function display($file, $template, $cacheId = null, $compileId = null)
|
||||
|
||||
@@ -33,7 +33,7 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
||||
/**
|
||||
* @var string The extension of the image to display
|
||||
*/
|
||||
protected $imgExtension = 'jpg';
|
||||
protected $imgExtension;
|
||||
|
||||
/**
|
||||
* @var array The type of images (general, categories, manufacturers, suppliers, stores...)
|
||||
@@ -119,10 +119,18 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
|
||||
// display image content if needed
|
||||
else if ($this->imgToDisplay)
|
||||
{
|
||||
if(empty($this->imgExtension)){
|
||||
$imginfo = getimagesize($this->imgToDisplay);
|
||||
$this->imgExtension = image_type_to_extension($imginfo[2],false);
|
||||
}
|
||||
|
||||
$imageResource = false;
|
||||
$types = array('jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'),
|
||||
'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif')
|
||||
);
|
||||
$types = array(
|
||||
'jpg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'),
|
||||
'jpeg' => array('function' => 'imagecreatefromjpeg', 'Content-Type' => 'image/jpeg'),
|
||||
'png' => array('function' => 'imagecreatefrompng', 'Content-Type' => 'image/png'),
|
||||
'gif' => array('function' => 'imagecreatefromgif', 'Content-Type' => 'image/gif')
|
||||
);
|
||||
|
||||
if (array_key_exists($this->imgExtension, $types))
|
||||
$imageResource = @$types[$this->imgExtension]['function']($this->imgToDisplay);
|
||||
|
||||
@@ -71,11 +71,11 @@ define('_THEME_LANG_DIR_', _PS_IMG_.'l/');
|
||||
define('_THEME_COL_DIR_', _PS_IMG_.'co/');
|
||||
define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/');
|
||||
define('_SUPP_DIR_', _PS_IMG_.'su/');
|
||||
define('_PS_PROD_IMG_', 'img/p/');
|
||||
define('_PS_PROD_IMG_', _PS_IMG_.'p/');
|
||||
|
||||
/* Other URLs */
|
||||
define('_PS_JS_DIR_', __PS_BASE_URI__.'js/');
|
||||
define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/');
|
||||
define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/');
|
||||
define('_MAIL_DIR_', __PS_BASE_URI__.'mails/');
|
||||
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');
|
||||
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');
|
||||
|
||||
@@ -101,15 +101,15 @@ class AdminCartsControllerCore extends AdminController
|
||||
{
|
||||
if (!($cart = $this->loadObject(true)))
|
||||
return;
|
||||
|
||||
$customer = new Customer($cart->id_customer);
|
||||
$currency = new Currency($cart->id_currency);
|
||||
$this->context->cart = $cart;
|
||||
$this->context->currency = $currency;
|
||||
$this->context->customer = $customer;
|
||||
$products = $cart->getProducts();
|
||||
$customized_datas = Product::getAllCustomizedDatas((int)$cart->id);
|
||||
Product::addCustomizationPrice($products, $customized_datas);
|
||||
$summary = $cart->getSummaryDetails();
|
||||
$currency = new Currency($cart->id_currency);
|
||||
|
||||
/* Display order information */
|
||||
$id_order = (int)Order::getOrderByCartId($cart->id);
|
||||
@@ -739,6 +739,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$context->cart = new Cart($id_cart);
|
||||
$context->currency = new Currency((int)$context->cart->id_currency);
|
||||
$context->customer = new Customer((int)$context->cart->id_customer);
|
||||
return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING);
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ class AdminCountriesControllerCore extends AdminController
|
||||
$html .= '<li>
|
||||
<a href="javascript:void(0);" onClick="displayAvailableFields(\''.$class_name.'\')">'.$class_name.'</a>';
|
||||
foreach (AddressFormat::getValidateFields($class_name) as $name)
|
||||
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" '.$name.' id="'.($class_name == 'Address' ? $name : $class_name.':'.$name).'">
|
||||
$fields[] = '<a style="color:#4B8;" href="javascript:void(0);" class="addPattern" id="'.($class_name == 'Address' ? $name : $class_name.':'.$name).'">
|
||||
'.$name.'</a>';
|
||||
$html .= '
|
||||
<div class="availableFieldsList" id="availableListFieldsFor_'.$class_name.'" style="width:300px;">
|
||||
|
||||
@@ -227,7 +227,7 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
'name' => 'id_lang',
|
||||
'required' => true,
|
||||
'options' => array(
|
||||
'query' => Language::getLanguages(),
|
||||
'query' => Language::getLanguages(false),
|
||||
'id' => 'id_lang',
|
||||
'name' => 'name'
|
||||
)
|
||||
|
||||
@@ -600,25 +600,14 @@ class AdminModulesControllerCore extends AdminController
|
||||
foreach ($modules as $name)
|
||||
{
|
||||
$full_report = null;
|
||||
if ($key == 'update')
|
||||
{
|
||||
if (ConfigurationTest::test_dir('modules/'.$name, true, $full_report))
|
||||
Tools::deleteDirectory('../modules/'.$name.'/');
|
||||
else
|
||||
{
|
||||
$module = Module::getInstanceByName(urldecode($name));
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded : ", $module->displayName)).$full_report;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If Addons module, download and unzip it before installing it
|
||||
if (!file_exists('../modules/'.$name.'/'.$name.'.php'))
|
||||
if (!file_exists('../modules/'.$name.'/'.$name.'.php') || $key == 'update')
|
||||
{
|
||||
$filesList = array(
|
||||
array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0),
|
||||
array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1),
|
||||
);
|
||||
|
||||
foreach ($filesList as $f)
|
||||
if (file_exists(_PS_ROOT_DIR_.$f['file']))
|
||||
{
|
||||
@@ -628,12 +617,19 @@ class AdminModulesControllerCore extends AdminController
|
||||
foreach ($xml->module as $modaddons)
|
||||
if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0))
|
||||
{
|
||||
$download_ok = false;
|
||||
if ($f['loggedOnAddons'] == 0)
|
||||
if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id)))))
|
||||
$this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
|
||||
if ($f['loggedOnAddons'] == 1 && $this->logged_on_addons)
|
||||
if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons))))))
|
||||
$this->extractArchive('../modules/'.$modaddons->name.'.zip', false);
|
||||
if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id)))))
|
||||
$download_ok = true;
|
||||
elseif ($f['loggedOnAddons'] == 1 && $this->logged_on_addons)
|
||||
if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons))))))
|
||||
$download_ok = true;
|
||||
|
||||
if (!$download_ok)
|
||||
$this->errors[] = $this->l('Error on downloading the lastest version');
|
||||
else
|
||||
if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false))
|
||||
$this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ class AdminScenesControllerCore extends AdminController
|
||||
$this->addJqueryPlugin('autocomplete');
|
||||
$this->addJqueryPlugin('imgareaselect');
|
||||
$this->addJs(_PS_JS_DIR_.'admin-scene-cropping.js' );
|
||||
$image_to_map_desc .= '<br /><img id="large_scene_image" style="clear:both;border:1px solid black;" alt="" src="'.
|
||||
$image_to_map_desc .= '<br /><img id="large_scene_image" alt="" src="'.
|
||||
_THEME_SCENE_DIR_.$obj->id.'-scene_default.jpg" /><br />';
|
||||
|
||||
$image_to_map_desc .= '
|
||||
|
||||
@@ -686,6 +686,9 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
if (pathinfo($file2check['filename'], PATHINFO_BASENAME) == 'index.php' && file_put_contents(_PS_TRANSLATIONS_DIR_.'../'.$file2check['filename'], Tools::getDefaultIndexContent()))
|
||||
continue;
|
||||
|
||||
// Clear smarty modules cache
|
||||
Tools::clearCache();
|
||||
|
||||
if (Validate::isLanguageFileName($filename))
|
||||
{
|
||||
if (!Language::checkAndAddLanguage($iso_code))
|
||||
@@ -735,13 +738,14 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('The archive cannot be extracted.'). ' '.$error->message;
|
||||
else
|
||||
{
|
||||
|
||||
if (!Language::checkAndAddLanguage($arr_import_lang[0]))
|
||||
$conf = 20;
|
||||
else
|
||||
{
|
||||
// Reset cache
|
||||
Language::loadLanguages();
|
||||
// Clear smarty modules cache
|
||||
Tools::clearCache();
|
||||
|
||||
AdminTranslationsController::checkAndAddMailsFiles($arr_import_lang[0], $files_list);
|
||||
if ($tab_errors = AdminTranslationsController::addNewTabs($arr_import_lang[0], $files_list))
|
||||
@@ -1340,6 +1344,9 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
foreach ($arr_files as $value)
|
||||
$this->findAndWriteTranslationsIntoFile($value['file_name'], $value['files'], $value['theme'], $value['module'], $value['dir']);
|
||||
|
||||
// Clear modules cache
|
||||
Tools::clearCache();
|
||||
|
||||
// Redirect
|
||||
if (Tools::getValue('submitTranslationsModulesAndStay'))
|
||||
$this->redirect(true);
|
||||
|
||||
@@ -104,12 +104,21 @@ class AuthControllerCore extends FrontController
|
||||
$countries = Carrier::getDeliveredCountries($this->context->language->id, true, true);
|
||||
else
|
||||
$countries = Country::getCountries($this->context->language->id, true);
|
||||
|
||||
|
||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
|
||||
{
|
||||
$array = preg_split('/,|-/', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
if (!Validate::isLanguageIsoCode($array[0]) || !($sl_country = Country::getByIso($array[0])))
|
||||
$sl_country = (int)Configuration::get('PS_COUNTRY_DEFAULT');
|
||||
}
|
||||
else
|
||||
$sl_country = (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'inOrderProcess' => true,
|
||||
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
|
||||
'PS_REGISTRATION_PROCESS_TYPE' => Configuration::get('PS_REGISTRATION_PROCESS_TYPE'),
|
||||
'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
|
||||
'sl_country' => (int)$sl_country,
|
||||
'countries' => $countries
|
||||
));
|
||||
}
|
||||
@@ -307,7 +316,7 @@ class AuthControllerCore extends FrontController
|
||||
$this->context->cart->secure_key = $customer->secure_key;
|
||||
$this->context->cart->save();
|
||||
$this->context->cookie->id_cart = (int)$this->context->cart->id;
|
||||
$this->context->cookie->update();
|
||||
$this->context->cookie->write();
|
||||
$this->context->cart->autosetProductAddress();
|
||||
|
||||
Hook::exec('actionAuthentication');
|
||||
|
||||
@@ -31,7 +31,7 @@ class CompareControllerCore extends FrontController
|
||||
public function setMedia()
|
||||
{
|
||||
parent::setMedia();
|
||||
$this->addCSS(_THEME_CSS_DIR_.'/comparator.css');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'comparator.css');
|
||||
|
||||
if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0)
|
||||
$this->addJS(_THEME_JS_DIR_.'products-comparison.js');
|
||||
|
||||
@@ -347,7 +347,6 @@ class OrderControllerCore extends ParentOrderController
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
|
||||
'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0)
|
||||
));
|
||||
}
|
||||
|
||||
@@ -190,6 +190,13 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$this->context->cart->id_address_invoice = Tools::isSubmit('same') ? $this->context->cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice'));
|
||||
if (!$this->context->cart->update())
|
||||
$this->errors[] = Tools::displayError('An error occurred while updating your cart.');
|
||||
|
||||
$infos = Address::getCountryAndState((int)($this->context->cart->id_address_delivery));
|
||||
if (isset($infos['id_country']) && $infos['id_country'])
|
||||
{
|
||||
$country = new Country((int)$infos['id_country']);
|
||||
$this->context->country = $country;
|
||||
}
|
||||
|
||||
// Address has changed, so we check if the cart rules still apply
|
||||
CartRule::autoRemoveFromCart($this->context);
|
||||
@@ -316,7 +323,7 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
// If a rule offer free-shipping, force hidding shipping prices
|
||||
$free_shipping = false;
|
||||
foreach ($this->context->cart->getCartRules() as $rule)
|
||||
if ($rule['free_shipping'])
|
||||
if ($rule['free_shipping'] && !$rule['carrier_restriction'])
|
||||
{
|
||||
$free_shipping = true;
|
||||
break;
|
||||
@@ -498,9 +505,19 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
$wrapping_fees = $this->context->cart->getGiftWrappingPrice(false);
|
||||
$wrapping_fees_tax_inc = $wrapping_fees = $this->context->cart->getGiftWrappingPrice();
|
||||
$oldMessage = Message::getMessageByCartId((int)($this->context->cart->id));
|
||||
|
||||
$free_shipping = false;
|
||||
foreach ($this->context->cart->getCartRules() as $rule)
|
||||
{
|
||||
if ($rule['free_shipping'] && !$rule['carrier_restriction'])
|
||||
{
|
||||
$free_shipping = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$vars = array(
|
||||
'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only
|
||||
'free_shipping' => $free_shipping,
|
||||
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
||||
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
|
||||
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
class FreeOrder extends PaymentModule
|
||||
{
|
||||
public $active = 1;
|
||||
public $name = 'free_order';
|
||||
public $displayName = 'free_order';
|
||||
}
|
||||
|
||||
class ParentOrderControllerCore extends FrontController
|
||||
@@ -454,15 +456,15 @@ class ParentOrderControllerCore extends FrontController
|
||||
}
|
||||
|
||||
protected function _assignCarrier()
|
||||
{
|
||||
{
|
||||
$address = new Address($this->context->cart->id_address_delivery);
|
||||
$id_zone = Address::getZoneById($address->id);
|
||||
$carriers = $this->context->cart->simulateCarriersOutput();
|
||||
$checked = $this->context->cart->simulateCarrierSelectedOutput();
|
||||
$delivery_option_list = $this->context->cart->getDeliveryOptionList();
|
||||
$this->setDefaultCarrierSelection($delivery_option_list);
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'address_collection' => $this->context->cart->getAddressCollection(),
|
||||
'delivery_option_list' => $delivery_option_list,
|
||||
'carriers' => $carriers,
|
||||
@@ -497,8 +499,18 @@ class ParentOrderControllerCore extends FrontController
|
||||
$this->link_conditions .= '?content_only=1';
|
||||
else
|
||||
$this->link_conditions .= '&content_only=1';
|
||||
|
||||
|
||||
$free_shipping = false;
|
||||
foreach ($this->context->cart->getCartRules() as $rule)
|
||||
{
|
||||
if ($rule['free_shipping'] && !$rule['carrier_restriction'])
|
||||
{
|
||||
$free_shipping = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign(array(
|
||||
'free_shipping' => $free_shipping,
|
||||
'checkedTOS' => (int)($this->context->cookie->checkedTOS),
|
||||
'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')),
|
||||
'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')),
|
||||
|
||||
@@ -95,7 +95,7 @@ class Datas
|
||||
),
|
||||
'shop_activity' => array(
|
||||
'name' => 'activity',
|
||||
'default' => 1,
|
||||
'default' => 0,
|
||||
'validate' => 'isInt',
|
||||
),
|
||||
'shop_country' => array(
|
||||
|
||||
@@ -227,28 +227,29 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
|
||||
{
|
||||
// List of activities
|
||||
$list_activities = array(
|
||||
$this->l('Lingerie and Adult'),
|
||||
$this->l('Animals and Pets'),
|
||||
$this->l('Art and Culture'),
|
||||
$this->l('Babies'),
|
||||
$this->l('Beauty and Personal Care'),
|
||||
$this->l('Cars'),
|
||||
$this->l('Computer Hardware and Software'),
|
||||
$this->l('Download'),
|
||||
$this->l('Fashion and accessories'),
|
||||
$this->l('Flowers, Gifts and Crafts'),
|
||||
$this->l('Food and beverage'),
|
||||
$this->l('HiFi, Photo and Video'),
|
||||
$this->l('Home and Garden'),
|
||||
$this->l('Home Appliances'),
|
||||
$this->l('Jewelry'),
|
||||
$this->l('Mobile and Telecom'),
|
||||
$this->l('Services'),
|
||||
$this->l('Shoes and accessories'),
|
||||
$this->l('Sports and Entertainment'),
|
||||
$this->l('Travel'),
|
||||
1 => $this->l('Lingerie and Adult'),
|
||||
2 => $this->l('Animals and Pets'),
|
||||
3 => $this->l('Art and Culture'),
|
||||
4 => $this->l('Babies'),
|
||||
5 => $this->l('Beauty and Personal Care'),
|
||||
6 => $this->l('Cars'),
|
||||
7 => $this->l('Computer Hardware and Software'),
|
||||
8 => $this->l('Download'),
|
||||
9 => $this->l('Fashion and accessories'),
|
||||
10 => $this->l('Flowers, Gifts and Crafts'),
|
||||
11 => $this->l('Food and beverage'),
|
||||
12 => $this->l('HiFi, Photo and Video'),
|
||||
13 => $this->l('Home and Garden'),
|
||||
14 => $this->l('Home Appliances'),
|
||||
15 => $this->l('Jewelry'),
|
||||
16 => $this->l('Mobile and Telecom'),
|
||||
17 => $this->l('Services'),
|
||||
18 => $this->l('Shoes and accessories'),
|
||||
19 => $this->l('Sports and Entertainment'),
|
||||
20 => $this->l('Travel'),
|
||||
);
|
||||
sort($list_activities);
|
||||
|
||||
asort($list_activities);
|
||||
$this->list_activities = $list_activities;
|
||||
|
||||
// Countries list
|
||||
|
||||
@@ -331,8 +331,6 @@ class InstallControllerHttpProcess extends InstallControllerHttp
|
||||
*/
|
||||
public function display()
|
||||
{
|
||||
$this->initializeContext();
|
||||
|
||||
// The installer SHOULD take less than 32M, but may take up to 35/36M sometimes. So 42M is a good value :)
|
||||
$low_memory = Tools::getMemoryLimit() < Tools::getOctets('42M');
|
||||
|
||||
@@ -361,8 +359,15 @@ class InstallControllerHttpProcess extends InstallControllerHttp
|
||||
$this->process_steps[] = $install_modules;
|
||||
|
||||
$install_modules = array('key' => 'installModulesAddons', 'lang' => $this->l('Install modules Addons'));
|
||||
|
||||
$params = array('iso_lang' => $this->language->getLanguageIso(),
|
||||
'iso_country' => $this->session->shop_country,
|
||||
'email' => $this->session->admin_email,
|
||||
'shop_url' => Tools::getHttpHost(),
|
||||
'version' => _PS_INSTALL_VERSION_);
|
||||
|
||||
if ($low_memory)
|
||||
foreach ($this->model_install->getAddonsModulesList() as $module)
|
||||
foreach ($this->model_install->getAddonsModulesList($params) as $module)
|
||||
$install_modules['subtasks'][] = array('module' => (string)$module['name'], 'id_module' => (string)$module['id_module']);
|
||||
$this->process_steps[] = $install_modules;
|
||||
|
||||
|
||||
@@ -557,7 +557,6 @@ class InstallModelInstall extends InstallAbstractModel
|
||||
'graphvisifire',
|
||||
'graphxmlswfcharts',
|
||||
'gridhtml',
|
||||
'gsitemap',
|
||||
'homefeatured',
|
||||
'homeslider',
|
||||
'pagesnotfound',
|
||||
@@ -588,10 +587,10 @@ class InstallModelInstall extends InstallAbstractModel
|
||||
return $modules;
|
||||
}
|
||||
|
||||
public function getAddonsModulesList()
|
||||
public function getAddonsModulesList($params = array())
|
||||
{
|
||||
$addons_modules = array();
|
||||
$content = Tools::addonsRequest('install-modules');
|
||||
$content = Tools::addonsRequest('install-modules', $params);
|
||||
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
|
||||
|
||||
if ($xml !== false and isset($xml->module))
|
||||
|
||||
@@ -26,7 +26,7 @@ var default_iso = '<?php echo $this->session->shop_country ?>';
|
||||
<select id="infosActivity" name="shop_activity" class="chosen">
|
||||
<option value="0" style="font-weight: bold" <?php if (!$this->session->shop_activity): ?>selected="selected"<?php endif; ?>><?php echo $this->l('Please choose your main activity') ?></option>
|
||||
<?php foreach ($this->list_activities as $i => $activity): ?>
|
||||
<option value="<?php echo $i ?>" <?php if ($this->session->shop_activity == $i): ?>selected="selected"<?php endif; ?>><?php echo $activity ?></option>
|
||||
<option value="<?php echo $i ?>" <?php if (isset($this->session->shop_activity) && $this->session->shop_activity == $i): ?>selected="selected"<?php endif; ?>><?php echo $activity ?></option>
|
||||
<?php endforeach; ?>
|
||||
<option value="0"><?php echo $this->l('Other activity...') ?></option>
|
||||
</select>
|
||||
|
||||
@@ -28,5 +28,5 @@ function add_column_orders_reference_if_not_exists()
|
||||
{
|
||||
$column = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'orders` LIKE "reference"');
|
||||
if (empty($column))
|
||||
return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'orders` ADD COLUMN `reference` varchar(9) AFTER `id_order`');
|
||||
return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'orders` ADD COLUMN `reference` varchar(10) AFTER `id_order`');
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
function block_category_1521()
|
||||
{
|
||||
if (!Db::getInstance()->ExecuteS('SELECT `'._DB_PREFIX_.'configuration` WHERE `name`=\'BLOCK_CATEG_MAX_DEPTH\' '))
|
||||
if (!Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `name` LIKE \'BLOCK_CATEG_MAX_DEPTH\' '))
|
||||
Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'configuration`
|
||||
(`id_configuration` ,`id_shop_group` ,`id_shop` ,`name` ,`value` ,`date_add` ,`date_upd`)
|
||||
VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 2, NOW(), NOW())');
|
||||
else if (Db::getInstance()->ExecuteS('SELECT `'._DB_PREFIX_.'configuration` WHERE and `value` IS NOT NULL AND `value` <> 0'))
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = 2 WHERE `name`=\'BLOCK_CATEG_MAX_DEPTH\' ');
|
||||
VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 4, NOW(), NOW())');
|
||||
else if ($maxdepth = (int)Db::getInstance()->getValue('SELECT FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0'))
|
||||
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` LIKE\'BLOCK_CATEG_MAX_DEPTH\'');
|
||||
|
||||
}
|
||||
@@ -33,42 +33,38 @@ function update_order_messages()
|
||||
$nb_loop = ceil($count_messages / $step);
|
||||
for($i = 0; $i < $nb_loop; $i++)
|
||||
{
|
||||
$sql = 'SELECT id_message, message FROM '._DB_PREFIX_.'message LIMIT '.(int)$start.', '.(int)$step;
|
||||
if ($messages = Db::getInstance()->executeS($sql))
|
||||
{
|
||||
if(is_array($messages))
|
||||
foreach($messages as $message)
|
||||
$sql = 'SELECT id_message, message FROM `'._DB_PREFIX_.'message` WHERE message REGEXP \'<br|&[^;]{1,8}\' LIMIT '.(int)$start.', '.(int)$step;
|
||||
if ($messages = Db::getInstance()->query($sql))
|
||||
while ($message = Db::getInstance()->nextRow($messages))
|
||||
{
|
||||
if(is_array($message))
|
||||
{
|
||||
$sql = 'UPDATE '._DB_PREFIX_.'message SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(br2nl($message['message']))).'\'
|
||||
$sql = 'UPDATE `'._DB_PREFIX_.'message` SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(br2nl($message['message']))).'\'
|
||||
WHERE id_message = '.(int)$message['id_message'];
|
||||
$result = Db::getInstance()->execute($sql);
|
||||
}
|
||||
$start += ($step + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$count_messages = Db::getInstance()->getValue('SELECT count(id_customer_message) FROM '._DB_PREFIX_.'customer_message');
|
||||
$nb_loop = $start = 0;
|
||||
if($count_messages > 0)
|
||||
$nb_loop = ceil($count_messages / $step);
|
||||
for($i = 0; $i < $nb_loop; $i++)
|
||||
{
|
||||
$sql = 'SELECT id_customer_message, message FROM '._DB_PREFIX_.'customer_message LIMIT '.(int)$start.', '.(int)$step;
|
||||
if ($messages = Db::getInstance()->executeS($sql))
|
||||
{
|
||||
if(is_array($messages))
|
||||
foreach($messages as $message)
|
||||
{
|
||||
$sql = 'UPDATE '._DB_PREFIX_.'customer_message SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message']))).'\'
|
||||
$sql = 'SELECT id_customer_message, message FROM `'._DB_PREFIX_.'customer_message` WHERE message REGEXP \'<br|&[^;]{1,8}\' LIMIT '.(int)$start.', '.(int)$step;
|
||||
if ($messages = Db::getInstance()->query($sql))
|
||||
while ($message = Db::getInstance()->nextRow($messages))
|
||||
{
|
||||
if(is_array($message))
|
||||
{
|
||||
$sql = 'UPDATE `'._DB_PREFIX_.'customer_message` SET message = \''.pSQL(Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message']))).'\'
|
||||
WHERE id_customer_message = '.(int)$message['id_customer_message'];
|
||||
Db::getInstance()->execute($sql);
|
||||
}
|
||||
$start += ($step + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function br2nl($str)
|
||||
{
|
||||
return preg_replace("/<br( \/)?>/i", "\n", $str);
|
||||
return str_replace(array('<br>', '<br />', '<br/>'), "\n", $str);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ INSERT INTO `PREFIX_order_invoice_payment`
|
||||
|
||||
-- Step 2: Add the collumn id_order_reference
|
||||
ALTER TABLE `PREFIX_order_payment`
|
||||
ADD COLUMN `order_reference` VARCHAR(9) AFTER `id_order`,
|
||||
ADD COLUMN `order_reference` VARCHAR(10) AFTER `id_order`,
|
||||
ADD INDEX `order_reference`(`order_reference`);
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
SET NAMES 'utf8';
|
||||
|
||||
ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0';
|
||||
ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0';
|
||||
|
||||
DELETE ms.*, hm.* FROM `PREFIX_module_shop` ms INNER JOIN `PREFIX_hook_module` hm USING (`id_module`) INNER JOIN `PREFIX_module` m USING (`id_module`) WHERE m.`name` LIKE 'backwardcompatibility';
|
||||
|
||||
UPDATE `PREFIX_module` SET `active` = 0 WHERE `name` LIKE 'backwardcompatibility';
|
||||
|
||||
ALTER TABLE `PREFIX_orders` CHANGE `reference` `reference` VARCHAR( 10 ) NULL DEFAULT NULL;
|
||||
|
||||
ALTER TABLE `PREFIX_order_payment` CHANGE `order_reference` `order_reference` VARCHAR( 10 ) NULL DEFAULT NULL;
|
||||
@@ -31,9 +31,10 @@
|
||||
var imageWidth = $(this).get(0).offsetWidth;
|
||||
var imageHeight = $(this).get(0).offsetHeight;
|
||||
|
||||
noalt = $(this).attr("alt");
|
||||
attr = typeof($(this).attr("rel")) != 'undefined' ? "rel" : "alt";
|
||||
noalt = $(this).attr(attr);
|
||||
var bigimage = noalt;
|
||||
$(this).attr("alt", '');
|
||||
$(this).attr(attr, '');
|
||||
|
||||
if($("div.zoomdiv").get().length == 0)
|
||||
$(this).after("<div class='zoomdiv'><img class='bigimg' src='"+bigimage+"'/></div>");
|
||||
@@ -67,7 +68,7 @@
|
||||
$("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ;
|
||||
});
|
||||
}, function() {
|
||||
$(this).attr("alt", noalt);
|
||||
$(this).attr(attr, noalt);
|
||||
$("div.zoomdiv").hide();
|
||||
$(document.body).unbind("mousemove");
|
||||
$(".lenszoom").remove();
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>blockadvertising</name>
|
||||
<displayName><![CDATA[Block advertising]]></displayName>
|
||||
<displayName><![CDATA[Bloc publicité]]></displayName>
|
||||
<version><![CDATA[0.5]]></version>
|
||||
<description><![CDATA[Adds an advertisement block to selected sections of your e-commerce webiste.]]></description>
|
||||
<description><![CDATA[Ajoute un bloc affichant une publicité]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[advertising_marketing]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
|
||||
@@ -449,8 +449,8 @@ var ajaxCart = {
|
||||
content += '<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseUri + '?controller=cart&delete=1&id_product=' + productId + '&token=' + static_token + (this.hasAttributes ? '&ipa=' + parseInt(this.idCombination) : '') + '"> </a></span>';
|
||||
else
|
||||
content += '<span class="remove_link"></span>';
|
||||
if (typeof(freeShippingTranslation) != 'undefined')
|
||||
content += '<span class="price">' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeShippingTranslation) + '</span>';
|
||||
if (typeof(freeProductTranslation) != 'undefined')
|
||||
content += '<span class="price">' + (parseFloat(this.price_float) > 0 ? this.priceByLine : freeProductTranslation) + '</span>';
|
||||
content += '</dt>';
|
||||
if (this.hasAttributes)
|
||||
content += '<dd id="cart_block_combination_of_' + domIdProduct + '" class="hidden"><a href="' + this.link + '" title="' + this.name + '">' + this.attributes + '</a>';
|
||||
|
||||
@@ -116,8 +116,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
||||
</dl>
|
||||
{/if}
|
||||
<p {if $products}class="hidden"{/if} id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
|
||||
{if $discounts|@count > 0}
|
||||
<table id="vouchers">
|
||||
<table id="vouchers"{if $discounts|@count == 0} style="display:none;"{/if}>
|
||||
<tbody>
|
||||
{foreach from=$discounts item=discount}
|
||||
{if $discount.value_real > 0}
|
||||
@@ -132,11 +131,9 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<p id="cart-prices">
|
||||
<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
|
||||
<span>{l s='Shipping' mod='blockcart'}</span>
|
||||
|
||||
@@ -227,7 +227,7 @@ class BlockCategories extends Module
|
||||
$id_product = (int)Tools::getValue('id_product', 0);
|
||||
$id_category = (int)Tools::getValue('id_category', 0);
|
||||
$id_lang = (int)$this->context->language->id;
|
||||
return 'blockcategories|'.$this->context->shop->id.'|'.$groups.'|'.$id_lang.'|'.$id_product.'|'.$id_category;
|
||||
return 'blockcategories|'.(int)Tools::usingSecureMode().'|'.$this->context->shop->id.'|'.$groups.'|'.$id_lang.'|'.$id_product.'|'.$id_category;
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
|
||||
@@ -509,7 +509,7 @@ class Blocknewsletter extends Module
|
||||
public function hookDisplayLeftColumn($params)
|
||||
{
|
||||
$this->_prepareHook($params);
|
||||
return $this->display(__FILE__, 'blocknewsletter.tpl', $this->getCacheId());
|
||||
return $this->display(__FILE__, 'blocknewsletter.tpl');
|
||||
}
|
||||
|
||||
public function hookFooter($params)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Newsletter subscription</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Newsletter subscription</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -32,7 +32,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -117,11 +117,5 @@ public function hookDisplayMobileHeader($params)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getCacheId($name = null)
|
||||
{
|
||||
$cache_id = parent::getCacheId($name);
|
||||
return $cache_id.'|'.(int)Tools::usingSecureMode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -89,15 +89,15 @@ class Blocktopmenu extends Module
|
||||
return (Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
|
||||
`id_linksmenutop` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`id_shop` INT UNSIGNED NOT NULL,
|
||||
`id_shop` INT(11) UNSIGNED NOT NULL,
|
||||
`new_window` TINYINT( 1 ) NOT NULL,
|
||||
INDEX (`id_shop`)
|
||||
) ENGINE = '._MYSQL_ENGINE_.' CHARACTER SET utf8 COLLATE utf8_general_ci;') &&
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
|
||||
`id_linksmenutop` INT NOT NULL,
|
||||
`id_lang` INT NOT NULL,
|
||||
`id_shop` INT NOT NULL,
|
||||
`id_linksmenutop` INT(11) UNSIGNED NOT NULL,
|
||||
`id_lang` INT(11) UNSIGNED NOT NULL,
|
||||
`id_shop` INT(11) UNSIGNED NOT NULL,
|
||||
`label` VARCHAR( 128 ) NOT NULL ,
|
||||
`link` VARCHAR( 128 ) NOT NULL ,
|
||||
INDEX ( `id_linksmenutop` , `id_lang`, `id_shop`)
|
||||
@@ -717,7 +717,7 @@ class Blocktopmenu extends Module
|
||||
{
|
||||
parent::getCacheId($name);
|
||||
$page_name = in_array($this->page_name, array('category', 'supplier', 'manufacturer', 'cms', 'product')) ? $this->page_name : 'index';
|
||||
return 'blocktopmenu|'.$page_name.'|'.(int)$this->context->shop->id.'|'.implode(', ',$this->user_groups).'|'.(int)$this->context->language->id.'|'.(int)Tools::getValue('id_category').'|'.(int)Tools::getValue('id_manufacturer').'|'.(int)Tools::getValue('id_supplier').'|'.(int)Tools::getValue('id_cms').'|'.(int)Tools::getValue('id_product');
|
||||
return 'blocktopmenu|'.(int)Tools::usingSecureMode().'|'.$page_name.'|'.(int)$this->context->shop->id.'|'.implode(', ',$this->user_groups).'|'.(int)$this->context->language->id.'|'.(int)Tools::getValue('id_category').'|'.(int)Tools::getValue('id_manufacturer').'|'.(int)Tools::getValue('id_supplier').'|'.(int)Tools::getValue('id_cms').'|'.(int)Tools::getValue('id_product');
|
||||
}
|
||||
|
||||
public function hookDisplayTop($param)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Message from {shop_name}</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Message from {shop_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -32,7 +32,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> realised with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> realised with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Message from {shop_name}</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Message from {shop_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -32,7 +32,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> Powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> Powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{firstname} {lastname}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your cart at {shop_name}</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your cart at {shop_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{firstname} {lastname}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Thank you for your order at {shop_name}</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Thank you for your order at {shop_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{firstname} {lastname}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Thanks for your trust</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Thanks for your trust</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{firstname} {lastname}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your cart at {shop_name}</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your cart at {shop_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>gsitemap</name>
|
||||
<displayName><![CDATA[Google sitemap]]></displayName>
|
||||
<version><![CDATA[1.9]]></version>
|
||||
<description><![CDATA[Generate your Google sitemap file.]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[seo]]></tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>0</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/gsitemap.php');
|
||||
|
||||
if (substr(Tools::encrypt('gsitemap/cron'), 0, 10) != Tools::getValue('token') || !Module::isInstalled('gsitemap'))
|
||||
die('Bad token');
|
||||
|
||||
$gsitemap = new Gsitemap();
|
||||
|
||||
if (!defined('_PS_BASE_URL_'))
|
||||
define('_PS_BASE_URL_', Tools::getShopDomain(true));
|
||||
if (!defined('_PS_BASE_URL_SSL_'))
|
||||
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));
|
||||
|
||||
$context = Context::getContext();
|
||||
$context->link = new Link();
|
||||
|
||||
echo $gsitemap->generateSitemapIndex();
|
||||
@@ -1,460 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
class Gsitemap extends Module
|
||||
{
|
||||
private $_html = '';
|
||||
private $_postErrors = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'gsitemap';
|
||||
$this->tab = 'seo';
|
||||
$this->version = '1.9';
|
||||
$this->author = 'PrestaShop';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Google sitemap');
|
||||
$this->description = $this->l('Generate your Google sitemap file.');
|
||||
|
||||
if (!defined('GSITEMAP_FILE'))
|
||||
define('GSITEMAP_FILE', dirname(__FILE__).'/../../sitemap.xml');
|
||||
}
|
||||
|
||||
public function uninstall()
|
||||
{
|
||||
file_put_contents(GSITEMAP_FILE, '');
|
||||
return parent::uninstall();
|
||||
}
|
||||
|
||||
private function _postValidation()
|
||||
{
|
||||
file_put_contents(GSITEMAP_FILE, '');
|
||||
if (!($fp = fopen(GSITEMAP_FILE, 'w')))
|
||||
$this->_postErrors[] = sprintf($this->l('Cannot create %ssitemap.xml file..'), realpath(dirname(__FILE__.'/../..')).'/');
|
||||
else
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
private function getUrlWith($url, $key, $value)
|
||||
{
|
||||
if (empty($value))
|
||||
return $url;
|
||||
if (strpos($url, '?') !== false)
|
||||
return $url.'&'.$key.'='.$value;
|
||||
return $url.'?'.$key.'='.$value;
|
||||
}
|
||||
|
||||
private function _postProcess()
|
||||
{
|
||||
Configuration::updateValue('GSITEMAP_ALL_CMS', (int)Tools::getValue('GSITEMAP_ALL_CMS'));
|
||||
Configuration::updateValue('GSITEMAP_ALL_PRODUCTS', (int)Tools::getValue('GSITEMAP_ALL_PRODUCTS'));
|
||||
|
||||
if (Shop::isFeatureActive())
|
||||
$res = $this->generateSitemapIndex();
|
||||
else
|
||||
$res = $this->generateSitemap(Configuration::get('PS_SHOP_DEFAULT'), GSITEMAP_FILE);
|
||||
|
||||
$this->_html .= '<h3 class="'. ($res ? 'conf confirm' : 'alert error') .'" style="margin-bottom: 20px">';
|
||||
$this->_html .= $res ? $this->l('Sitemap file generated.') : $this->l('Error while creating sitemap file.');
|
||||
$this->_html .= '</h3>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate sitemap index to reference the sitemap of each shop
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function generateSitemapIndex()
|
||||
{
|
||||
$xmlString = <<<XML
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
||||
</sitemapindex>
|
||||
XML;
|
||||
$xml = new SimpleXMLElement($xmlString);
|
||||
|
||||
$sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri
|
||||
FROM '._DB_PREFIX_.'shop s
|
||||
INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1
|
||||
WHERE s.active = 1
|
||||
AND s.deleted = 0
|
||||
AND su.active = 1';
|
||||
if (!$result = Db::getInstance()->executeS($sql))
|
||||
return false;
|
||||
|
||||
$res = true;
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$info = pathinfo(GSITEMAP_FILE);
|
||||
$filename = $info['filename'].'-'.$row['id_shop'].'.'.$info['extension'];
|
||||
|
||||
$replaceUrl = array('http://'.$row['domain'].$row['uri'], ((Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$row['domain_ssl'].$row['uri']);
|
||||
|
||||
$last = $this->generateSitemap($row['id_shop'], $info['dirname'].'/'.$filename, $replaceUrl);
|
||||
if ($last)
|
||||
{
|
||||
$this->_addSitemapIndexNode($xml, 'http://'.$row['domain'].(($row['uri']) ? $row['uri'] : '/').$filename, date('Y-m-d'));
|
||||
}
|
||||
$res &= $last;
|
||||
}
|
||||
|
||||
$fp = fopen(GSITEMAP_FILE, 'w');
|
||||
fwrite($fp, $xml->asXML());
|
||||
fclose($fp);
|
||||
|
||||
return $res && file_exists(GSITEMAP_FILE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a sitemap for a shop
|
||||
*
|
||||
* @param int $id_shop
|
||||
* @param string $filename
|
||||
* @return bool
|
||||
*/
|
||||
private function generateSitemap($id_shop, $filename = '', $replace_url = array())
|
||||
{
|
||||
$langs = Language::getLanguages();
|
||||
$shop = new Shop($id_shop);
|
||||
if (!$shop->id)
|
||||
return false;
|
||||
|
||||
$xmlString = <<<XML
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
||||
</urlset>
|
||||
XML;
|
||||
|
||||
$xml = new SimpleXMLElement($xmlString);
|
||||
|
||||
if (Configuration::get('PS_REWRITING_SETTINGS') && count($langs) > 1)
|
||||
foreach($langs as $lang)
|
||||
{
|
||||
$this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__.$lang['iso_code'].'/', '1.00', 'daily', date('Y-m-d'));
|
||||
}
|
||||
else
|
||||
$this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__, '1.00', 'daily', date('Y-m-d'));
|
||||
|
||||
/* Product Generator */
|
||||
$sql = 'SELECT p.id_product, pl.link_rewrite, DATE_FORMAT(IF(ps.date_upd,ps.date_upd,ps.date_add), \'%Y-%m-%d\') date_upd, pl.id_lang, cl.`link_rewrite` category, ean13, i.id_image, il.legend legend_image, (
|
||||
SELECT MIN(level_depth)
|
||||
FROM '._DB_PREFIX_.'product p2
|
||||
'.Shop::addSqlAssociation('product', 'p2').'
|
||||
LEFT JOIN '._DB_PREFIX_.'category_product cp2 ON p2.id_product = cp2.id_product
|
||||
LEFT JOIN '._DB_PREFIX_.'category c2 ON cp2.id_category = c2.id_category
|
||||
WHERE p2.id_product = p.id_product AND product_shop.`active` = 1 AND c2.`active` = 1) AS level_depth
|
||||
FROM '._DB_PREFIX_.'product p
|
||||
LEFT JOIN '._DB_PREFIX_.'product_shop ps ON (ps.id_product = p.id_product AND ps.id_shop = '.(int)$id_shop.')
|
||||
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product)
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (ps.id_category_default = cl.id_category AND pl.id_lang = cl.id_lang AND cl.id_shop = '.(int)$id_shop.')
|
||||
LEFT JOIN '._DB_PREFIX_.'image i ON p.id_product = i.id_product
|
||||
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image)
|
||||
LEFT JOIN '._DB_PREFIX_.'lang l ON (pl.id_lang = l.id_lang)
|
||||
WHERE l.`active` = 1
|
||||
AND ps.`active` = 1
|
||||
AND ps.id_shop = '.(int)$id_shop.'
|
||||
'.(Configuration::get('GSITEMAP_ALL_PRODUCTS') ? '' : 'HAVING level_depth IS NOT NULL').'
|
||||
ORDER BY pl.id_product, pl.id_lang ASC';
|
||||
|
||||
$resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql);
|
||||
|
||||
// array used to know which product/image was already added (blacklist)
|
||||
$done = null;
|
||||
$sitemap = null;
|
||||
|
||||
// iterates on the products, to gather the image ids
|
||||
while ($product = Db::getInstance()->nextRow($resource))
|
||||
{
|
||||
// if the product has not been added
|
||||
$id_product = $product['id_product'];
|
||||
if (!isset($done[$id_product]['added']))
|
||||
{
|
||||
// priority
|
||||
if (($priority = 0.7 - ($product['level_depth'] / 10)) < 0.1)
|
||||
$priority = 0.1;
|
||||
|
||||
// adds the product
|
||||
$tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang']));
|
||||
$sitemap = $this->_addSitemapNode($xml, $tmpLink, $priority, 'weekly', substr($product['date_upd'], 0, 10));
|
||||
|
||||
// considers the product has added
|
||||
$done[$id_product]['added'] = true;
|
||||
}
|
||||
|
||||
// if the image has not been added
|
||||
$id_image = $product['id_image'];
|
||||
if (!isset($done[$id_product][$id_image]) && $id_image)
|
||||
{
|
||||
// adds the image
|
||||
$this->_addSitemapNodeImage($sitemap, $product);
|
||||
|
||||
// considers the image as added
|
||||
$done[$id_product][$id_image] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Categories Generator */
|
||||
if (Configuration::get('PS_REWRITING_SETTINGS'))
|
||||
$categories = Db::getInstance()->executeS('
|
||||
SELECT c.id_category, c.level_depth, link_rewrite, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd, cl.id_lang
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON c.id_category = cl.id_category
|
||||
LEFT JOIN '._DB_PREFIX_.'lang l ON cl.id_lang = l.id_lang
|
||||
WHERE l.`active` = 1 AND c.`active` = 1 AND c.id_category != 1
|
||||
ORDER BY cl.id_category, cl.id_lang ASC');
|
||||
else
|
||||
$categories = Db::getInstance()->executeS(
|
||||
'SELECT c.id_category, c.level_depth, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd
|
||||
FROM '._DB_PREFIX_.'category c
|
||||
ORDER BY c.id_category ASC');
|
||||
|
||||
|
||||
foreach($categories as $category)
|
||||
{
|
||||
if (($priority = 0.9 - ($category['level_depth'] / 10)) < 0.1)
|
||||
$priority = 0.1;
|
||||
|
||||
$tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ?
|
||||
$this->context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'], (int)$category['id_lang'])
|
||||
: $this->context->link->getCategoryLink((int)$category['id_category']);
|
||||
$this->_addSitemapNode($xml, htmlspecialchars($tmpLink), $priority, 'weekly', substr($category['date_upd'], 0, 10));
|
||||
}
|
||||
|
||||
/* CMS Generator */
|
||||
if (Configuration::get('GSITEMAP_ALL_CMS') || !Module::isInstalled('blockcms'))
|
||||
$sql_cms = '
|
||||
SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms').
|
||||
' FROM '._DB_PREFIX_.'cms_lang cl
|
||||
LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang)
|
||||
WHERE l.`active` = 1
|
||||
ORDER BY cl.id_cms, cl.id_lang ASC';
|
||||
else if (Module::isInstalled('blockcms'))
|
||||
$sql_cms = '
|
||||
SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms').
|
||||
' FROM '._DB_PREFIX_.'cms_block_page b
|
||||
LEFT JOIN '._DB_PREFIX_.'cms_lang cl ON (b.id_cms = cl.id_cms)
|
||||
LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang)
|
||||
WHERE l.`active` = 1
|
||||
ORDER BY cl.id_cms, cl.id_lang ASC';
|
||||
|
||||
$cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_cms);
|
||||
foreach($cmss as $cms)
|
||||
{
|
||||
$tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ?
|
||||
$this->context->link->getCMSLink((int)$cms['id_cms'], $cms['link_rewrite'], false, (int)$cms['id_lang'])
|
||||
: $this->context->link->getCMSLink((int)$cms['id_cms']);
|
||||
$this->_addSitemapNode($xml, $tmpLink, '0.8', 'daily');
|
||||
}
|
||||
|
||||
/* Add classic pages (contact, best sales, new products...) */
|
||||
$pages = array(
|
||||
'supplier' => false,
|
||||
'manufacturer' => false,
|
||||
'new-products' => false,
|
||||
'prices-drop' => false,
|
||||
'stores' => false,
|
||||
'authentication' => true,
|
||||
'best-sales' => false,
|
||||
'contact-form' => true);
|
||||
|
||||
// Don't show suppliers and manufacturers if they are disallowed
|
||||
if (!Module::getInstanceByName('blockmanufacturer')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS'))
|
||||
unset($pages['manufacturer']);
|
||||
|
||||
if (!Module::getInstanceByName('blocksupplier')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS'))
|
||||
unset($pages['supplier']);
|
||||
|
||||
// Generate nodes for pages
|
||||
if(Configuration::get('PS_REWRITING_SETTINGS'))
|
||||
foreach ($pages as $page => $ssl)
|
||||
foreach($langs as $lang)
|
||||
$this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl, $lang['id_lang']), '0.5', 'monthly');
|
||||
else
|
||||
foreach($pages as $page => $ssl)
|
||||
$this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl), '0.5', 'monthly');
|
||||
|
||||
$xml_string = $xml->asXML();
|
||||
|
||||
// Replace URL in XML strings by real shops URL
|
||||
if ($replace_url)
|
||||
$xml_string = str_replace(array(Tools::getShopDomain(true).__PS_BASE_URI__, Tools::getShopDomainSsl(true).__PS_BASE_URI__), $replace_url, $xml_string);
|
||||
|
||||
$fp = fopen($filename, 'w');
|
||||
fwrite($fp, $xml_string);
|
||||
fclose($fp);
|
||||
|
||||
return file_exists($filename);
|
||||
}
|
||||
|
||||
private function _addSitemapIndexNode($xml, $loc, $last_mod)
|
||||
{
|
||||
$sitemap = $xml->addChild('sitemap');
|
||||
$sitemap->addChild('loc', htmlspecialchars($loc));
|
||||
$sitemap->addChild('lastmod', $last_mod);
|
||||
return $sitemap;
|
||||
}
|
||||
|
||||
private function _addSitemapNode($xml, $loc, $priority, $change_freq, $last_mod = NULL)
|
||||
{
|
||||
$sitemap = $xml->addChild('url');
|
||||
$sitemap->addChild('loc', htmlspecialchars($loc));
|
||||
$sitemap->addChild('priority', number_format($priority,1,'.',''));
|
||||
if ($last_mod)
|
||||
$sitemap->addChild('lastmod', $last_mod);
|
||||
$sitemap->addChild('changefreq', $change_freq);
|
||||
return $sitemap;
|
||||
}
|
||||
|
||||
private function _addSitemapNodeImage($xml, $product)
|
||||
{
|
||||
$image = $xml->addChild('image', null, 'http://www.google.com/schemas/sitemap-image/1.1');
|
||||
$image->addChild('loc', htmlspecialchars($this->context->link->getImageLink($product['link_rewrite'], (int)$product['id_product'].'-'.(int)$product['id_image'])), 'http://www.google.com/schemas/sitemap-image/1.1');
|
||||
|
||||
$legend_image = preg_replace('/(&+)/i', '&', $product['legend_image']);
|
||||
$image->addChild('caption', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
|
||||
$image->addChild('title', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
|
||||
}
|
||||
|
||||
private function _displaySitemap()
|
||||
{
|
||||
if (Shop::isFeatureActive())
|
||||
{
|
||||
$sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri
|
||||
FROM '._DB_PREFIX_.'shop s
|
||||
INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1
|
||||
WHERE s.active = 1
|
||||
AND s.deleted = 0
|
||||
AND su.active = 1';
|
||||
if (!$result = Db::getInstance()->executeS($sql))
|
||||
return '';
|
||||
|
||||
$this->_html .= '<h2>'.$this->l('Sitemap index').'</h2>';
|
||||
$this->_html .= '<p>'.$this->l('Your Google sitemap file is online at the following address:').'<br />
|
||||
<a href="'.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml" target="_blank"><b>'.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml</b></a></p><br />';
|
||||
|
||||
$info = pathinfo(GSITEMAP_FILE);
|
||||
foreach ($result as $shop)
|
||||
{
|
||||
$filename = $info['dirname'].'/'.$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension'];
|
||||
if (file_exists($filename) && filesize($filename))
|
||||
{
|
||||
$fp = fopen($filename, 'r');
|
||||
$fstat = fstat($fp);
|
||||
fclose($fp);
|
||||
$xml = simplexml_load_file($filename);
|
||||
|
||||
$nbPages = count($xml->url);
|
||||
$sitemap_uri = 'http://'.$shop['domain'].$shop['uri'].$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension'];
|
||||
|
||||
$this->_html .= '<h2>'.$this->l('Sitemap for: ').$shop['domain'].$shop['uri'].'</h2>';
|
||||
$this->_html .= '<p>'.$this->l('Your Google sitemap file is online at the following address:').'<br />
|
||||
<a href="'.$sitemap_uri.'" target="_blank"><b>'.$sitemap_uri.'</b></a></p><br />';
|
||||
|
||||
$this->_html .= $this->l('Update:').' <b>'.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'</b><br />';
|
||||
$this->_html .= $this->l('Filesize:').' <b>'.number_format(($fstat['size']*.000001), 3).'MB</b><br />';
|
||||
$this->_html .= $this->l('Indexed pages:').' <b>'.$nbPages.'</b><br /><br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (file_exists(GSITEMAP_FILE) && filesize(GSITEMAP_FILE))
|
||||
{
|
||||
$fp = fopen(GSITEMAP_FILE, 'r');
|
||||
$fstat = fstat($fp);
|
||||
fclose($fp);
|
||||
$xml = simplexml_load_file(GSITEMAP_FILE);
|
||||
|
||||
$nbPages = count($xml->url);
|
||||
|
||||
$this->_html .= '<p>'.$this->l('Your Google sitemap file is online at the following address:').'<br />
|
||||
<a href="'.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml" target="_blank"><b>'.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml</b></a></p><br />';
|
||||
|
||||
$this->_html .= $this->l('Update:').' <b>'.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'</b><br />';
|
||||
$this->_html .= $this->l('Filesize:').' <b>'.number_format(($fstat['size']*.000001), 3).'MB</b><br />';
|
||||
$this->_html .= $this->l('Indexed pages:').' <b>'.$nbPages.'</b><br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
private function _displayForm()
|
||||
{
|
||||
if (Tools::usingSecureMode())
|
||||
$domain = Tools::getShopDomainSsl(true);
|
||||
else
|
||||
$domain = Tools::getShopDomain(true);
|
||||
|
||||
$this->_html .= '
|
||||
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">
|
||||
<div style="margin:0 0 20px 0;">
|
||||
<input type="checkbox" name="GSITEMAP_ALL_PRODUCTS" id="GSITEMAP_ALL_PRODUCTS" style="vertical-align: middle;" value="1" '.(Configuration::get('GSITEMAP_ALL_PRODUCTS') ? 'checked="checked"' : '').' /> <label class="t" for="GSITEMAP_ALL_PRODUCTS">'.$this->l('Sitemap also includes products from inactive categories.').'</label>
|
||||
</div>
|
||||
<div style="margin:0 0 20px 0;">
|
||||
<input type="checkbox" name="GSITEMAP_ALL_CMS" id="GSITEMAP_ALL_CMS" style="vertical-align: middle;" value="1" '.(Configuration::get('GSITEMAP_ALL_CMS') ? 'checked="checked"' : '').' /> <label class="t" for="GSITEMAP_ALL_CMS">'.$this->l('Sitemap also includes CMS pages not found in a CMS block.').'</label>
|
||||
</div>
|
||||
<input name="btnSubmit" class="button" type="submit"
|
||||
value="'.((!file_exists(GSITEMAP_FILE)) ? $this->l('Generate a sitemap file.') : $this->l('Update the sitemap file.')).'" />
|
||||
</form><br />
|
||||
<h2>'.$this->l('Use cron job to re-build the sitemap:').'</h2>
|
||||
<p>
|
||||
<b>'.$domain.__PS_BASE_URI__.'modules/gsitemap/gsitemap-cron.php?&token='.substr(Tools::encrypt('gsitemap/cron'),0,10).'&GSITEMAP_ALL_CMS='.((int)Configuration::get('GSITEMAP_ALL_CMS')).'&GSITEMAP_ALL_PRODUCTS='.((int)Configuration::get('GSITEMAP_ALL_PRODUCTS')).'</b>
|
||||
</p>';
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
if (Tools::isSubmit('btnSubmit'))
|
||||
{
|
||||
$this->_postValidation();
|
||||
if (!count($this->_postErrors))
|
||||
$this->_postProcess();
|
||||
else
|
||||
foreach ($this->_postErrors as $err)
|
||||
$this->_html .= '<div class="alert error">'.$err.'</div>';
|
||||
}
|
||||
|
||||
$this->_html .= '
|
||||
<fieldset>
|
||||
<legend>'.$this->l('Search Engine Optimization (SEO).').'</legend>
|
||||
<br />
|
||||
'.$this->l('See').' <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156184&from=40318&rd=1" style="font-weight:bold;text-decoration:underline;" target="_blank">
|
||||
'.$this->l('This page').'</a> '.$this->l('For more information').'
|
||||
<br />';
|
||||
|
||||
$this->_displaySitemap();
|
||||
$this->_displayForm();
|
||||
|
||||
$this->_html .= '</fieldset>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 378 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2013 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -80,7 +80,7 @@ class HomeFeatured extends Module
|
||||
<label>'.$this->l('Define the number of products to be displayed.').'</label>
|
||||
<div class="margin-form">
|
||||
<input type="text" size="5" name="nbr" value="'.Tools::safeOutput(Tools::getValue('nbr', (int)(Configuration::get('HOME_FEATURED_NBR')))).'" />
|
||||
<p class="clear">'.$this->l('Define the number of products that you would like to display on homepage (default: 10).').'</p>
|
||||
<p class="clear">'.$this->l('Define the number of products that you would like to display on homepage (default: 8).').'</p>
|
||||
|
||||
</div>
|
||||
<center><input type="submit" name="submitHomeFeatured" value="'.$this->l('Save').'" class="button" /></center>
|
||||
|
||||
@@ -339,11 +339,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:#DB3484; font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')),
|
||||
'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>')),
|
||||
'{invoice_block_html}' => MailAlert::getFormatedAddress($invoice, '<br />', array(
|
||||
'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>',
|
||||
'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')),
|
||||
'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>')),
|
||||
'{delivery_company}' => $delivery->company,
|
||||
'{delivery_firstname}' => $delivery->firstname,
|
||||
'{delivery_lastname}' => $delivery->lastname,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is now available.</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is now available.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -26,7 +26,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is almost out of stock.</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is almost out of stock.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">The stock cover is now less than the specified minimum of <strong>{warning_coverage}</strong>.<br /><br /> <strong>Current stock cover: <span style="color: #db3484;">{current_coverage}</span></strong><br /><br /></td>
|
||||
<td align="left">The stock cover is now less than the specified minimum of <strong>{warning_coverage}</strong>.<br /><br /> <strong>Current stock cover: <span style="color: {color};">{current_coverage}</span></strong><br /><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is nearly out of stock.</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{product} is nearly out of stock.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">The remaining stock is now less than the specified minimum of <strong>{last_qty}</strong>.<br /><br /> <strong>Remaining stock: <span style="color: #db3484;">{qty}</span></strong><br /><br /> You are advised to open the product's admin Product Page in order to replenish your inventory.</td>
|
||||
<td align="left">The remaining stock is now less than the specified minimum of <strong>{last_qty}</strong>.<br /><br /> <strong>Remaining stock: <span style="color: {color};">{qty}</span></strong><br /><br /> You are advised to open the product's admin Product Page in order to replenish your inventory.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -435,7 +435,7 @@ class PSCleaner extends Module
|
||||
);
|
||||
foreach ($tables as $table)
|
||||
$db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`');
|
||||
$db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_customer > 0');
|
||||
$db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_manufacturer > 0 OR id_supplier > 0 OR id_warehouse > 0');
|
||||
|
||||
Image::deleteAllImages(_PS_PROD_IMG_DIR_);
|
||||
if (!file_exists(_PS_PROD_IMG_DIR_))
|
||||
@@ -488,7 +488,7 @@ class PSCleaner extends Module
|
||||
);
|
||||
foreach ($tables as $table)
|
||||
$db->execute('TRUNCATE TABLE `'._DB_PREFIX_.bqSQL($table).'`');
|
||||
$db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_manufacturer > 0 OR id_supplier > 0');
|
||||
$db->execute('DELETE FROM `'._DB_PREFIX_.'address` WHERE id_customer > 0');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your referred friend, <strong>{sponsored_firstname} {sponsored_lastname}</strong> has placed his or her first order on <a style="color: #fff; font-size: 12px; font-weight: bold;" href="{shop_url}">{shop_name}</a>!</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your referred friend, <strong>{sponsored_firstname} {sponsored_lastname}</strong> has placed his or her first order on <a style="color: #fff; font-size: 12px; font-weight: bold;" href="{shop_url}">{shop_name}</a>!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><strong style="color: #db3484;">{firstname_friend} {lastname_friend}, join us!</strong></td>
|
||||
<td align="left"><strong style="color: {color};">{firstname_friend} {lastname_friend}, join us!</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your friend <strong>{firstname} {lastname}</strong> wants to refer you on <a style="color: #fff; font-size: 12px; font-weight: bold;" href="{shop_url}">{shop_name}</a>!</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Your friend <strong>{firstname} {lastname}</strong> wants to refer you on <a style="color: #fff; font-size: 12px; font-weight: bold;" href="{shop_url}">{shop_name}</a>!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -50,7 +50,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{firstname} {lastname}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{firstname} {lastname}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Referral Program</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">Referral Program</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -38,7 +38,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered by <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">Hi <strong style="color: #db3484;">{name}</strong>,</td>
|
||||
<td align="left">Hi <strong style="color: {color};">{name}</strong>,</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #db3484; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{customer} has sent you a link to a product that (s)he thinks may interest you.</td>
|
||||
<td style="background-color: {color}; color: #fff; font-size: 12px; font-weight: bold; padding: 0.5em 1em;" align="left">{customer} has sent you a link to a product that (s)he thinks may interest you.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -32,7 +32,7 @@
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: #db3484; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
<td style="font-size: 10px; border-top: 1px solid #D9DADE;" align="center"><a style="color: {color}; font-weight: bold; text-decoration: none;" href="{shop_url}">{shop_name}</a> powered with <a style="text-decoration: none; color: #374953;" href="http://www.prestashop.com/">PrestaShop™</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -220,7 +220,7 @@ $(function(){ldelim}
|
||||
</p>
|
||||
<p class="required text" id="adress_alias">
|
||||
<label for="alias">{l s='Please assign an address title for future reference.'} <sup>*</sup></label>
|
||||
<input type="text" id="alias" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias}{else if !isset($select_address)}{l s='My address'}{/if}" />
|
||||
<input type="text" id="alias" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias}{elseif !$select_address}{l s='My address'}{/if}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
<p class="submit2">
|
||||
|
||||
@@ -70,7 +70,7 @@ $(document).ready(function() {
|
||||
</script>
|
||||
|
||||
<h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}</h1>
|
||||
|
||||
{if !isset($back) || $back != 'my-account'}{assign var='current_step' value='login'}{include file="$tpl_dir./order-steps.tpl"}{/if}
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
{assign var='stateExist' value=false}
|
||||
{if !isset($email_create)}
|
||||
|
||||
@@ -20,6 +20,8 @@ sub{vertical-align:baseline}
|
||||
legend{color:#000}
|
||||
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit}
|
||||
input,button,textarea,select{font-size:100%}
|
||||
|
||||
.ie7 input, .ie7 select{line-height:18px}
|
||||
a {cursor:pointer}
|
||||
|
||||
.clearfix:before,
|
||||
@@ -345,6 +347,8 @@ ul.footer_links li .icon {
|
||||
#center_column .sortPagiBar p {padding:0;}
|
||||
#center_column .sortPagiBar form {display:inline-block;}
|
||||
|
||||
.ie7 #center_column .sortPagiBar form {display:inline;}
|
||||
|
||||
.sortPagiBar #productsSortForm {float:right;}
|
||||
.sortPagiBar select#selectPrductSort {
|
||||
margin:0 0 0 10px;
|
||||
@@ -406,6 +410,10 @@ ul.pagination li.disabled span {color:#ccc}
|
||||
|
||||
#pagination_previous {float:left}
|
||||
#pagination_next {float:right}
|
||||
|
||||
.ie7 #pagination_previous,
|
||||
.ie7 #pagination_next {float:none}
|
||||
|
||||
#pagination_previous a, #pagination_previous span,
|
||||
#pagination_next a, #pagination_next span {
|
||||
padding:0 8px;
|
||||
@@ -612,7 +620,6 @@ div.star_hover a, div.star a:hover { background-position: 0 -32px }
|
||||
.idTabs {
|
||||
list-style-type: none;
|
||||
margin-top: 20px;
|
||||
padding:0 5px;
|
||||
border-bottom: 8px solid #f7b900
|
||||
}
|
||||
ul.idTabs li {
|
||||
|
||||
@@ -87,4 +87,7 @@
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
padding: 0;
|
||||
}
|
||||
#address_invoice_form {
|
||||
padding: 0px;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ span.view_scroll_spacer {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.ie7 #pb-left-column #buy_block label {margin-right:5px}
|
||||
.ie7 #pb-left-column #buy_block label {margin-right:5px;float:left}
|
||||
|
||||
/* short description pack */
|
||||
.short_description_pack {
|
||||
@@ -196,7 +196,8 @@ span.view_scroll_spacer {
|
||||
|
||||
.ie7 #attributes .attribute_list {
|
||||
display:inline;
|
||||
zoom:1
|
||||
zoom:1;
|
||||
float:right
|
||||
}
|
||||
|
||||
#attributes .attribute_list ul{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 lt-ie6 " lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 " lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 ie7" lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if IE 8]><html class="no-js lt-ie9 ie8" lang="{$lang_iso}"> <![endif]-->
|
||||
<!--[if gt IE 8]> <html class="no-js ie9" lang="{$lang_iso}"> <![endif]-->
|
||||
|
||||
@@ -201,8 +201,9 @@ function changeAddressDelivery(obj)
|
||||
|
||||
function updateAddressId(id_product, id_product_attribute, old_id_address_delivery, id_address_delivery, line)
|
||||
{
|
||||
|
||||
if (typeof(line) == 'undefined' || line.length == 0)
|
||||
line = $('#product_' + id_product + '_' + id_product_attribute + '_0_' + old_id_address_delivery + ', #product_' + id_product + '_' + id_product_attribute + '_nocustom_' + old_id_address_delivery);
|
||||
line = $('#cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_0_], #cart_summary tr[id^=product_' + id_product + '_' + id_product_attribute + '_nocustom_]');
|
||||
|
||||
$('.product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery).each(function(){
|
||||
$(this).attr('id', $(this).attr('id').replace(/_\d+$/, '_' + id_address_delivery)).removeClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + old_id_address_delivery + ' address_' + old_id_address_delivery).addClass('product_customization_for_' + id_product + '_' + id_product_attribute + '_' + id_address_delivery + ' address_' + id_address_delivery);
|
||||
@@ -654,9 +655,9 @@ function updateCartSummary(json)
|
||||
location.reload();
|
||||
|
||||
if (priceDisplayMethod !== 0)
|
||||
$('#total_discount').html(formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_discount').html('-' + formatCurrency(json.total_discounts_tax_exc, currencyFormat, currencySign, currencyBlank));
|
||||
else
|
||||
$('#total_discount').html(formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank));
|
||||
$('#total_discount').html('-' + formatCurrency(json.total_discounts, currencyFormat, currencySign, currencyBlank));
|
||||
|
||||
$('.cart_discount').each(function(){
|
||||
var idElmt = $(this).attr('id').replace('cart_discount_','');
|
||||
@@ -666,10 +667,12 @@ function updateCartSummary(json)
|
||||
if (json.discounts[i].id_discount == idElmt)
|
||||
{
|
||||
if (json.discounts[i].value_real !== '!')
|
||||
{
|
||||
if (priceDisplayMethod !== 0)
|
||||
$('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_tax_exc * -1, currencyFormat, currencySign, currencyBlank));
|
||||
else
|
||||
$('#cart_discount_' + idElmt + ' td.cart_discount_price span.price-discount').html(formatCurrency(json.discounts[i].value_real * -1, currencyFormat, currencySign, currencyBlank));
|
||||
}
|
||||
toDelete = false;
|
||||
}
|
||||
if (toDelete)
|
||||
|
||||
@@ -265,6 +265,7 @@ function confirmFreeOrder()
|
||||
else
|
||||
$('#opc_account-overlay').fadeIn('slow');
|
||||
$('#opc_delivery_methods-overlay, #opc_payment_methods-overlay').fadeOut('slow');
|
||||
$('#confirmOrder').attr('disabled', 'disabled');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
@@ -275,6 +276,7 @@ function confirmFreeOrder()
|
||||
data: 'ajax=true&method=makeFreeOrder&token=' + static_token ,
|
||||
success: function(html)
|
||||
{
|
||||
$('#confirmOrder').attr('disabled', '');
|
||||
var array_split = html.split(':');
|
||||
if (array_split[0] == 'freeorder')
|
||||
{
|
||||
@@ -401,7 +403,6 @@ function updateNewAccountToAddressBlock()
|
||||
$.each(json.summary.products, function() {
|
||||
updateAddressId(this.id_product, this.id_product_attribute, '0', this.id_address_delivery);
|
||||
});
|
||||
updateCartSummary(json.summary);
|
||||
updateAddressesDisplay(true);
|
||||
updateCarrierList(json.carrier_data);
|
||||
updateCarrierSelectionAndGift();
|
||||
|
||||
@@ -295,17 +295,28 @@ function updateDisplay()
|
||||
var priceTaxExclWithoutGroupReduction = '';
|
||||
|
||||
// retrieve price without group_reduction in order to compute the group reduction after
|
||||
// the specific price discount (done in the JS in order to keep backward compatibility)
|
||||
if (!displayPrice && !noTaxForThisProduct)
|
||||
{
|
||||
priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction);
|
||||
} else {
|
||||
priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction);
|
||||
}
|
||||
var combination_add_price = selectedCombination['price'] * group_reduction;
|
||||
// the specific price discount (done in the JS in order to keep backward compatibility)
|
||||
priceTaxExclWithoutGroupReduction = ps_round(productPriceTaxExcluded, 6) * (1 / group_reduction);
|
||||
|
||||
var tax = (taxRate / 100) + 1;
|
||||
var taxExclPrice = priceTaxExclWithoutGroupReduction + (selectedCombination['price'] * currencyRate);
|
||||
|
||||
if (selectedCombination.specific_price && selectedCombination.specific_price['id_product_attribute'])
|
||||
{
|
||||
if (selectedCombination.specific_price['price'] && selectedCombination.specific_price['price'] >=0)
|
||||
var taxExclPrice = (specific_currency ? selectedCombination.specific_price['price'] : selectedCombination.specific_price['price'] * currencyRate);
|
||||
else
|
||||
var taxExclPrice = productBasePriceTaxExcluded * currencyRate + (selectedCombination['price'] * currencyRate);
|
||||
}
|
||||
else if (product_specific_price.price && product_specific_price.price >= 0)
|
||||
var taxExclPrice = (specific_currency ? product_specific_price.price : product_specific_price.price * currencyRate) + (selectedCombination['price'] * currencyRate);
|
||||
|
||||
if (!displayPrice && !noTaxForThisProduct)
|
||||
productPriceDisplay = taxExclPrice * tax; // Need to be global => no var
|
||||
else
|
||||
productPriceDisplay = ps_round(taxExclPrice, 2); // Need to be global => no var
|
||||
|
||||
productPriceWithoutReductionDisplay = productPriceDisplay * group_reduction;
|
||||
var reduction = 0;
|
||||
if (selectedCombination['specific_price'].reduction_price || selectedCombination['specific_price'].reduction_percent)
|
||||
{
|
||||
@@ -313,18 +324,26 @@ function updateDisplay()
|
||||
reduction = productPriceDisplay * (parseFloat(selectedCombination['specific_price'].reduction_percent) / 100) + reduction_price;
|
||||
if (reduction_price && (displayPrice || noTaxForThisProduct))
|
||||
reduction = ps_round(reduction / tax, 6);
|
||||
|
||||
}
|
||||
else if (product_specific_price.reduction_price || product_specific_price.reduction_percent)
|
||||
else if (product_specific_price && product_specific_price.reduction)
|
||||
{
|
||||
reduction_price = (specific_currency ? product_specific_price.reduction_price : product_specific_price.reduction_price * currencyRate);
|
||||
reduction = productPriceDisplay * (parseFloat(product_specific_price.reduction_percent) / 100) + reduction_price;
|
||||
if (product_specific_price.reduction_type == 'amount')
|
||||
reduction_price = (specific_currency ? product_specific_price.reduction : product_specific_price.reduction * currencyRate);
|
||||
else
|
||||
reduction_price = 0;
|
||||
|
||||
if (product_specific_price.reduction_type == 'percentage')
|
||||
reduction_percent = productPriceDisplay * parseFloat(product_specific_price.reduction);
|
||||
|
||||
reduction = reduction_price + reduction_percent;
|
||||
if (reduction_price && (displayPrice || noTaxForThisProduct))
|
||||
reduction = ps_round(reduction / tax, 6);
|
||||
}
|
||||
|
||||
if (selectedCombination.specific_price)
|
||||
{
|
||||
if (selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||
if (selectedCombination['specific_price'] && selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||
{
|
||||
$('#reduction_amount').hide();
|
||||
$('#reduction_percent_display').html('-' + parseFloat(selectedCombination['specific_price'].reduction_percent) + '%');
|
||||
@@ -338,36 +357,20 @@ function updateDisplay()
|
||||
$('#reduction_amount').hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
if (product_specific_price['reduction_type'] == 'percentage')
|
||||
$('#reduction_percent_display').html(product_specific_price['specific_price'].reduction_percent);
|
||||
|
||||
if (product_specific_price['reduction_type'] != '' || selectedCombination['specific_price'].reduction_type != '')
|
||||
$('#discount_reduced_price,#old_price').show();
|
||||
else
|
||||
$('#discount_reduced_price,#old_price').hide();
|
||||
|
||||
if (product_specific_price['reduction_type'] == 'percentage' || selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||
if ((product_specific_price['reduction_type'] == 'percentage' && selectedCombination['specific_price'].reduction_type == 'percentage') || selectedCombination['specific_price'].reduction_type == 'percentage')
|
||||
$('#reduction_percent').show();
|
||||
else
|
||||
$('#reduction_percent').hide();
|
||||
if (product_specific_price['price'] || selectedCombination.specific_price['price'])
|
||||
if (product_specific_price['price'] || (selectedCombination.specific_price && selectedCombination.specific_price['price']))
|
||||
$('#not_impacted_by_discount').show();
|
||||
else
|
||||
$('#not_impacted_by_discount').hide();
|
||||
|
||||
if (selectedCombination.specific_price['price'] && selectedCombination.specific_price['price'] >=0)
|
||||
var taxExclPrice = (specific_currency ? selectedCombination.specific_price['price'] : selectedCombination.specific_price['price'] * currencyRate);
|
||||
else
|
||||
var taxExclPrice = priceTaxExclWithoutGroupReduction + (selectedCombination['price'] * currencyRate);
|
||||
|
||||
if (!displayPrice && !noTaxForThisProduct)
|
||||
productPriceDisplay = taxExclPrice * tax; // Need to be global => no var
|
||||
else
|
||||
productPriceDisplay = ps_round(taxExclPrice, 2); // Need to be global => no var
|
||||
|
||||
productPriceWithoutReductionDisplay = productPriceDisplay * group_reduction;
|
||||
|
||||
productPriceDisplay -= reduction;
|
||||
var tmp = productPriceDisplay * group_reduction;
|
||||
productPriceDisplay = ps_round(productPriceDisplay * group_reduction, 2);
|
||||
@@ -421,7 +424,7 @@ function displayImage(domAAroundImgThumb, no_animation)
|
||||
{
|
||||
$('#bigpic').attr('src', newSrc);
|
||||
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
|
||||
$(this).attr('alt', domAAroundImgThumb.attr('href'));
|
||||
$('#bigpic').attr('rel', domAAroundImgThumb.attr('href'));
|
||||
}
|
||||
$('#views_block li a').removeClass('shown');
|
||||
$(domAAroundImgThumb).addClass('shown');
|
||||
@@ -525,6 +528,7 @@ $(document).ready(function()
|
||||
//set jqZoom parameters if needed
|
||||
if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled)
|
||||
{
|
||||
$('#bigpic').attr('rel', $('#bigpic').attr('src').replace('thickbox', 'large'));
|
||||
$('img.jqzoom').jqueryzoom({
|
||||
xzoom: 200, //zooming div default width(default width value is 200)
|
||||
yzoom: 200, //zooming div default width(default height value is 200)
|
||||
@@ -719,4 +723,4 @@ function checkUrl()
|
||||
window.location = url.substring(0, url.indexOf('#'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr width="99%" align="center" size="2" class=""/>
|
||||
<hr/>
|
||||
|
||||
<form action="{$link->getPageLink('authentication', true)}" method="post" class="login_form">
|
||||
<h2>{l s='Already registered?'}</h2>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
{include file="./pagination.tpl"}
|
||||
|
||||
@@ -45,13 +45,13 @@
|
||||
<p>{$category->description}</p>
|
||||
{/if}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2" class="margin_less"/>
|
||||
<hr class="margin_less"/>
|
||||
{/if}
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
<p class="nbr_result">{include file="$tpl_dir./category-count.tpl"}</p>
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2" class="margin_less"/>
|
||||
<hr class="margin_less"/>
|
||||
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<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}
|
||||
</select>
|
||||
</p>
|
||||
|
||||
<p id="desc_contact0" class="desc_contact"> </p>
|
||||
{foreach from=$contacts item=contact}
|
||||
<p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;">
|
||||
@@ -65,7 +65,11 @@
|
||||
{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>{$orderList}</select>
|
||||
<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}
|
||||
</select>
|
||||
{elseif !isset($customerThread.id_order) && !isset($isLogged)}
|
||||
<input type="text" placeholder="{l s='Order ID'}" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order)}{$smarty.post.id_order|intval}{/if}{/if}" />
|
||||
{elseif $customerThread.id_order > 0}
|
||||
@@ -75,8 +79,15 @@
|
||||
{/if}
|
||||
{if isset($isLogged) && $isLogged}
|
||||
<fieldset>
|
||||
|
||||
{if !isset($customerThread.id_product)}
|
||||
<select name="id_product" style="width:300px;"><option value="0">-- {l s='Product'} --</option>{$orderedProductList}</select>
|
||||
{foreach from=$orderedProductList key=id_order item=products name=products}
|
||||
<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}
|
||||
</select>
|
||||
{/foreach}
|
||||
{elseif $customerThread.id_product > 0}
|
||||
<input type="text" name="id_product" id="id_product" value="{$customerThread.id_product|intval}" readonly="readonly" />
|
||||
{/if}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="{$lang_iso}">
|
||||
<head>
|
||||
<title>{$meta_title|escape:'htmlall':'UTF-8'}</title>
|
||||
{*<meta name="viewport" content="width=device-width, initial-scale=1">*}
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
{include file="./pagination.tpl"}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
{include file="./pagination.tpl"}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
{elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}<p class="address_phone_mobile">{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</p>
|
||||
{else}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
<p>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$invoiceAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</p>
|
||||
<p>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item|replace:',':''}">{$invoiceAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}</span>{/foreach}</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</li>
|
||||
@@ -130,7 +130,7 @@
|
||||
{elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<p class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</p>
|
||||
{else}
|
||||
{assign var=address_words value=" "|explode:$field_item}
|
||||
<p>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</p>
|
||||
<p>{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item|replace:',':''}">{$deliveryAddressFormatedValues[$word_item|replace:',':'']|escape:'htmlall':'UTF-8'}</span>{/foreach}</p>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</li>
|
||||
@@ -174,7 +174,7 @@
|
||||
{if $priceDisplay && $use_tax}
|
||||
<li data-theme="b" class="item">
|
||||
{l s='Total products (tax excl.)'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency}</span>
|
||||
</tr>
|
||||
</li>
|
||||
{/if}
|
||||
<li data-theme="b" class="item">
|
||||
{l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency}</span>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<hr width="99%" align="center" size="2" class=""/>
|
||||
<hr/>
|
||||
<h2 class="site_map">{l s='Sitemap'}</h2>
|
||||
<ul data-role="listview" data-inset="true" id="category">
|
||||
{if $controller_name != 'index'}<li><a href="{$link->getPageLink('index', true)}" data-ajax="false">Accueil</a></li>{/if}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
{include file="./pagination.tpl"}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($groups)}
|
||||
<hr width="99%" align="center" size="2" class="margin_less"/>
|
||||
<hr class="margin_less"/>
|
||||
|
||||
<div id="attributes">
|
||||
{foreach from=$groups key=id_attribute_group item=group}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{if isset($product) && $product->description}
|
||||
<div data-role="collapsible" data-theme="a" data-content-theme="a">
|
||||
<h3>{l s='More info'}</h3>
|
||||
<p>{$product->description}</p>
|
||||
<div>{$product->description}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
</div><!-- .clearfix -->
|
||||
|
||||
{if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
|
||||
<hr width="99%" align="center" size="2" class="margin_less"/>
|
||||
<hr class="margin_less"/>
|
||||
{include file="./product-prices.tpl"}
|
||||
{else}
|
||||
<hr width="99%" align="center" size="2" class="margin_bottom"/>
|
||||
<hr class="margin_bottom"/>
|
||||
{/if}
|
||||
<div id="displayMobileAddToCartTop">
|
||||
{hook h="displayMobileAddToCartTop"}
|
||||
@@ -147,13 +147,13 @@
|
||||
{include file="./product-quantity-discount.tpl"}
|
||||
{* ================================== *}
|
||||
|
||||
<hr width="99%" align="center" size="2" class=""/>
|
||||
<hr/>
|
||||
<!-- description and features -->
|
||||
{include file="./product-desc-features.tpl"}
|
||||
|
||||
{if isset($packItems) && $packItems|@count > 0}
|
||||
<!-- pack list -->
|
||||
<hr width="99%" align="center" size="2" class="margin_less"/>
|
||||
<hr class="margin_less"/>
|
||||
<div id="blockpack">
|
||||
<h2>{l s='Pack content'}</h2>
|
||||
{include file="./category-product-list.tpl" products=$packItems}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{if !isset($instantSearch) || (isset($instantSearch) && !$instantSearch)}
|
||||
{include file="./pagination.tpl"}
|
||||
{/if}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div id="hook_mobile_top_site_map">
|
||||
{hook h="displayMobileTopSiteMap"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2" class=""/>
|
||||
<hr/>
|
||||
{if isset($categoriesTree.children)}
|
||||
<h2>{l s='Our offers'}</h2>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
<hr width="99%" align="center" size="2" class=""/>
|
||||
<hr/>
|
||||
<h2>{l s='Sitemap'}</h2>
|
||||
<ul data-role="listview" data-inset="true" id="category">
|
||||
{if $controller_name != 'index'}<li><a href="{$link->getPageLink('index', true)}">{l s='Home'}</a></li>{/if}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="clearfix">
|
||||
{include file="./category-product-sort.tpl" container_class="container-sort"}
|
||||
</div>
|
||||
<hr width="99%" align="center" size="2"/>
|
||||
<hr/>
|
||||
{include file="./pagination.tpl"}
|
||||
{include file="./category-product-list.tpl" products=$products}
|
||||
{include file="./pagination.tpl"}
|
||||
|
||||
@@ -116,27 +116,24 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
|
||||
</dl>
|
||||
{/if}
|
||||
<p class="cart_block_no_products{if $products} hidden{/if}" id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
|
||||
{if $discounts|@count > 0}
|
||||
<table id="vouchers">
|
||||
<table id="vouchers"{if $discounts|@count == 0} style="display:none;"{/if}>
|
||||
<tbody>
|
||||
{foreach from=$discounts item=discount}
|
||||
{if $discount.value_real > 0}
|
||||
<tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}">
|
||||
<td class="quantity">1x</td>
|
||||
<td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
|
||||
<td class="price">-{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}</td>
|
||||
<td class="delete">
|
||||
{if strlen($discount.code)}
|
||||
<a class="delete_voucher" href="{$link->getPageLink('$order_process', true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete' mod='blockcart'}" rel="nofollow"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete' mod='blockcart'}" class="icon" /></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{foreach from=$discounts item=discount}
|
||||
{if $discount.value_real > 0}
|
||||
<tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}">
|
||||
<td class="quantity">1x</td>
|
||||
<td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
|
||||
<td class="price">-{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}</td>
|
||||
<td class="delete">
|
||||
{if strlen($discount.code)}
|
||||
<a class="delete_voucher" href="{$link->getPageLink('$order_process', true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete' mod='blockcart'}" rel="nofollow"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete' mod='blockcart'}" class="icon" /></a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
</table>
|
||||
<p id="cart-prices">
|
||||
<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
|
||||
<span>{l s='Shipping' mod='blockcart'}</span>
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter' js=1}')this.value='';"
|
||||
onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter' js=1}';"
|
||||
class="inputNew" />
|
||||
<!--<select name="action">
|
||||
<option value="0"{if isset($action) && $action == 0} selected="selected"{/if}>{l s='Subscribe' mod='blocknewsletter'}</option>
|
||||
<option value="1"{if isset($action) && $action == 1} selected="selected"{/if}>{l s='Unsubscribe' mod='blocknewsletter'}</option>
|
||||
</select>-->
|
||||
<input type="submit" value="ok" class="button_mini" name="submitNewsletter" />
|
||||
<input type="hidden" name="action" value="0" />
|
||||
</p>
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="delivery_option_price">
|
||||
{if $option.total_price_with_tax && !$free_shipping}
|
||||
{if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))}
|
||||
{if $use_taxes == 1}
|
||||
{convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'}
|
||||
{else}
|
||||
|
||||
@@ -48,6 +48,8 @@ var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};
|
||||
var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';
|
||||
var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';
|
||||
var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};
|
||||
var productBasePriceTaxExcluded = {$product->base_price} - {$product->ecotax};
|
||||
|
||||
var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};
|
||||
var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction|floatval}{else}0{/if};
|
||||
var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};
|
||||
@@ -132,6 +134,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
||||
specific_price_combination['reduction_price'] = {if $combination.specific_price AND $combination.specific_price.reduction AND $combination.specific_price.reduction_type == 'amount'}{$combination.specific_price.reduction}{else}0{/if};
|
||||
specific_price_combination['price'] = {if $combination.specific_price AND $combination.specific_price.price}{$combination.specific_price.price}{else}0{/if};
|
||||
specific_price_combination['reduction_type'] = '{if $combination.specific_price}{$combination.specific_price.reduction_type}{/if}';
|
||||
specific_price_combination['id_product_attribute'] = {if $combination.specific_price}{$combination.specific_price.id_product_attribute|intval}{else}0{/if};
|
||||
available_date['date'] = '{$combination.available_date}';
|
||||
available_date['date_formatted'] = '{dateFormat date=$combination.available_date full=false}';
|
||||
addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity}, available_date, specific_price_combination);
|
||||
@@ -180,7 +183,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
||||
<div id="image-block">
|
||||
{if $have_image}
|
||||
<span id="view_full_size">
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" />
|
||||
<img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}"{if $jqZoomEnabled} class="jqzoom"{/if} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}"/>
|
||||
<span class="span_link">{l s='Maximize'}</span>
|
||||
</span>
|
||||
{else}
|
||||
@@ -400,14 +403,14 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
|
||||
{/if}
|
||||
</div>
|
||||
<p id="reduction_percent" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}><span id="reduction_percent_display">{if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}</span></p>
|
||||
<p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' && $product->specificPrice.reduction|intval ==0} style="display:none"{/if}>
|
||||
<p id="reduction_amount" {if !$product->specificPrice OR $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|intval ==0} style="display:none"{/if}>
|
||||
<span id="reduction_amount_display">
|
||||
{if $product->specificPrice AND $product->specificPrice.reduction_type == 'amount' AND $product->specificPrice.reduction|intval !=0}
|
||||
-{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval}
|
||||
{/if}
|
||||
</span>
|
||||
</p>
|
||||
{if $product->specificPrice AND $product->specificPrice.reduction}
|
||||
{if $product->specificPrice AND $product->specificPrice.reduction && $product->specificPrice.reduction > 0}
|
||||
<p id="old_price"><span class="bold">
|
||||
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
||||
{if $productPriceWithoutReduction > $productPrice}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user