[-] BO : error message on install module
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
<div class="margin-form">
|
<div class="margin-form">
|
||||||
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
||||||
{foreach $hooks as $hook}
|
{foreach $hooks as $hook}
|
||||||
<option value="{$hook['id_hook']}" {if $id_hook == $hook['id_hook']} selected="selected"{/if}>"{$hook['title']}" {l s='known as'} "{$hook['name']}"</option>
|
<option value="{$hook['id_hook']}" {if $id_hook == $hook['id_hook']} selected="selected"{/if}>{$hook['name']}{if $hook['name'] != $hook['title']} ({$hook['title']}){/if}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select><sup> *</sup>
|
</select><sup> *</sup>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@
|
|||||||
{if sizeof($invoices_collection)}
|
{if sizeof($invoices_collection)}
|
||||||
<select name="product_invoice" class="edit_product_invoice">
|
<select name="product_invoice" class="edit_product_invoice">
|
||||||
{foreach from=$invoices_collection item=invoice}
|
{foreach from=$invoices_collection item=invoice}
|
||||||
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang)}{'%06d'|sprintf:$invoice->number}</option>
|
<option value="{$invoice->id}" {if $invoice->id == $product['id_order_invoice']}selected="selected"{/if}>#{Configuration::get('PS_INVOICE_PREFIX', $current_id_lang, null, $order->id_shop)}{'%06d'|sprintf:$invoice->number}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
{else}
|
{else}
|
||||||
|
|||||||
@@ -300,7 +300,7 @@
|
|||||||
id_product: id_product,
|
id_product: id_product,
|
||||||
id_product_attribute: id_product_attribute,
|
id_product_attribute: id_product_attribute,
|
||||||
id_customer: id_customer,
|
id_customer: id_customer,
|
||||||
price: new_price
|
price: new Number(new_price.replace(",",".")).toFixed(4).toString()
|
||||||
},
|
},
|
||||||
success : function(res)
|
success : function(res)
|
||||||
{
|
{
|
||||||
|
|||||||
+8
-9
@@ -1331,6 +1331,9 @@ class CartCore extends ObjectModel
|
|||||||
else
|
else
|
||||||
$shipping_fees = 0;
|
$shipping_fees = 0;
|
||||||
|
|
||||||
|
if ($type == Cart::ONLY_SHIPPING)
|
||||||
|
return $shipping_fees;
|
||||||
|
|
||||||
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
|
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
|
||||||
$type = Cart::ONLY_PRODUCTS;
|
$type = Cart::ONLY_PRODUCTS;
|
||||||
|
|
||||||
@@ -1455,12 +1458,14 @@ class CartCore extends ObjectModel
|
|||||||
$wrapping_fees = 0;
|
$wrapping_fees = 0;
|
||||||
if ($this->gift)
|
if ($this->gift)
|
||||||
$wrapping_fees = Tools::convertPrice(Tools::ps_round($this->getGiftWrappingPrice($with_taxes), 2), Currency::getCurrencyInstance((int)$this->id_currency));
|
$wrapping_fees = Tools::convertPrice(Tools::ps_round($this->getGiftWrappingPrice($with_taxes), 2), Currency::getCurrencyInstance((int)$this->id_currency));
|
||||||
|
if ($type == Cart::ONLY_WRAPPING)
|
||||||
|
return $wrapping_fees;
|
||||||
|
|
||||||
$order_total_discount = 0;
|
$order_total_discount = 0;
|
||||||
if (!in_array($type, array(Cart::ONLY_SHIPPING, Cart::ONLY_PRODUCTS)) && CartRule::isFeatureActive())
|
if (!in_array($type, array(Cart::ONLY_SHIPPING, Cart::ONLY_PRODUCTS)) && CartRule::isFeatureActive())
|
||||||
{
|
{
|
||||||
// First, retrieve the cart rules associated to this "getOrderTotal"
|
// First, retrieve the cart rules associated to this "getOrderTotal"
|
||||||
if ($with_shipping)
|
if ($with_shipping || $type == Cart::ONLY_DISCOUNTS)
|
||||||
$cart_rules = $this->getCartRules(CartRule::FILTER_ACTION_ALL);
|
$cart_rules = $this->getCartRules(CartRule::FILTER_ACTION_ALL);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1486,7 +1491,7 @@ class CartCore extends ObjectModel
|
|||||||
foreach ($cart_rules as $cart_rule)
|
foreach ($cart_rules as $cart_rule)
|
||||||
{
|
{
|
||||||
// If the cart rule offers free shipping, add the shipping cost
|
// If the cart rule offers free shipping, add the shipping cost
|
||||||
if ($with_shipping && $cart_rule['obj']->free_shipping)
|
if (($with_shipping || $type == Cart::ONLY_DISCOUNTS) && $cart_rule['obj']->free_shipping)
|
||||||
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING, ($param_product ? $package : null), $use_cache), 2);
|
$order_total_discount += Tools::ps_round($cart_rule['obj']->getContextualValue($with_taxes, $virtual_context, CartRule::FILTER_ACTION_SHIPPING, ($param_product ? $package : null), $use_cache), 2);
|
||||||
|
|
||||||
// If the cart rule is a free gift, then add the free gift value only if the gift is in this package
|
// If the cart rule is a free gift, then add the free gift value only if the gift is in this package
|
||||||
@@ -1512,12 +1517,6 @@ class CartCore extends ObjectModel
|
|||||||
$order_total -= $order_total_discount;
|
$order_total -= $order_total_discount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == Cart::ONLY_SHIPPING)
|
|
||||||
return $shipping_fees;
|
|
||||||
|
|
||||||
if ($type == Cart::ONLY_WRAPPING)
|
|
||||||
return $wrapping_fees;
|
|
||||||
|
|
||||||
if ($type == Cart::BOTH)
|
if ($type == Cart::BOTH)
|
||||||
$order_total += $shipping_fees + $wrapping_fees;
|
$order_total += $shipping_fees + $wrapping_fees;
|
||||||
|
|
||||||
@@ -2837,8 +2836,8 @@ class CartCore extends ObjectModel
|
|||||||
$invoice = new Address((int)$this->id_address_invoice);
|
$invoice = new Address((int)$this->id_address_invoice);
|
||||||
|
|
||||||
// New layout system with personalization fields
|
// New layout system with personalization fields
|
||||||
|
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
||||||
$formatted_addresses['invoice'] = AddressFormat::getFormattedLayoutData($invoice);
|
$formatted_addresses['invoice'] = AddressFormat::getFormattedLayoutData($invoice);
|
||||||
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
|
||||||
|
|
||||||
$total_tax = $this->getOrderTotal() - $this->getOrderTotal(false);
|
$total_tax = $this->getOrderTotal() - $this->getOrderTotal(false);
|
||||||
|
|
||||||
|
|||||||
+37
-20
@@ -31,6 +31,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
const FILTER_ACTION_SHIPPING = 2;
|
const FILTER_ACTION_SHIPPING = 2;
|
||||||
const FILTER_ACTION_REDUCTION = 3;
|
const FILTER_ACTION_REDUCTION = 3;
|
||||||
const FILTER_ACTION_GIFT = 4;
|
const FILTER_ACTION_GIFT = 4;
|
||||||
|
const FILTER_ACTION_ALL_NOCAP = 5;
|
||||||
|
|
||||||
const BO_ORDER_CODE_PREFIX = 'BO_ORDER_';
|
const BO_ORDER_CODE_PREFIX = 'BO_ORDER_';
|
||||||
|
|
||||||
@@ -119,14 +120,20 @@ class CartRuleCore extends ObjectModel
|
|||||||
/**
|
/**
|
||||||
* @see ObjectModel::add()
|
* @see ObjectModel::add()
|
||||||
*/
|
*/
|
||||||
public function add($autodate = true, $nullValues = false)
|
public function add($autodate = true, $null_values = false)
|
||||||
{
|
{
|
||||||
if (!parent::add($autodate, $nullValues))
|
if (!parent::add($autodate, $null_values))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1');
|
Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function update($null_values = false)
|
||||||
|
{
|
||||||
|
Cache::clean('getContextualValue_'.$this->id.'_*');
|
||||||
|
return parent::update($null_values);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ObjectModel::delete()
|
* @see ObjectModel::delete()
|
||||||
@@ -216,27 +223,26 @@ class CartRuleCore extends ObjectModel
|
|||||||
FROM `'._DB_PREFIX_.'cart_rule` cr
|
FROM `'._DB_PREFIX_.'cart_rule` cr
|
||||||
LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON (cr.`id_cart_rule` = crl.`id_cart_rule` AND crl.`id_lang` = '.(int)$id_lang.')
|
LEFT JOIN `'._DB_PREFIX_.'cart_rule_lang` crl ON (cr.`id_cart_rule` = crl.`id_cart_rule` AND crl.`id_lang` = '.(int)$id_lang.')
|
||||||
WHERE (
|
WHERE (
|
||||||
cr.`id_customer` = '.(int)$id_customer.'
|
cr.`id_customer` = '.(int)$id_customer.' OR cr.group_restriction = 1
|
||||||
'.($includeGeneric ? 'OR cr.`id_customer` = 0' : '').'
|
'.($includeGeneric ? 'OR cr.`id_customer` = 0' : '').'
|
||||||
)
|
)
|
||||||
|
AND cr.date_from < "'.date('Y-m-d H:i:s').'"
|
||||||
|
AND cr.date_to > "'.date('Y-m-d H:i:s').'"
|
||||||
'.($active ? 'AND cr.`active` = 1' : '').'
|
'.($active ? 'AND cr.`active` = 1' : '').'
|
||||||
'.($inStock ? 'AND cr.`quantity` > 0' : ''));
|
'.($inStock ? 'AND cr.`quantity` > 0' : ''));
|
||||||
|
|
||||||
// Remove cart rule that does not match the customer groups
|
// Remove cart rule that does not match the customer groups
|
||||||
if ($includeGeneric)
|
$customerGroups = Customer::getGroupsStatic($id_customer);
|
||||||
{
|
foreach ($result as $key => $cart_rule)
|
||||||
$customerGroups = Customer::getGroupsStatic($id_customer);
|
if ($cart_rule['group_restriction'])
|
||||||
foreach ($result as $key => $cart_rule)
|
{
|
||||||
if ($cart_rule['group_restriction'])
|
$cartRuleGroups = Db::getInstance()->executeS('SELECT id_group FROM '._DB_PREFIX_.'cart_rule_group WHERE id_cart_rule = '.(int)$cart_rule['id_cart_rule']);
|
||||||
{
|
foreach ($cartRuleGroups as $cartRuleGroup)
|
||||||
$cartRuleGroups = Db::getInstance()->getValue('SELECT id_group FROM '._DB_PREFIX_.'cart_rule_group WHERE id_cart_rule = '.(int)$cart_rule['id_cart_rule']);
|
if (in_array($cartRuleGroup['id_group'], $customerGroups))
|
||||||
foreach ($cartRuleGroups as $cartRuleGroup)
|
continue 2;
|
||||||
if (in_array($cartRuleGroups['id_group'], $customerGroups))
|
|
||||||
continue 2;
|
|
||||||
|
|
||||||
unset($result[$key]);
|
unset($result[$key]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($result as &$cart_rule)
|
foreach ($result as &$cart_rule)
|
||||||
if ($cart_rule['quantity_per_user'])
|
if ($cart_rule['quantity_per_user'])
|
||||||
@@ -749,7 +755,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
return Cache::retrieve($cache_id);
|
return Cache::retrieve($cache_id);
|
||||||
|
|
||||||
// Free shipping on selected carriers
|
// Free shipping on selected carriers
|
||||||
if ($this->free_shipping && ($filter == CartRule::FILTER_ACTION_ALL || $filter == CartRule::FILTER_ACTION_SHIPPING))
|
if ($this->free_shipping && in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_SHIPPING)))
|
||||||
{
|
{
|
||||||
if (!$this->carrier_restriction)
|
if (!$this->carrier_restriction)
|
||||||
$reduction_value += $context->cart->getOrderTotal($use_tax, Cart::ONLY_SHIPPING, is_null($package) ? null : $package['products'], is_null($package) ? null : $package['id_carrier']);
|
$reduction_value += $context->cart->getOrderTotal($use_tax, Cart::ONLY_SHIPPING, is_null($package) ? null : $package['products'], is_null($package) ? null : $package['id_carrier']);
|
||||||
@@ -767,7 +773,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($filter == CartRule::FILTER_ACTION_ALL || $filter == CartRule::FILTER_ACTION_REDUCTION)
|
if (in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_REDUCTION)))
|
||||||
{
|
{
|
||||||
// Discount (%) on the whole order
|
// Discount (%) on the whole order
|
||||||
if ($this->reduction_percent && $this->reduction_product == 0)
|
if ($this->reduction_percent && $this->reduction_product == 0)
|
||||||
@@ -858,7 +864,15 @@ class CartRuleCore extends ObjectModel
|
|||||||
|
|
||||||
// If it has the same tax application that you need, then it's the right value, whatever the product!
|
// If it has the same tax application that you need, then it's the right value, whatever the product!
|
||||||
if ($this->reduction_tax == $use_tax)
|
if ($this->reduction_tax == $use_tax)
|
||||||
|
{
|
||||||
|
// The reduction cannot exceed the products total, except when we do not want it to be limited (for the partial use calculation)
|
||||||
|
if ($filter != CartRule::FILTER_ACTION_ALL_NOCAP)
|
||||||
|
{
|
||||||
|
$cart_amount = $context->cart->getOrderTotal($use_tax, Cart::ONLY_PRODUCTS);
|
||||||
|
$reduction_amount = min($reduction_amount, $cart_amount);
|
||||||
|
}
|
||||||
$reduction_value += $prorata * $reduction_amount;
|
$reduction_value += $prorata * $reduction_amount;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($this->reduction_product > 0)
|
if ($this->reduction_product > 0)
|
||||||
@@ -884,9 +898,12 @@ class CartRuleCore extends ObjectModel
|
|||||||
// Discount (¤) on the whole order
|
// Discount (¤) on the whole order
|
||||||
elseif ($this->reduction_product == 0)
|
elseif ($this->reduction_product == 0)
|
||||||
{
|
{
|
||||||
// TODO : this should not use the prorata
|
|
||||||
$cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS);
|
$cart_amount_ti = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS);
|
||||||
$cart_amount_te = $context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS);
|
$cart_amount_te = $context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS);
|
||||||
|
|
||||||
|
// The reduction cannot exceed the products total, except when we do not want it to be limited (for the partial use calculation)
|
||||||
|
if ($filter != CartRule::FILTER_ACTION_ALL_NOCAP)
|
||||||
|
$reduction_amount = min($reduction_amount, $this->reduction_tax ? $cart_amount_ti : $cart_amount_te);
|
||||||
|
|
||||||
$cart_vat_amount = $cart_amount_ti - $cart_amount_te;
|
$cart_vat_amount = $cart_amount_ti - $cart_amount_te;
|
||||||
|
|
||||||
@@ -911,7 +928,7 @@ class CartRuleCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Free gift
|
// Free gift
|
||||||
if ((int)$this->gift_product && ($filter == CartRule::FILTER_ACTION_ALL || $filter == CartRule::FILTER_ACTION_GIFT))
|
if ((int)$this->gift_product && in_array($filter, array(CartRule::FILTER_ACTION_ALL, CartRule::FILTER_ACTION_ALL_NOCAP, CartRule::FILTER_ACTION_GIFT)))
|
||||||
{
|
{
|
||||||
$id_address = (is_null($package) ? 0 : $package['id_address']);
|
$id_address = (is_null($package) ? 0 : $package['id_address']);
|
||||||
foreach ($package_products as $product)
|
foreach ($package_products as $product)
|
||||||
|
|||||||
@@ -412,16 +412,17 @@ class CustomerCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public static function customerHasAddress($id_customer, $id_address)
|
public static function customerHasAddress($id_customer, $id_address)
|
||||||
{
|
{
|
||||||
if (!array_key_exists($id_customer, self::$_customerHasAddress))
|
$key = (int)$id_customer.'-'.(int)$id_address;
|
||||||
|
if (!array_key_exists($id_address, self::$_customerHasAddress))
|
||||||
{
|
{
|
||||||
self::$_customerHasAddress[$id_customer] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
self::$_customerHasAddress[$key] = (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||||
SELECT `id_address`
|
SELECT `id_address`
|
||||||
FROM `'._DB_PREFIX_.'address`
|
FROM `'._DB_PREFIX_.'address`
|
||||||
WHERE `id_customer` = '.(int)$id_customer.'
|
WHERE `id_customer` = '.(int)$id_customer.'
|
||||||
AND `id_address` = '.(int)$id_address.'
|
AND `id_address` = '.(int)$id_address.'
|
||||||
AND `deleted` = 0');
|
AND `deleted` = 0');
|
||||||
}
|
}
|
||||||
return self::$_customerHasAddress[$id_customer];
|
return self::$_customerHasAddress[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function resetAddressCache($id_customer)
|
public static function resetAddressCache($id_customer)
|
||||||
@@ -438,13 +439,14 @@ class CustomerCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function getAddresses($id_lang)
|
public function getAddresses($id_lang)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso
|
$sql = 'SELECT DISTINCT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso
|
||||||
FROM `'._DB_PREFIX_.'address` a
|
FROM `'._DB_PREFIX_.'address` a
|
||||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`)
|
LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`)
|
||||||
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`)
|
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`)
|
||||||
LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)
|
LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)
|
||||||
'.(Context::getContext()->shop->getGroup()->share_order ? '' : Shop::addSqlAssociation('country', 'c')).'
|
'.(Context::getContext()->shop->getGroup()->share_order ? '' : Shop::addSqlAssociation('country', 'c')).'
|
||||||
WHERE `id_lang` = '.(int)$id_lang.' AND `id_customer` = '.(int)$this->id.' AND a.`deleted` = 0';
|
WHERE `id_lang` = '.(int)$id_lang.' AND `id_customer` = '.(int)$this->id.' AND a.`deleted` = 0';
|
||||||
|
|
||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ class DispatcherCore
|
|||||||
if ($keywords)
|
if ($keywords)
|
||||||
{
|
{
|
||||||
$transform_keywords = array();
|
$transform_keywords = array();
|
||||||
preg_match_all('#\\\{(([^{}]+)\\\:)?('.implode('|', array_keys($keywords)).')(\\\:([^{}]+))?\\\}#', $regexp, $m);
|
preg_match_all('#\\\{(([^{}]*)\\\:)?('.implode('|', array_keys($keywords)).')(\\\:([^{}]*))?\\\}#', $regexp, $m);
|
||||||
for ($i = 0, $total = count($m[0]); $i < $total; $i++)
|
for ($i = 0, $total = count($m[0]); $i < $total; $i++)
|
||||||
{
|
{
|
||||||
$prepend = $m[2][$i];
|
$prepend = $m[2][$i];
|
||||||
@@ -537,7 +537,7 @@ class DispatcherCore
|
|||||||
if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id]))
|
if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id]))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return preg_match('#\{([^{}]+:)?'.preg_quote($keyword, '#').'(:[^{}])?\}#', $this->routes[$id_lang][$route_id]['rule']);
|
return preg_match('#\{([^{}]*:)?'.preg_quote($keyword, '#').'(:[^{}]*)?\}#', $this->routes[$id_lang][$route_id]['rule']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -554,7 +554,7 @@ class DispatcherCore
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
foreach ($this->default_routes[$route_id]['keywords'] as $keyword => $data)
|
foreach ($this->default_routes[$route_id]['keywords'] as $keyword => $data)
|
||||||
if (isset($data['param']) && !preg_match('#\{([^{}]+:)?'.$keyword.'(:[^{}])?\}#', $rule))
|
if (isset($data['param']) && !preg_match('#\{([^{}]*:)?'.$keyword.'(:[^{}]*)?\}#', $rule))
|
||||||
$errors[] = $keyword;
|
$errors[] = $keyword;
|
||||||
|
|
||||||
return (count($errors)) ? false : true;
|
return (count($errors)) ? false : true;
|
||||||
@@ -614,10 +614,10 @@ class DispatcherCore
|
|||||||
$replace = $route['keywords'][$key]['prepend'].$params[$key].$route['keywords'][$key]['append'];
|
$replace = $route['keywords'][$key]['prepend'].$params[$key].$route['keywords'][$key]['append'];
|
||||||
else
|
else
|
||||||
$replace = '';
|
$replace = '';
|
||||||
$url = preg_replace('#\{([^{}]+:)?'.$key.'(:[^{}])?\}#', $replace, $url);
|
$url = preg_replace('#\{([^{}]*:)?'.$key.'(:[^{}]*)?\}#', $replace, $url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$url = preg_replace('#\{([^{}]+:)?[a-z0-9_]+?(:[^{}])?\}#', '', $url);
|
$url = preg_replace('#\{([^{}]*:)?[a-z0-9_]+?(:[^{}]*)?\}#', '', $url);
|
||||||
if (count($add_param))
|
if (count($add_param))
|
||||||
$url .= '?'.http_build_query($add_param, '', '&');
|
$url .= '?'.http_build_query($add_param, '', '&');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ class HookCore extends ObjectModel
|
|||||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||||
SELECT * FROM `'._DB_PREFIX_.'hook` h
|
SELECT * FROM `'._DB_PREFIX_.'hook` h
|
||||||
'.($position ? 'WHERE h.`position` = 1' : '').'
|
'.($position ? 'WHERE h.`position` = 1' : '').'
|
||||||
ORDER BY `title`'
|
ORDER BY `name`'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,10 @@ class ImageManagerCore
|
|||||||
*/
|
*/
|
||||||
public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false)
|
public static function resize($src_file, $dst_file, $dst_width = null, $dst_height = null, $file_type = 'jpg', $force_type = false)
|
||||||
{
|
{
|
||||||
clearstatcache(true, $src_file);
|
if (PHP_VERSION_ID < 50300)
|
||||||
|
clearstatcache();
|
||||||
|
else
|
||||||
|
clearstatcache(true, $src_file);
|
||||||
|
|
||||||
if (!file_exists($src_file) || !filesize($src_file))
|
if (!file_exists($src_file) || !filesize($src_file))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+2
-2
@@ -32,7 +32,7 @@ class MediaCore
|
|||||||
'ui.mouse' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => false),
|
'ui.mouse' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget'), 'theme' => false),
|
||||||
'ui.position' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array(), 'theme' => false),
|
'ui.position' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array(), 'theme' => false),
|
||||||
'ui.draggable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => false),
|
'ui.draggable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => false),
|
||||||
'ui.droppable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('uicore', 'ui.widget', 'ui.mouse', 'ui.draggable'), 'theme' => false),
|
'ui.droppable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse', 'ui.draggable'), 'theme' => false),
|
||||||
'ui.resizable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
'ui.resizable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||||
'ui.selectable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
'ui.selectable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||||
'ui.sortable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
'ui.sortable' => array('fileName' => 'jquery.ui.mouse.min.js', 'dependencies' => array('ui.core', 'ui.widget', 'ui.mouse'), 'theme' => true),
|
||||||
@@ -539,4 +539,4 @@ class MediaCore
|
|||||||
return array_merge(array($protocol_link.Tools::getMediaServer($url).$url), $js_external_files);
|
return array_merge(array($protocol_link.Tools::getMediaServer($url).$url), $js_external_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,8 +406,8 @@ abstract class PaymentModuleCore extends Module
|
|||||||
{
|
{
|
||||||
$package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list);
|
$package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list);
|
||||||
$values = array(
|
$values = array(
|
||||||
'tax_incl' => $cart_rule['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL, $package),
|
'tax_incl' => $cart_rule['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package),
|
||||||
'tax_excl' => $cart_rule['obj']->getContextualValue(false, $this->context, CartRule::FILTER_ACTION_ALL, $package)
|
'tax_excl' => $cart_rule['obj']->getContextualValue(false, $this->context, CartRule::FILTER_ACTION_ALL_NOCAP, $package)
|
||||||
);
|
);
|
||||||
|
|
||||||
// If the reduction is not applicable to this order, then continue with the next one
|
// If the reduction is not applicable to this order, then continue with the next one
|
||||||
@@ -469,7 +469,7 @@ abstract class PaymentModuleCore extends Module
|
|||||||
$values['tax_excl'] -= $values['tax_excl'] - $order->total_products;
|
$values['tax_excl'] -= $values['tax_excl'] - $order->total_products;
|
||||||
}
|
}
|
||||||
|
|
||||||
$order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values);
|
$order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values, 0, $cart_rule['obj']->free_shipping);
|
||||||
|
|
||||||
if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && !in_array($cart_rule['obj']->id, $cart_rule_used))
|
if ($id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CANCELED') && !in_array($cart_rule['obj']->id, $cart_rule_used))
|
||||||
{
|
{
|
||||||
@@ -616,7 +616,7 @@ abstract class PaymentModuleCore extends Module
|
|||||||
{
|
{
|
||||||
$pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $this->context->smarty);
|
$pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $this->context->smarty);
|
||||||
$file_attachement['content'] = $pdf->render(false);
|
$file_attachement['content'] = $pdf->render(false);
|
||||||
$file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang).sprintf('%06d', $order->invoice_number).'.pdf';
|
$file_attachement['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)$order->id_lang, null, $order->id_shop).sprintf('%06d', $order->invoice_number).'.pdf';
|
||||||
$file_attachement['mime'] = 'application/pdf';
|
$file_attachement['mime'] = 'application/pdf';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
+3
-2
@@ -902,7 +902,7 @@ class ProductCore extends ObjectModel
|
|||||||
);
|
);
|
||||||
|
|
||||||
$return = Db::getInstance()->delete('category_product', 'id_product = '.(int)$this->id);
|
$return = Db::getInstance()->delete('category_product', 'id_product = '.(int)$this->id);
|
||||||
if ($clean_positions === true)
|
if ($clean_positions === true && is_array($result))
|
||||||
foreach ($result as $row)
|
foreach ($result as $row)
|
||||||
$return &= $this->cleanPositions((int)$row['id_category']);
|
$return &= $this->cleanPositions((int)$row['id_category']);
|
||||||
|
|
||||||
@@ -4951,7 +4951,7 @@ class ProductCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$query->from('product_attribute', 'pa');
|
$query->from('product_attribute', 'pa');
|
||||||
$query->join(Shop::addSqlAssociation('product_attribute', 'pa'));
|
$query->join(Shop::addSqlAssociation('product_attribute', 'pa'));
|
||||||
$query->innerJoin('product_lang', 'pl', 'pl.id_product = pa.id_product AND pl.id_lang = '.(int)$id_lang);
|
$query->innerJoin('product_lang', 'pl', 'pl.id_product = pa.id_product AND pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl'));
|
||||||
$query->leftJoin('product_attribute_combination', 'pac', 'pac.id_product_attribute = pa.id_product_attribute');
|
$query->leftJoin('product_attribute_combination', 'pac', 'pac.id_product_attribute = pa.id_product_attribute');
|
||||||
$query->leftJoin('attribute', 'atr', 'atr.id_attribute = pac.id_attribute');
|
$query->leftJoin('attribute', 'atr', 'atr.id_attribute = pac.id_attribute');
|
||||||
$query->leftJoin('attribute_lang', 'al', 'al.id_attribute = atr.id_attribute AND al.id_lang = '.(int)$id_lang);
|
$query->leftJoin('attribute_lang', 'al', 'al.id_attribute = atr.id_attribute AND al.id_lang = '.(int)$id_lang);
|
||||||
@@ -4962,6 +4962,7 @@ class ProductCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$query->from('product_lang', 'pl');
|
$query->from('product_lang', 'pl');
|
||||||
$query->where('pl.id_product = '.(int)$id_product);
|
$query->where('pl.id_product = '.(int)$id_product);
|
||||||
|
$query->where('pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Db::getInstance()->getValue($query);
|
return Db::getInstance()->getValue($query);
|
||||||
|
|||||||
+26
-8
@@ -1277,10 +1277,9 @@ class ToolsCore
|
|||||||
|
|
||||||
public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)
|
public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)
|
||||||
{
|
{
|
||||||
if ($stream_context == null)
|
if ($stream_context == null && !preg_match('/^https?:\/\//', $url))
|
||||||
$stream_context = @stream_context_create(array('http' => array('timeout' => 5)));
|
$stream_context = @stream_context_create(array('http' => array('timeout' => $curl_timeout)));
|
||||||
|
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !preg_match('/^https?:\/\//', $url))
|
||||||
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')))
|
|
||||||
return @file_get_contents($url, $use_include_path, $stream_context);
|
return @file_get_contents($url, $use_include_path, $stream_context);
|
||||||
elseif (function_exists('curl_init'))
|
elseif (function_exists('curl_init'))
|
||||||
{
|
{
|
||||||
@@ -1289,6 +1288,16 @@ class ToolsCore
|
|||||||
curl_setopt($curl, CURLOPT_URL, $url);
|
curl_setopt($curl, CURLOPT_URL, $url);
|
||||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $curl_timeout);
|
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $curl_timeout);
|
||||||
curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout);
|
curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout);
|
||||||
|
$opts = stream_context_get_options($stream_context);
|
||||||
|
if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post')
|
||||||
|
{
|
||||||
|
curl_setopt($curl, CURLOPT_POST, true);
|
||||||
|
if (isset($opts['http']['content']))
|
||||||
|
{
|
||||||
|
parse_str($opts['http']['content'], $datas);
|
||||||
|
curl_setopt($curl, CURLOPT_POSTFIELDS, $datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
$content = curl_exec($curl);
|
$content = curl_exec($curl);
|
||||||
curl_close($curl);
|
curl_close($curl);
|
||||||
return $content;
|
return $content;
|
||||||
@@ -1299,10 +1308,7 @@ class ToolsCore
|
|||||||
|
|
||||||
public static function simplexml_load_file($url, $class_name = null)
|
public static function simplexml_load_file($url, $class_name = null)
|
||||||
{
|
{
|
||||||
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')))
|
return @simplexml_load_string(Tools::file_get_contents($url), $class_name);
|
||||||
return @simplexml_load_string(Tools::file_get_contents($url), $class_name);
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1535,6 +1541,18 @@ class ToolsCore
|
|||||||
'virtual' => $shop_url->virtual_uri,
|
'virtual' => $shop_url->virtual_uri,
|
||||||
'id_shop' => $shop_url->id_shop
|
'id_shop' => $shop_url->id_shop
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($shop_url->domain == $shop_url->domain_ssl)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!isset($domains[$shop_url->domain_ssl]))
|
||||||
|
$domains[$shop_url->domain_ssl] = array();
|
||||||
|
|
||||||
|
$domains[$shop_url->domain_ssl][] = array(
|
||||||
|
'physical' => $shop_url->physical_uri,
|
||||||
|
'virtual' => $shop_url->virtual_uri,
|
||||||
|
'id_shop' => $shop_url->id_shop
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write data in .htaccess file
|
// Write data in .htaccess file
|
||||||
|
|||||||
Vendored
+34
-23
@@ -46,26 +46,33 @@ class CacheMemcacheCore extends Cache
|
|||||||
|
|
||||||
// Get keys (this code comes from Doctrine 2 project)
|
// Get keys (this code comes from Doctrine 2 project)
|
||||||
$this->keys = array();
|
$this->keys = array();
|
||||||
$all_slabs = $this->memcache->getExtendedStats('slabs');
|
$servers = self::getMemcachedServers();
|
||||||
|
|
||||||
foreach ($all_slabs as $server => $slabs)
|
if(is_array($servers) && count($servers) > 0 && method_exists('Memcache', 'getStats'))
|
||||||
{
|
$all_slabs = $this->memcache->getStats('slabs');
|
||||||
if (is_array($slabs))
|
|
||||||
{
|
if(isset($all_slabs) && is_array($all_slabs))
|
||||||
foreach (array_keys($slabs) as $slab_id)
|
foreach ($all_slabs as $server => $slabs)
|
||||||
{
|
{
|
||||||
$dump = $this->memcache->getExtendedStats('cachedump', (int)$slab_id);
|
if (is_array($slabs))
|
||||||
if ($dump)
|
{
|
||||||
{
|
foreach (array_keys($slabs) as $slab_id)
|
||||||
foreach ($dump as $entries)
|
{
|
||||||
{
|
if(is_int($slab_id))
|
||||||
if ($entries)
|
{
|
||||||
$this->keys = array_merge($this->keys, array_keys($entries));
|
$dump = $this->memcache->getStats('cachedump', (int)$slab_id);
|
||||||
}
|
if ($dump)
|
||||||
}
|
{
|
||||||
}
|
foreach ($dump as $entries)
|
||||||
}
|
{
|
||||||
}
|
if ($entries)
|
||||||
|
$this->keys = array_merge($this->keys, array_keys($entries));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct()
|
public function __destruct()
|
||||||
@@ -78,12 +85,16 @@ class CacheMemcacheCore extends Cache
|
|||||||
*/
|
*/
|
||||||
public function connect()
|
public function connect()
|
||||||
{
|
{
|
||||||
$this->memcache = new Memcache();
|
if (class_exists('Memcache') && extension_loaded('memcache'))
|
||||||
$servers = CacheMemcache::getMemcachedServers();
|
$this->memcache = new Memcache();
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$servers = self::getMemcachedServers();
|
||||||
if (!$servers)
|
if (!$servers)
|
||||||
return false;
|
return false;
|
||||||
foreach ($servers as $server)
|
foreach ($servers as $server)
|
||||||
$this->memcache->addServer($server['ip'], $server['port'], $server['weight']);
|
$this->memcache->addServer($server['ip'], $server['port'], true, (int) $server['weight']);
|
||||||
|
|
||||||
$this->is_connected = true;
|
$this->is_connected = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2268,9 +2268,10 @@ class AdminControllerCore extends Controller
|
|||||||
$class_name = $this->className;
|
$class_name = $this->className;
|
||||||
|
|
||||||
/* Class specific validation rules */
|
/* Class specific validation rules */
|
||||||
$rules = call_user_func(array($class_name, 'getValidationRules'), $class_name);
|
if (!empty($class_name))
|
||||||
|
$rules = call_user_func(array($class_name, 'getValidationRules'), $class_name);
|
||||||
|
|
||||||
if ((count($rules['requiredLang']) || count($rules['sizeLang']) || count($rules['validateLang'])))
|
if (isset($rules) && count($rules) && (count($rules['requiredLang']) || count($rules['sizeLang']) || count($rules['validateLang'])))
|
||||||
{
|
{
|
||||||
/* Language() instance determined by default language */
|
/* Language() instance determined by default language */
|
||||||
$default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
$default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||||
@@ -2280,56 +2281,61 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Checking for required fields */
|
/* Checking for required fields */
|
||||||
foreach ($rules['required'] as $field)
|
if (isset($rules['required']) && is_array($rules['required']))
|
||||||
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
foreach ($rules['required'] as $field)
|
||||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
||||||
$this->errors[] = sprintf(
|
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||||
Tools::displayError('The field %s is required.'),
|
$this->errors[] = sprintf(
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
Tools::displayError('The field %s is required.'),
|
||||||
);
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||||
|
);
|
||||||
|
|
||||||
/* Checking for multilingual required fields */
|
/* Checking for multilingual required fields */
|
||||||
foreach ($rules['requiredLang'] as $field_lang)
|
if (isset($rules['requiredLang']) && is_array($rules['requiredLang']))
|
||||||
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
foreach ($rules['requiredLang'] as $field_lang)
|
||||||
$this->errors[] = sprintf(
|
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
||||||
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
$this->errors[] = sprintf(
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
||||||
$default_language->name
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
);
|
$default_language->name
|
||||||
|
);
|
||||||
|
|
||||||
/* Checking for maximum fields sizes */
|
/* Checking for maximum fields sizes */
|
||||||
foreach ($rules['size'] as $field => $max_length)
|
if (isset($rules['size']) && is_array($rules['size']))
|
||||||
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
foreach ($rules['size'] as $field => $max_length)
|
||||||
$this->errors[] = sprintf(
|
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
||||||
Tools::displayError('The field %1$s is too long (%2$d chars max).'),
|
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name),
|
|
||||||
$max_length
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Checking for maximum multilingual fields size */
|
|
||||||
foreach ($rules['sizeLang'] as $field_lang => $max_length)
|
|
||||||
foreach ($languages as $language)
|
|
||||||
{
|
|
||||||
$field_lang_value = Tools::getValue($field_lang.'_'.$language['id_lang']);
|
|
||||||
if ($field_lang_value !== false && Tools::strlen($field_lang_value) > $max_length)
|
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'),
|
Tools::displayError('The field %1$s is too long (%2$d chars max).'),
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name),
|
||||||
$language['name'],
|
|
||||||
$max_length
|
$max_length
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
/* Checking for maximum multilingual fields size */
|
||||||
|
if (isset($rules['sizeLang']) && is_array($rules['sizeLang']))
|
||||||
|
foreach ($rules['sizeLang'] as $field_lang => $max_length)
|
||||||
|
foreach ($languages as $language)
|
||||||
|
{
|
||||||
|
$field_lang_value = Tools::getValue($field_lang.'_'.$language['id_lang']);
|
||||||
|
if ($field_lang_value !== false && Tools::strlen($field_lang_value) > $max_length)
|
||||||
|
$this->errors[] = sprintf(
|
||||||
|
Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'),
|
||||||
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
|
$language['name'],
|
||||||
|
$max_length
|
||||||
|
);
|
||||||
|
}
|
||||||
/* Overload this method for custom checking */
|
/* Overload this method for custom checking */
|
||||||
$this->_childValidation();
|
$this->_childValidation();
|
||||||
|
|
||||||
/* Checking for fields validity */
|
/* Checking for fields validity */
|
||||||
foreach ($rules['validate'] as $field => $function)
|
if (isset($rules['validate']) && is_array($rules['validate']))
|
||||||
if (($value = Tools::getValue($field)) !== false && ($field != 'passwd'))
|
foreach ($rules['validate'] as $field => $function)
|
||||||
if (!Validate::$function($value) && !empty($value))
|
if (($value = Tools::getValue($field)) !== false && ($field != 'passwd'))
|
||||||
$this->errors[] = sprintf(
|
if (!Validate::$function($value) && !empty($value))
|
||||||
Tools::displayError('The field %s is invalid.'),
|
$this->errors[] = sprintf(
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
Tools::displayError('The field %s is invalid.'),
|
||||||
);
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||||
|
);
|
||||||
|
|
||||||
/* Checking for passwd_old validity */
|
/* Checking for passwd_old validity */
|
||||||
if (($value = Tools::getValue('passwd')) != false)
|
if (($value = Tools::getValue('passwd')) != false)
|
||||||
@@ -2347,15 +2353,16 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Checking for multilingual fields validity */
|
/* Checking for multilingual fields validity */
|
||||||
foreach ($rules['validateLang'] as $field_lang => $function)
|
if (isset($rules['validateLang']) && is_array($rules['validateLang']))
|
||||||
foreach ($languages as $language)
|
foreach ($rules['validateLang'] as $field_lang => $function)
|
||||||
if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value))
|
foreach ($languages as $language)
|
||||||
if (!Validate::$function($value))
|
if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value))
|
||||||
$this->errors[] = sprintf(
|
if (!Validate::$function($value))
|
||||||
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
$this->errors[] = sprintf(
|
||||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
||||||
$language['name']
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
);
|
$language['name']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ class FrontControllerCore extends Controller
|
|||||||
/* Display a maintenance page if shop is closed */
|
/* Display a maintenance page if shop is closed */
|
||||||
protected function displayMaintenancePage()
|
protected function displayMaintenancePage()
|
||||||
{
|
{
|
||||||
if ($this->maintenance == true || (basename($_SERVER['PHP_SELF']) != 'disabled.php' && !(int)(Configuration::get('PS_SHOP_ENABLE'))))
|
if ($this->maintenance == true || !(int)Configuration::get('PS_SHOP_ENABLE'))
|
||||||
{
|
{
|
||||||
$this->maintenance = true;
|
$this->maintenance = true;
|
||||||
if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP'))))
|
if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP'))))
|
||||||
|
|||||||
@@ -674,6 +674,11 @@ abstract class DbCore
|
|||||||
return call_user_func_array(array(Db::getClass(), 'hasTableWithSamePrefix'), array($server, $user, $pwd, $db, $prefix));
|
return call_user_func_array(array(Db::getClass(), 'hasTableWithSamePrefix'), array($server, $user, $pwd, $db, $prefix));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
|
||||||
|
{
|
||||||
|
return call_user_func_array(array(Db::getClass(), 'checkCreatePrivilege'), array($server, $user, $pwd, $db, $prefix, $engine));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated 1.5.0
|
* @deprecated 1.5.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -185,6 +185,25 @@ class DbMySQLiCore extends Db
|
|||||||
$link->close();
|
$link->close();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
|
||||||
|
{
|
||||||
|
$link = @new mysqli($server, $user, $pwd, $db);
|
||||||
|
if (mysqli_connect_error())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$sql = '
|
||||||
|
CREATE TABLE `'.$prefix.'test` (
|
||||||
|
`test` tinyint(1) unsigned NOT NULL
|
||||||
|
) ENGINE=MyISAM';
|
||||||
|
$result = $link->query($sql);
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
return $link->error;
|
||||||
|
|
||||||
|
$link->query('DROP TABLE `'.$prefix.'test`');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Db::checkEncoding()
|
* @see Db::checkEncoding()
|
||||||
|
|||||||
@@ -174,6 +174,28 @@ class DbPDOCore extends Db
|
|||||||
return (bool)$result->fetch();
|
return (bool)$result->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$link = DbPDO::_getPDO($server, $user, $pwd, $db, 5);
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = '
|
||||||
|
CREATE TABLE `'.$prefix.'test` (
|
||||||
|
`test` tinyint(1) unsigned NOT NULL
|
||||||
|
) ENGINE=MyISAM';
|
||||||
|
$result = $link->query($sql);
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
$error = $link->errorInfo();
|
||||||
|
return $error[2];
|
||||||
|
}
|
||||||
|
$link->query('DROP TABLE `'.$prefix.'test`');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Db::checkConnection()
|
* @see Db::checkConnection()
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -174,6 +174,28 @@ class MySQLCore extends Db
|
|||||||
@mysql_close($link);
|
@mysql_close($link);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkCreatePrivilege($server, $user, $pwd, $db, $prefix, $engine)
|
||||||
|
{
|
||||||
|
ini_set('mysql.connect_timeout', 5);
|
||||||
|
if (!$link = @mysql_connect($server, $user, $pwd, true))
|
||||||
|
return false;
|
||||||
|
if (!@mysql_select_db($db, $link))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
$sql = '
|
||||||
|
CREATE TABLE `'.$prefix.'test` (
|
||||||
|
`test` tinyint(1) unsigned NOT NULL
|
||||||
|
) ENGINE=MyISAM';
|
||||||
|
|
||||||
|
$result = mysql_query($sql, $link);
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
return mysql_error($link);
|
||||||
|
|
||||||
|
mysql_query('DROP TABLE `'.$prefix.'test`', $link);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see Db::checkEncoding()
|
* @see Db::checkEncoding()
|
||||||
|
|||||||
@@ -189,7 +189,10 @@ abstract class ModuleCore
|
|||||||
{
|
{
|
||||||
// Check module name validation
|
// Check module name validation
|
||||||
if (!Validate::isModuleName($this->name))
|
if (!Validate::isModuleName($this->name))
|
||||||
die(Tools::displayError());
|
{
|
||||||
|
$this->_errors[] = $this->l('Unable to install the module (Module name is not valid).');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Check PS version compliancy
|
// Check PS version compliancy
|
||||||
if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) >= 0)
|
if (version_compare(_PS_VERSION_, $this->ps_versions_compliancy['min']) < 0 || version_compare(_PS_VERSION_, $this->ps_versions_compliancy['max']) >= 0)
|
||||||
|
|||||||
+17
-11
@@ -264,7 +264,7 @@ class OrderCore extends ObjectModel
|
|||||||
public function getFields()
|
public function getFields()
|
||||||
{
|
{
|
||||||
if (!$this->id_lang)
|
if (!$this->id_lang)
|
||||||
$this->id_lang = Configuration::get('PS_LANG_DEFAULT');
|
$this->id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $this->id_shop);
|
||||||
|
|
||||||
return parent::getFields();
|
return parent::getFields();
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ class OrderCore extends ObjectModel
|
|||||||
|
|
||||||
if ($this->hasBeenDelivered())
|
if ($this->hasBeenDelivered())
|
||||||
{
|
{
|
||||||
if (!Configuration::get('PS_ORDER_RETURN'))
|
if (!Configuration::get('PS_ORDER_RETURN', null, null, $this->id_shop))
|
||||||
throw new PrestaShopException('PS_ORDER_RETURN is not defined in table configuration');
|
throw new PrestaShopException('PS_ORDER_RETURN is not defined in table configuration');
|
||||||
$orderDetail->product_quantity_return += (int)($quantity);
|
$orderDetail->product_quantity_return += (int)($quantity);
|
||||||
return $orderDetail->update();
|
return $orderDetail->update();
|
||||||
@@ -1027,7 +1027,7 @@ class OrderCore extends ObjectModel
|
|||||||
* @param int $id_order_invoice
|
* @param int $id_order_invoice
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function addCartRule($id_cart_rule, $name, $values, $id_order_invoice = 0)
|
public function addCartRule($id_cart_rule, $name, $values, $id_order_invoice = 0, $free_shipping = null)
|
||||||
{
|
{
|
||||||
$order_cart_rule = new OrderCartRule();
|
$order_cart_rule = new OrderCartRule();
|
||||||
$order_cart_rule->id_order = $this->id;
|
$order_cart_rule->id_order = $this->id;
|
||||||
@@ -1036,12 +1036,18 @@ class OrderCore extends ObjectModel
|
|||||||
$order_cart_rule->name = $name;
|
$order_cart_rule->name = $name;
|
||||||
$order_cart_rule->value = $values['tax_incl'];
|
$order_cart_rule->value = $values['tax_incl'];
|
||||||
$order_cart_rule->value_tax_excl = $values['tax_excl'];
|
$order_cart_rule->value_tax_excl = $values['tax_excl'];
|
||||||
|
if ($free_shipping === null)
|
||||||
|
{
|
||||||
|
$cart_rule = new CartRule($id_cart_rule);
|
||||||
|
$free_shipping = $cart_rule->free_shipping;
|
||||||
|
}
|
||||||
|
$order_cart_rule->free_shipping = (int)$free_shipping;
|
||||||
$order_cart_rule->add();
|
$order_cart_rule->add();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getNumberOfDays()
|
public function getNumberOfDays()
|
||||||
{
|
{
|
||||||
$nbReturnDays = (int)(Configuration::get('PS_ORDER_RETURN_NB_DAYS'));
|
$nbReturnDays = (int)(Configuration::get('PS_ORDER_RETURN_NB_DAYS', null, null, $this->id_shop));
|
||||||
if (!$nbReturnDays)
|
if (!$nbReturnDays)
|
||||||
return true;
|
return true;
|
||||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||||
@@ -1059,7 +1065,7 @@ class OrderCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function isReturnable()
|
public function isReturnable()
|
||||||
{
|
{
|
||||||
if (Configuration::get('PS_ORDER_RETURN') && $this->isPaidAndShipped())
|
if (Configuration::get('PS_ORDER_RETURN', null, null, $this->id_shop) && $this->isPaidAndShipped())
|
||||||
return $this->getNumberOfDays();
|
return $this->getNumberOfDays();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -1082,10 +1088,10 @@ class OrderCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
$order_invoice = new OrderInvoice();
|
$order_invoice = new OrderInvoice();
|
||||||
$order_invoice->id_order = $this->id;
|
$order_invoice->id_order = $this->id;
|
||||||
$order_invoice->number = Configuration::get('PS_INVOICE_START_NUMBER');
|
$order_invoice->number = Configuration::get('PS_INVOICE_START_NUMBER', null, null, $this->id_shop);
|
||||||
// If invoice start number has been set, you clean the value of this configuration
|
// If invoice start number has been set, you clean the value of this configuration
|
||||||
if ($order_invoice->number)
|
if ($order_invoice->number)
|
||||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false );
|
Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $this->id_shop);
|
||||||
else
|
else
|
||||||
$order_invoice->number = Order::getLastInvoiceNumber() + 1;
|
$order_invoice->number = Order::getLastInvoiceNumber() + 1;
|
||||||
|
|
||||||
@@ -1169,11 +1175,11 @@ class OrderCore extends ObjectModel
|
|||||||
$order_invoice_collection = $this->getInvoicesCollection();
|
$order_invoice_collection = $this->getInvoicesCollection();
|
||||||
foreach ($order_invoice_collection as $order_invoice)
|
foreach ($order_invoice_collection as $order_invoice)
|
||||||
{
|
{
|
||||||
$number = (int)Configuration::get('PS_DELIVERY_NUMBER');
|
$number = (int)Configuration::get('PS_DELIVERY_NUMBER', null, null, $this->id_shop);
|
||||||
if (!$number)
|
if (!$number)
|
||||||
{
|
{
|
||||||
//if delivery number is not set or wrong, we set a default one.
|
//if delivery number is not set or wrong, we set a default one.
|
||||||
Configuration::updateValue('PS_DELIVERY_NUMBER', 1);
|
Configuration::updateValue('PS_DELIVERY_NUMBER', 1, false, null, $this->id_shop);
|
||||||
$number = 1;
|
$number = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1185,7 +1191,7 @@ class OrderCore extends ObjectModel
|
|||||||
|
|
||||||
// Keep for backward compatibility
|
// Keep for backward compatibility
|
||||||
$this->delivery_number = $number;
|
$this->delivery_number = $number;
|
||||||
Configuration::updateValue('PS_DELIVERY_NUMBER', $number + 1);
|
Configuration::updateValue('PS_DELIVERY_NUMBER', $number + 1, false, null, $this->id_shop);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep it for backward compatibility, to remove on 1.6 version
|
// Keep it for backward compatibility, to remove on 1.6 version
|
||||||
@@ -1591,7 +1597,7 @@ class OrderCore extends ObjectModel
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$amount = Tools::convertPrice($payment->amount, $payment->id_currency, false);
|
$amount = Tools::convertPrice($payment->amount, $payment->id_currency, false);
|
||||||
if ($currency->id == Configuration::get('PS_DEFAULT_CURRENCY'))
|
if ($currency->id == Configuration::get('PS_DEFAULT_CURRENCY', null, null, $this->id_shop))
|
||||||
$total += $amount;
|
$total += $amount;
|
||||||
else
|
else
|
||||||
$total += Tools::convertPrice($amount, $currency->id, true);
|
$total += Tools::convertPrice($amount, $currency->id, true);
|
||||||
|
|||||||
@@ -70,10 +70,10 @@ class OrderHistoryCore extends ObjectModel
|
|||||||
* Sets the new state of the given order
|
* Sets the new state of the given order
|
||||||
*
|
*
|
||||||
* @param int $new_order_state
|
* @param int $new_order_state
|
||||||
* @param int $id_order
|
* @param int/object $id_order
|
||||||
* @param bool $use_existing_payment
|
* @param bool $use_existing_payment
|
||||||
*/
|
*/
|
||||||
public function changeIdOrderState($new_order_state, &$id_order, $use_existing_payment = false)
|
public function changeIdOrderState($new_order_state, $id_order, $use_existing_payment = false)
|
||||||
{
|
{
|
||||||
if (!$new_order_state || !$id_order)
|
if (!$new_order_state || !$id_order)
|
||||||
return;
|
return;
|
||||||
@@ -210,7 +210,7 @@ class OrderHistoryCore extends ObjectModel
|
|||||||
// if the product is a pack, we restock every products in the pack using the last negative stock mvts
|
// if the product is a pack, we restock every products in the pack using the last negative stock mvts
|
||||||
if (Pack::isPack($product['product_id']))
|
if (Pack::isPack($product['product_id']))
|
||||||
{
|
{
|
||||||
$pack_products = Pack::getItems($product['product_id'], Configuration::get('PS_LANG_DEFAULT'));
|
$pack_products = Pack::getItems($product['product_id'], Configuration::get('PS_LANG_DEFAULT', null, null, $order->id_shop));
|
||||||
foreach ($pack_products as $pack_product)
|
foreach ($pack_products as $pack_product)
|
||||||
{
|
{
|
||||||
if ($pack_product->advanced_stock_management == 1)
|
if ($pack_product->advanced_stock_management == 1)
|
||||||
|
|||||||
@@ -345,6 +345,11 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
// shipping cost are added in the product taxes breakdown
|
// shipping cost are added in the product taxes breakdown
|
||||||
if ($this->useOneAfterAnotherTaxComputationMethod())
|
if ($this->useOneAfterAnotherTaxComputationMethod())
|
||||||
return $taxes_breakdown;
|
return $taxes_breakdown;
|
||||||
|
|
||||||
|
// No shipping breakdown if it's free!
|
||||||
|
foreach ($order->getCartRules() as $cart_rule)
|
||||||
|
if ($cart_rule['free_shipping'])
|
||||||
|
return $taxes_breakdown;
|
||||||
|
|
||||||
$shipping_tax_amount = $this->total_shipping_tax_incl - $this->total_shipping_tax_excl;
|
$shipping_tax_amount = $this->total_shipping_tax_incl - $this->total_shipping_tax_excl;
|
||||||
|
|
||||||
@@ -654,9 +659,9 @@ class OrderInvoiceCore extends ObjectModel
|
|||||||
* @param int $id_lang for invoice_prefix
|
* @param int $id_lang for invoice_prefix
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getInvoiceNumberFormatted($id_lang)
|
public function getInvoiceNumberFormatted($id_lang, $id_shop = null)
|
||||||
{
|
{
|
||||||
return '#'.Configuration::get('PS_INVOICE_PREFIX', $id_lang).sprintf('%06d', $this->number);
|
return '#'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, $id_shop).sprintf('%06d', $this->number);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function saveCarrierTaxCalculator(array $taxes_amount)
|
public function saveCarrierTaxCalculator(array $taxes_amount)
|
||||||
|
|||||||
@@ -225,11 +225,12 @@ class OrderReturnCore extends ObjectModel
|
|||||||
public static function addReturnedQuantity(&$products, $id_order)
|
public static function addReturnedQuantity(&$products, $id_order)
|
||||||
{
|
{
|
||||||
$details = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
$details = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||||
SELECT od.id_order_detail, GREATEST(od.product_quantity_return, IFNULL(ord.product_quantity,0)) as qty_returned
|
SELECT od.id_order_detail, GREATEST(od.product_quantity_return, IFNULL(SUM(ord.product_quantity),0)) as qty_returned
|
||||||
FROM '._DB_PREFIX_.'order_detail od
|
FROM '._DB_PREFIX_.'order_detail od
|
||||||
LEFT JOIN '._DB_PREFIX_.'order_return_detail ord
|
LEFT JOIN '._DB_PREFIX_.'order_return_detail ord
|
||||||
ON ord.id_order_detail = od.id_order_detail
|
ON ord.id_order_detail = od.id_order_detail
|
||||||
WHERE od.id_order = '.(int)$id_order
|
WHERE od.id_order = '.(int)$id_order.'
|
||||||
|
GROUP BY od.id_order_detail'
|
||||||
);
|
);
|
||||||
if (!$details)
|
if (!$details)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
|||||||
$this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang);
|
$this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang);
|
||||||
|
|
||||||
$id_lang = Context::getContext()->language->id;
|
$id_lang = Context::getContext()->language->id;
|
||||||
$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang).sprintf('%06d', $order_invoice->number);
|
$this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number);
|
||||||
// footer informations
|
// footer informations
|
||||||
$this->shop = new Shop((int)$this->order->id_shop);
|
$this->shop = new Shop((int)$this->order->id_shop);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ function bqSQL($string)
|
|||||||
function displayFatalError()
|
function displayFatalError()
|
||||||
{
|
{
|
||||||
$error = error_get_last();
|
$error = error_get_last();
|
||||||
if ($error !== NULL)
|
if ($error !== NULL && in_array($error['type'], array(E_ERROR, E_PARSE)))
|
||||||
echo '[PrestaShop] Fatal error in module '.substr(basename($error['file']), 0, -4).':<br />'.$error['message'];
|
echo '[PrestaShop] Fatal error in module '.substr(basename($error['file']), 0, -4).':<br />'.$error['message'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class AdminCurrenciesControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->_select .= 'currency_shop.conversion_rate conversion_rate';
|
$this->_select .= 'currency_shop.conversion_rate conversion_rate';
|
||||||
$this->_join .= Shop::addSqlAssociation('currency', 'a');
|
$this->_join .= Shop::addSqlAssociation('currency', 'a');
|
||||||
|
$this->_group .= 'GROUP BY id_currency';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderList()
|
public function renderList()
|
||||||
|
|||||||
@@ -644,10 +644,14 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
||||||
file_put_contents($uniqid_path, $field);
|
file_put_contents($uniqid_path, $field);
|
||||||
$fd = fopen($uniqid_path, 'r');
|
$tab = '';
|
||||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
if(!empty($uniqid_path))
|
||||||
fclose($fd);
|
{
|
||||||
unlink($uniqid_path);
|
$fd = fopen($uniqid_path, 'r');
|
||||||
|
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||||
|
fclose($fd);
|
||||||
|
unlink($uniqid_path);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($tab) || (!is_array($tab)))
|
if (empty($tab) || (!is_array($tab)))
|
||||||
return array();
|
return array();
|
||||||
@@ -727,8 +731,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
public static function getMaskedRow($row)
|
public static function getMaskedRow($row)
|
||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach (self::$column_mask as $type => $nb)
|
if (is_array(self::$column_mask))
|
||||||
$res[$type] = isset($row[$nb]) ? $row[$nb] : null;
|
foreach (self::$column_mask as $type => $nb)
|
||||||
|
$res[$type] = isset($row[$nb]) ? $row[$nb] : null;
|
||||||
|
|
||||||
if (Tools::getValue('forceIds')) // if you choose to force table before import the column id is remove from the CSV file.
|
if (Tools::getValue('forceIds')) // if you choose to force table before import the column id is remove from the CSV file.
|
||||||
unset($res['id']);
|
unset($res['id']);
|
||||||
@@ -899,7 +904,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$category_to_create->name[$default_language_id],
|
$category_to_create->name[$default_language_id],
|
||||||
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -972,10 +977,10 @@ class AdminImportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||||
$info['name'],
|
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||||
(isset($info['id']) ? $info['id'] : 'null')
|
(isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID')
|
||||||
);
|
);
|
||||||
$error_tmp = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError();
|
$error_tmp = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').Db::getInstance()->getMsgError();
|
||||||
if ($error_tmp != '')
|
if ($error_tmp != '')
|
||||||
$this->errors[] = $error_tmp;
|
$this->errors[] = $error_tmp;
|
||||||
}
|
}
|
||||||
@@ -1099,7 +1104,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$manufacturer->name,
|
$manufacturer->name,
|
||||||
(isset($manufacturer->id) ? $manufacturer->id : 'null')
|
(isset($manufacturer->id) ? $manufacturer->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1130,7 +1135,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$supplier->name,
|
$supplier->name,
|
||||||
(isset($supplier->id) ? $supplier->id : 'null')
|
(isset($supplier->id) ? $supplier->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1176,7 +1181,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$category_to_create->name[$default_language_id],
|
$category_to_create->name[$default_language_id],
|
||||||
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1208,7 +1213,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$category_to_create->name[$default_language_id],
|
$category_to_create->name[$default_language_id],
|
||||||
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
(isset($category_to_create->id) ? $category_to_create->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1303,10 +1308,10 @@ class AdminImportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||||
$info['name'],
|
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||||
(isset($info['id']) ? $info['id'] : 'null')
|
(isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1347,7 +1352,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$specific_price->from = (isset($info['reduction_from']) && Validate::isDate($info['reduction_from'])) ? $info['reduction_from'] : '0000-00-00 00:00:00';
|
$specific_price->from = (isset($info['reduction_from']) && Validate::isDate($info['reduction_from'])) ? $info['reduction_from'] : '0000-00-00 00:00:00';
|
||||||
$specific_price->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00';
|
$specific_price->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00';
|
||||||
if (!$specific_price->add())
|
if (!$specific_price->add())
|
||||||
$this->addProductWarning($info['name'], $product->id, $this->l('Discount is invalid'));
|
$this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Discount is invalid'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($product->tags) && !empty($product->tags))
|
if (isset($product->tags) && !empty($product->tags))
|
||||||
@@ -1363,7 +1368,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$is_tag_added = Tag::addTags($key, $product->id, $tags, $this->multiple_value_separator);
|
$is_tag_added = Tag::addTags($key, $product->id, $tags, $this->multiple_value_separator);
|
||||||
if (!$is_tag_added)
|
if (!$is_tag_added)
|
||||||
{
|
{
|
||||||
$this->addProductWarning($info['name'], $product->id, $this->l('Tags list is invalid'));
|
$this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Tags list is invalid'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1380,7 +1385,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$is_tag_added = Tag::addTags($key, $product->id, $str, $this->multiple_value_separator);
|
$is_tag_added = Tag::addTags($key, $product->id, $str, $this->multiple_value_separator);
|
||||||
if (!$is_tag_added)
|
if (!$is_tag_added)
|
||||||
{
|
{
|
||||||
$this->addProductWarning($info['name'], $product->id, 'Invalid tag(s) ('.$str.')');
|
$this->addProductWarning(Tools::safeOutput($info['name']), (int)$product->id, 'Invalid tag(s) ('.$str.')');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1445,9 +1450,12 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$feature_name = trim($tab_feature[0]);
|
$feature_name = trim($tab_feature[0]);
|
||||||
$feature_value = trim($tab_feature[1]);
|
$feature_value = trim($tab_feature[1]);
|
||||||
$position = isset($tab_feature[2]) ? $tab_feature[2]: false;
|
$position = isset($tab_feature[2]) ? $tab_feature[2]: false;
|
||||||
$id_feature = Feature::addFeatureImport($feature_name, $position);
|
if(!empty($feature_name) && !empty($feature_value))
|
||||||
$id_feature_value = FeatureValue::addFeatureValueImport($id_feature, $feature_value);
|
{
|
||||||
Product::addFeatureProductImport($product->id, $id_feature, $id_feature_value);
|
$id_feature = Feature::addFeatureImport($feature_name, $position);
|
||||||
|
$id_feature_value = FeatureValue::addFeatureValueImport($id_feature, $feature_value);
|
||||||
|
Product::addFeatureProductImport($product->id, $id_feature, $id_feature_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// clean feature positions to avoid conflict
|
// clean feature positions to avoid conflict
|
||||||
Feature::cleanPositions();
|
Feature::cleanPositions();
|
||||||
@@ -1464,9 +1472,6 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Configuration::get('PS_SEARCH_INDEXATION'))
|
|
||||||
Search::indexation(true);
|
|
||||||
|
|
||||||
$this->closeCsvFile($handle);
|
$this->closeCsvFile($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1511,8 +1516,12 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$id_shop_list[] = Shop::getIdByName($shop);
|
$id_shop_list[] = Shop::getIdByName($shop);
|
||||||
else
|
else
|
||||||
$id_shop_list[] = $shop;
|
$id_shop_list[] = $shop;
|
||||||
|
|
||||||
$product = new Product((int)$info['id_product'], false, $default_language);
|
if(isset($info['id_product']))
|
||||||
|
$product = new Product((int)$info['id_product'], false, $default_language);
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
|
||||||
$id_image = null;
|
$id_image = null;
|
||||||
|
|
||||||
//delete existing images if "delete_existing_images" is set to 1
|
//delete existing images if "delete_existing_images" is set to 1
|
||||||
@@ -1552,7 +1561,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
Tools::displayError('%s cannot be saved'),
|
Tools::displayError('%s cannot be saved'),
|
||||||
(isset($image->id_product) ? ' ('.$image->id_product.')' : '')
|
(isset($image->id_product) ? ' ('.$image->id_product.')' : '')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').mysql_error();
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').mysql_error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (isset($info['image_position']) && $info['image_position'])
|
elseif (isset($info['image_position']) && $info['image_position'])
|
||||||
@@ -1577,53 +1586,54 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$id_attribute_group = 0;
|
$id_attribute_group = 0;
|
||||||
// groups
|
// groups
|
||||||
$groups_attributes = array();
|
$groups_attributes = array();
|
||||||
foreach (explode($this->multiple_value_separator, $info['group']) as $key => $group)
|
if(isset($info['group']))
|
||||||
{
|
foreach (explode($this->multiple_value_separator, $info['group']) as $key => $group)
|
||||||
$tab_group = explode(':', $group);
|
|
||||||
$group = trim($tab_group[0]);
|
|
||||||
if (!isset($tab_group[1]))
|
|
||||||
$type = 'select';
|
|
||||||
else
|
|
||||||
$type = trim($tab_group[1]);
|
|
||||||
|
|
||||||
// sets group
|
|
||||||
$groups_attributes[$key]['group'] = $group;
|
|
||||||
|
|
||||||
// if position is filled
|
|
||||||
if (isset($tab_group[2]))
|
|
||||||
$position = trim($tab_group[2]);
|
|
||||||
else
|
|
||||||
$position = false;
|
|
||||||
|
|
||||||
if (!isset($groups[$group]))
|
|
||||||
{
|
{
|
||||||
$obj = new AttributeGroup();
|
$tab_group = explode(':', $group);
|
||||||
$obj->is_color_group = false;
|
$group = trim($tab_group[0]);
|
||||||
$obj->group_type = pSQL($type);
|
if (!isset($tab_group[1]))
|
||||||
$obj->name[$default_language] = $group;
|
$type = 'select';
|
||||||
$obj->public_name[$default_language] = $group;
|
|
||||||
$obj->position = (!$position) ? AttributeGroup::getHigherPosition() + 1 : $position;
|
|
||||||
|
|
||||||
if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
|
||||||
($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true)
|
|
||||||
{
|
|
||||||
$obj->add();
|
|
||||||
$obj->associateTo($id_shop_list);
|
|
||||||
$groups[$group] = $obj->id;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '');
|
$type = trim($tab_group[1]);
|
||||||
|
|
||||||
// fils groups attributes
|
// sets group
|
||||||
$id_attribute_group = $obj->id;
|
$groups_attributes[$key]['group'] = $group;
|
||||||
$groups_attributes[$key]['id'] = $id_attribute_group;
|
|
||||||
|
// if position is filled
|
||||||
|
if (isset($tab_group[2]))
|
||||||
|
$position = trim($tab_group[2]);
|
||||||
|
else
|
||||||
|
$position = false;
|
||||||
|
|
||||||
|
if (!isset($groups[$group]))
|
||||||
|
{
|
||||||
|
$obj = new AttributeGroup();
|
||||||
|
$obj->is_color_group = false;
|
||||||
|
$obj->group_type = pSQL($type);
|
||||||
|
$obj->name[$default_language] = $group;
|
||||||
|
$obj->public_name[$default_language] = $group;
|
||||||
|
$obj->position = (!$position) ? AttributeGroup::getHigherPosition() + 1 : $position;
|
||||||
|
|
||||||
|
if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||||
|
($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true)
|
||||||
|
{
|
||||||
|
$obj->add();
|
||||||
|
$obj->associateTo($id_shop_list);
|
||||||
|
$groups[$group] = $obj->id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '');
|
||||||
|
|
||||||
|
// fils groups attributes
|
||||||
|
$id_attribute_group = $obj->id;
|
||||||
|
$groups_attributes[$key]['id'] = $id_attribute_group;
|
||||||
|
}
|
||||||
|
else // alreay exists
|
||||||
|
{
|
||||||
|
$id_attribute_group = $groups[$group];
|
||||||
|
$groups_attributes[$key]['id'] = $id_attribute_group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // alreay exists
|
|
||||||
{
|
|
||||||
$id_attribute_group = $groups[$group];
|
|
||||||
$groups_attributes[$key]['id'] = $id_attribute_group;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// inits attribute
|
// inits attribute
|
||||||
$id_product_attribute = 0;
|
$id_product_attribute = 0;
|
||||||
@@ -1631,116 +1641,118 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$attributes_to_add = array();
|
$attributes_to_add = array();
|
||||||
|
|
||||||
// for each attribute
|
// for each attribute
|
||||||
foreach (explode($this->multiple_value_separator, $info['attribute']) as $key => $attribute)
|
if(isset($info['attribute']))
|
||||||
{
|
foreach (explode($this->multiple_value_separator, $info['attribute']) as $key => $attribute)
|
||||||
$tab_attribute = explode(':', $attribute);
|
|
||||||
$attribute = trim($tab_attribute[0]);
|
|
||||||
// if position is filled
|
|
||||||
if (isset($tab_attribute[1]))
|
|
||||||
$position = trim($tab_attribute[1]);
|
|
||||||
else
|
|
||||||
$position = false;
|
|
||||||
|
|
||||||
if (isset($groups_attributes[$key]))
|
|
||||||
{
|
{
|
||||||
$group = $groups_attributes[$key]['group'];
|
$tab_attribute = explode(':', $attribute);
|
||||||
if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2)
|
$attribute = trim($tab_attribute[0]);
|
||||||
|
// if position is filled
|
||||||
|
if (isset($tab_attribute[1]))
|
||||||
|
$position = trim($tab_attribute[1]);
|
||||||
|
else
|
||||||
|
$position = false;
|
||||||
|
|
||||||
|
if (isset($groups_attributes[$key]))
|
||||||
{
|
{
|
||||||
$id_attribute_group = $groups_attributes[$key]['id'];
|
$group = $groups_attributes[$key]['group'];
|
||||||
$obj = new Attribute();
|
if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2)
|
||||||
// sets the proper id (corresponding to the right key)
|
|
||||||
$obj->id_attribute_group = $groups_attributes[$key]['id'];
|
|
||||||
$obj->name[$default_language] = str_replace('\n', '', str_replace('\r', '', $attribute));
|
|
||||||
$obj->position = (!$position) ? Attribute::getHigherPosition($groups[$group]) + 1 : $position;
|
|
||||||
|
|
||||||
if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
|
||||||
($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true)
|
|
||||||
{
|
{
|
||||||
$obj->add();
|
$id_attribute_group = $groups_attributes[$key]['id'];
|
||||||
$obj->associateTo($id_shop_list);
|
$obj = new Attribute();
|
||||||
$attributes[$group.'_'.$attribute] = $obj->id;
|
// sets the proper id (corresponding to the right key)
|
||||||
}
|
$obj->id_attribute_group = $groups_attributes[$key]['id'];
|
||||||
else
|
$obj->name[$default_language] = str_replace('\n', '', str_replace('\r', '', $attribute));
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '');
|
$obj->position = (!$position && isset($groups[$group])) ? Attribute::getHigherPosition($groups[$group]) + 1 : $position;
|
||||||
}
|
|
||||||
|
if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||||
$info['minimal_quantity'] = isset($info['minimal_quantity']) && $info['minimal_quantity'] ? (int)$info['minimal_quantity'] : 1;
|
($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true)
|
||||||
|
|
||||||
$info['wholesale_price'] = str_replace(',', '.', $info['wholesale_price']);
|
|
||||||
$info['price'] = str_replace(',', '.', $info['price']);
|
|
||||||
$info['ecotax'] = str_replace(',', '.', $info['ecotax']);
|
|
||||||
$info['weight'] = str_replace(',', '.', $info['weight']);
|
|
||||||
|
|
||||||
// if a reference is specified for this product, get the associate id_product_attribute to UPDATE
|
|
||||||
if (isset($info['reference']) && !empty($info['reference']))
|
|
||||||
{
|
|
||||||
$id_product_attribute = Combination::getIdByReference($product->id, strval($info['reference']));
|
|
||||||
|
|
||||||
// updates the attribute
|
|
||||||
if ($id_product_attribute)
|
|
||||||
{
|
|
||||||
// gets all the combinations of this product
|
|
||||||
$attribute_combinations = $product->getAttributeCombinations($default_language);
|
|
||||||
foreach ($attribute_combinations as $attribute_combination)
|
|
||||||
{
|
{
|
||||||
if ($id_product_attribute && in_array($id_product_attribute, $attribute_combination))
|
$obj->add();
|
||||||
|
$obj->associateTo($id_shop_list);
|
||||||
|
$attributes[$group.'_'.$attribute] = $obj->id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '');
|
||||||
|
}
|
||||||
|
|
||||||
|
$info['minimal_quantity'] = isset($info['minimal_quantity']) && $info['minimal_quantity'] ? (int)$info['minimal_quantity'] : 1;
|
||||||
|
|
||||||
|
$info['wholesale_price'] = str_replace(',', '.', $info['wholesale_price']);
|
||||||
|
$info['price'] = str_replace(',', '.', $info['price']);
|
||||||
|
$info['ecotax'] = str_replace(',', '.', $info['ecotax']);
|
||||||
|
$info['weight'] = str_replace(',', '.', $info['weight']);
|
||||||
|
|
||||||
|
// if a reference is specified for this product, get the associate id_product_attribute to UPDATE
|
||||||
|
if (isset($info['reference']) && !empty($info['reference']))
|
||||||
|
{
|
||||||
|
$id_product_attribute = Combination::getIdByReference($product->id, strval($info['reference']));
|
||||||
|
|
||||||
|
// updates the attribute
|
||||||
|
if ($id_product_attribute)
|
||||||
|
{
|
||||||
|
// gets all the combinations of this product
|
||||||
|
$attribute_combinations = $product->getAttributeCombinations($default_language);
|
||||||
|
foreach ($attribute_combinations as $attribute_combination)
|
||||||
{
|
{
|
||||||
$product->updateAttribute(
|
if ($id_product_attribute && in_array($id_product_attribute, $attribute_combination))
|
||||||
$id_product_attribute,
|
{
|
||||||
(float)$info['wholesale_price'],
|
$product->updateAttribute(
|
||||||
(float)$info['price'],
|
$id_product_attribute,
|
||||||
(float)$info['weight'],
|
(float)$info['wholesale_price'],
|
||||||
0,
|
(float)$info['price'],
|
||||||
(float)$info['ecotax'],
|
(float)$info['weight'],
|
||||||
$id_image,
|
0,
|
||||||
strval($info['reference']),
|
(float)$info['ecotax'],
|
||||||
strval($info['ean13']),
|
$id_image,
|
||||||
(int)$info['default_on'],
|
strval($info['reference']),
|
||||||
0,
|
strval($info['ean13']),
|
||||||
strval($info['upc']),
|
(int)$info['default_on'],
|
||||||
(int)$info['minimal_quantity'],
|
0,
|
||||||
0,
|
strval($info['upc']),
|
||||||
null,
|
(int)$info['minimal_quantity'],
|
||||||
$id_shop_list
|
0,
|
||||||
);
|
null,
|
||||||
|
$id_shop_list
|
||||||
$id_product_attribute_update = true;
|
);
|
||||||
|
|
||||||
|
$id_product_attribute_update = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if no attribute reference is specified, creates a new one
|
||||||
|
if (!$id_product_attribute)
|
||||||
|
{
|
||||||
|
$id_product_attribute = $product->addCombinationEntity(
|
||||||
|
(float)$info['wholesale_price'],
|
||||||
|
(float)$info['price'],
|
||||||
|
(float)$info['weight'],
|
||||||
|
0,
|
||||||
|
(float)$info['ecotax'],
|
||||||
|
(int)$info['quantity'],
|
||||||
|
$id_image,
|
||||||
|
strval($info['reference']),
|
||||||
|
0,
|
||||||
|
strval($info['ean13']),
|
||||||
|
(int)$info['default_on'],
|
||||||
|
0,
|
||||||
|
strval($info['upc']),
|
||||||
|
(int)$info['minimal_quantity'],
|
||||||
|
$id_shop_list
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// fills our attributes array, in order to add the attributes to the product_attribute afterwards
|
||||||
|
if(isset($attributes[$group.'_'.$attribute]))
|
||||||
|
$attributes_to_add[] = (int)$attributes[$group.'_'.$attribute];
|
||||||
|
|
||||||
|
// after insertion, we clean attribute position and group attribute position
|
||||||
|
$obj = new Attribute();
|
||||||
|
$obj->cleanPositions((int)$id_attribute_group, false);
|
||||||
|
AttributeGroup::cleanPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no attribute reference is specified, creates a new one
|
|
||||||
if (!$id_product_attribute)
|
|
||||||
{
|
|
||||||
$id_product_attribute = $product->addCombinationEntity(
|
|
||||||
(float)$info['wholesale_price'],
|
|
||||||
(float)$info['price'],
|
|
||||||
(float)$info['weight'],
|
|
||||||
0,
|
|
||||||
(float)$info['ecotax'],
|
|
||||||
(int)$info['quantity'],
|
|
||||||
$id_image,
|
|
||||||
strval($info['reference']),
|
|
||||||
0,
|
|
||||||
strval($info['ean13']),
|
|
||||||
(int)$info['default_on'],
|
|
||||||
0,
|
|
||||||
strval($info['upc']),
|
|
||||||
(int)$info['minimal_quantity'],
|
|
||||||
$id_shop_list
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fills our attributes array, in order to add the attributes to the product_attribute afterwards
|
|
||||||
$attributes_to_add[] = (int)$attributes[$group.'_'.$attribute];
|
|
||||||
|
|
||||||
// after insertion, we clean attribute position and group attribute position
|
|
||||||
$obj = new Attribute();
|
|
||||||
$obj->cleanPositions((int)$id_attribute_group, false);
|
|
||||||
AttributeGroup::cleanPositions();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$product->checkDefaultAttributes();
|
$product->checkDefaultAttributes();
|
||||||
if (!$product->cache_default_attribute)
|
if (!$product->cache_default_attribute)
|
||||||
@@ -1907,7 +1919,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$info['email'],
|
$info['email'],
|
||||||
(isset($info['id']) ? $info['id'] : 'null')
|
(isset($info['id']) ? $info['id'] : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1954,7 +1966,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $country->name[$default_language_id]);
|
$this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $country->name[$default_language_id]);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1984,7 +1996,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $state->name);
|
$this->errors[] = sprintf(Tools::displayError('%s cannot be saved'), $state->name);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2053,7 +2065,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$manufacturer->name,
|
$manufacturer->name,
|
||||||
(isset($manufacturer->id) ? $manufacturer->id : 'null')
|
(isset($manufacturer->id) ? $manufacturer->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2074,7 +2086,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$supplier->name,
|
$supplier->name,
|
||||||
(isset($supplier->id) ? $supplier->id : 'null')
|
(isset($supplier->id) ? $supplier->id : 'null')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2188,10 +2200,10 @@ class AdminImportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
||||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||||
$info['name'],
|
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||||
(isset($info['id']) ? $info['id'] : 'null')
|
(isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID')
|
||||||
);
|
);
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '').
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '').
|
||||||
Db::getInstance()->getMsgError();
|
Db::getInstance()->getMsgError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2235,8 +2247,8 @@ class AdminImportControllerCore extends AdminController
|
|||||||
if (!$res)
|
if (!$res)
|
||||||
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
||||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||||
$info['name'],
|
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||||
(isset($info['id']) ? $info['id'] : 'null')
|
(isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID')
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2263,7 +2275,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errors[] = $this->l('Supplier is invalid').' ('.$supplier->name.')';
|
$this->errors[] = $this->l('Supplier is invalid').' ('.$supplier->name.')';
|
||||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '');
|
$this->errors[] = ($field_error !== true ? $field_error : '').(isset($lang_field_error) && $lang_field_error !== true ? $lang_field_error : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->closeCsvFile($handle);
|
$this->closeCsvFile($handle);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ class AdminLoginControllerCore extends AdminController
|
|||||||
'{passwd}' => $pwd
|
'{passwd}' => $pwd
|
||||||
);
|
);
|
||||||
|
|
||||||
if (Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'password', Mail::l('Your new password', (int)Configuration::get('PS_LANG_DEFAULT')), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
|
if (Mail::Send($employee->id_lang, 'password', Mail::l('Your new password', $employee->id_lang), $params, $employee->email, $employee->firstname.' '.$employee->lastname))
|
||||||
{
|
{
|
||||||
// Update employee only if the mail can be sent
|
// Update employee only if the mail can be sent
|
||||||
$result = $employee->update();
|
$result = $employee->update();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class AdminLogsControllerCore extends AdminController
|
|||||||
'submit' => array()
|
'submit' => array()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
$this->list_no_link = true;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ class AdminModulesControllerCore extends AdminController
|
|||||||
die ('KO');
|
die ('KO');
|
||||||
if ($result == 'OK')
|
if ($result == 'OK')
|
||||||
{
|
{
|
||||||
|
Configuration::updateValue('PS_LOGGED_ON_ADDONS', 1);
|
||||||
$this->context->cookie->username_addons = pSQL(trim(Tools::getValue('username_addons')));
|
$this->context->cookie->username_addons = pSQL(trim(Tools::getValue('username_addons')));
|
||||||
$this->context->cookie->password_addons = pSQL(trim(Tools::getValue('password_addons')));
|
$this->context->cookie->password_addons = pSQL(trim(Tools::getValue('password_addons')));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$message = $customer_message->message;
|
$message = $customer_message->message;
|
||||||
if (Configuration::get('PS_MAIL_TYPE') != Mail::TYPE_TEXT)
|
if (Configuration::get('PS_MAIL_TYPE', null, null, $order->id_shop) != Mail::TYPE_TEXT)
|
||||||
$message = Tools::nl2br($customer_message->message);
|
$message = Tools::nl2br($customer_message->message);
|
||||||
|
|
||||||
$varsTpl = array(
|
$varsTpl = array(
|
||||||
@@ -972,7 +972,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
elseif (Tools::isSubmit('submitGenerateInvoice') && isset($order))
|
elseif (Tools::isSubmit('submitGenerateInvoice') && isset($order))
|
||||||
{
|
{
|
||||||
if (!Configuration::get('PS_INVOICE'))
|
if (!Configuration::get('PS_INVOICE', null, null, $order->id_shop))
|
||||||
$this->errors[] = Tools::displayError('Invoice management has been disabled');
|
$this->errors[] = Tools::displayError('Invoice management has been disabled');
|
||||||
elseif ($order->hasInvoice())
|
elseif ($order->hasInvoice())
|
||||||
$this->errors[] = Tools::displayError('This order already has an invoice');
|
$this->errors[] = Tools::displayError('This order already has an invoice');
|
||||||
@@ -1102,7 +1102,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
foreach ($order_invoices_collection as $order_invoice)
|
foreach ($order_invoices_collection as $order_invoice)
|
||||||
{
|
{
|
||||||
if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl)
|
if (Tools::getValue('discount_value') > $order_invoice->total_paid_tax_incl)
|
||||||
$this->errors[] = Tools::displayError('Discount value is greater than the order invoice total (Invoice:').$order_invoice->getInvoiceNumberFormatted(Context::getContext()->language->id).')';
|
$this->errors[] = Tools::displayError('Discount value is greater than the order invoice total (Invoice:').$order_invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop).')';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2);
|
$cart_rules[$order_invoice->id]['value_tax_incl'] = Tools::ps_round(Tools::getValue('discount_value'), 2);
|
||||||
@@ -1292,7 +1292,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
// display warning if there are products out of stock
|
// display warning if there are products out of stock
|
||||||
$display_out_of_stock_warning = false;
|
$display_out_of_stock_warning = false;
|
||||||
$current_order_state = $order->getCurrentOrderState();
|
$current_order_state = $order->getCurrentOrderState();
|
||||||
if ($current_order_state->delivery != 1 && $current_order_state->shipped != 1)
|
if (!Validate::isLoadedObject($current_order_state) || ($current_order_state->delivery != 1 && $current_order_state->shipped != 1))
|
||||||
$display_out_of_stock_warning = true;
|
$display_out_of_stock_warning = true;
|
||||||
|
|
||||||
// products current stock (from stock_available)
|
// products current stock (from stock_available)
|
||||||
@@ -1352,7 +1352,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
'invoices_collection' => $order->getInvoicesCollection(),
|
'invoices_collection' => $order->getInvoicesCollection(),
|
||||||
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
|
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
|
||||||
'payment_methods' => $payment_methods,
|
'payment_methods' => $payment_methods,
|
||||||
'invoice_management_active' => Configuration::get('PS_INVOICE')
|
'invoice_management_active' => Configuration::get('PS_INVOICE', null, null, $order->id_shop)
|
||||||
);
|
);
|
||||||
|
|
||||||
return parent::renderView();
|
return parent::renderView();
|
||||||
@@ -1535,7 +1535,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$use_taxes = true;
|
$use_taxes = true;
|
||||||
|
|
||||||
$initial_product_price_tax_incl = Product::getPriceStatic($product->id, $use_taxes, isset($combination) ? $combination->id : null, 2, null, false, true, 1,
|
$initial_product_price_tax_incl = Product::getPriceStatic($product->id, $use_taxes, isset($combination) ? $combination->id : null, 2, null, false, true, 1,
|
||||||
false, $order->id_customer, $cart->id, $order->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
false, $order->id_customer, $cart->id, $order->{Configuration::get('PS_TAX_ADDRESS_TYPE', null, null, $order->id_shop)});
|
||||||
|
|
||||||
// Creating specific price if needed
|
// Creating specific price if needed
|
||||||
if ($product_informations['product_price_tax_incl'] != $initial_product_price_tax_incl)
|
if ($product_informations['product_price_tax_incl'] != $initial_product_price_tax_incl)
|
||||||
@@ -1612,11 +1612,11 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
$order_invoice->id_order = $order->id;
|
$order_invoice->id_order = $order->id;
|
||||||
if ($order_invoice->number)
|
if ($order_invoice->number)
|
||||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false);
|
Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $order->id_shop);
|
||||||
else
|
else
|
||||||
$order_invoice->number = Order::getLastInvoiceNumber() + 1;
|
$order_invoice->number = Order::getLastInvoiceNumber() + 1;
|
||||||
|
|
||||||
$invoice_address = new Address((int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')});
|
$invoice_address = new Address((int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE', null, null, $order->id_shop)});
|
||||||
$carrier = new Carrier((int)$order->id_carrier);
|
$carrier = new Carrier((int)$order->id_carrier);
|
||||||
$tax_calculator = $carrier->getTaxCalculator($invoice_address);
|
$tax_calculator = $carrier->getTaxCalculator($invoice_address);
|
||||||
|
|
||||||
@@ -1713,7 +1713,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$invoice_array = array();
|
$invoice_array = array();
|
||||||
foreach ($invoice_collection as $invoice)
|
foreach ($invoice_collection as $invoice)
|
||||||
{
|
{
|
||||||
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id);
|
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop);
|
||||||
$invoice_array[] = $invoice;
|
$invoice_array[] = $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1909,14 +1909,14 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity'];
|
$product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity'];
|
||||||
$product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl'];
|
$product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl'];
|
||||||
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
|
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
|
||||||
|
$product['refund_history'] = OrderSlip::getProductSlipDetail($order_detail->id);
|
||||||
// Get invoices collection
|
// Get invoices collection
|
||||||
$invoice_collection = $order->getInvoicesCollection();
|
$invoice_collection = $order->getInvoicesCollection();
|
||||||
|
|
||||||
$invoice_array = array();
|
$invoice_array = array();
|
||||||
foreach ($invoice_collection as $invoice)
|
foreach ($invoice_collection as $invoice)
|
||||||
{
|
{
|
||||||
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id);
|
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop);
|
||||||
$invoice_array[] = $invoice;
|
$invoice_array[] = $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2003,7 +2003,7 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
$invoice_array = array();
|
$invoice_array = array();
|
||||||
foreach ($invoice_collection as $invoice)
|
foreach ($invoice_collection as $invoice)
|
||||||
{
|
{
|
||||||
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id);
|
$invoice->name = $invoice->getInvoiceNumberFormatted(Context::getContext()->language->id, (int)$order->id_shop);
|
||||||
$invoice_array[] = $invoice;
|
$invoice_array[] = $invoice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -725,6 +725,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
$cache_active = 0;
|
$cache_active = 0;
|
||||||
else
|
else
|
||||||
$cache_active = 1;
|
$cache_active = 1;
|
||||||
|
|
||||||
if (!$caching_system = Tools::getValue('caching_system'))
|
if (!$caching_system = Tools::getValue('caching_system'))
|
||||||
$this->errors[] = Tools::displayError('Caching system is missing');
|
$this->errors[] = Tools::displayError('Caching system is missing');
|
||||||
else
|
else
|
||||||
@@ -733,6 +734,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
'define(\'_PS_CACHING_SYSTEM_\', \''.$caching_system.'\');',
|
'define(\'_PS_CACHING_SYSTEM_\', \''.$caching_system.'\');',
|
||||||
$new_settings
|
$new_settings
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache'))
|
if ($cache_active && $caching_system == 'CacheMemcache' && !extension_loaded('memcache'))
|
||||||
$this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
$this->errors[] = Tools::displayError('To use Memcached, you must install the Memcache PECL extension on your server.').'
|
||||||
<a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>';
|
<a href="http://www.php.net/manual/en/memcache.installation.php">http://www.php.net/manual/en/memcache.installation.php</a>';
|
||||||
@@ -759,7 +761,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
Configuration::updateValue('PS_CACHEFS_DIRECTORY_DEPTH', (int)$depth);
|
Configuration::updateValue('PS_CACHEFS_DIRECTORY_DEPTH', (int)$depth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($caching_system == 'MCached' && $cache_active && !_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'MCached')
|
else if ($caching_system == 'CacheMemcache' && $cache_active && !_PS_CACHE_ENABLED_ && _PS_CACHING_SYSTEM_ == 'CacheMemcache')
|
||||||
Cache::getInstance()->flush();
|
Cache::getInstance()->flush();
|
||||||
|
|
||||||
if (!count($this->errors))
|
if (!count($this->errors))
|
||||||
@@ -778,8 +780,7 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||||
}
|
}
|
||||||
|
if ($redirecAdmin && (!isset($this->errors) || !count($this->errors)))
|
||||||
if ($redirecAdmin)
|
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
|
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
|
||||||
else
|
else
|
||||||
return parent::postProcess();
|
return parent::postProcess();
|
||||||
|
|||||||
@@ -1422,8 +1422,9 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
if (!Image::getCover($image->id_product))
|
if (!Image::getCover($image->id_product))
|
||||||
{
|
{
|
||||||
$res &= Db::getInstance()->execute('
|
$res &= Db::getInstance()->execute('
|
||||||
UPDATE `'._DB_PREFIX_.'image_shop` image_shop
|
UPDATE `'._DB_PREFIX_.'image_shop` image_shop, '._DB_PREFIX_.'image i
|
||||||
SET image_shop.`cover` = 1
|
SET image_shop.`cover` = 1,
|
||||||
|
i.cover = 1
|
||||||
WHERE image_shop.`id_image` = (SELECT id_image FROM
|
WHERE image_shop.`id_image` = (SELECT id_image FROM
|
||||||
(SELECT image_shop.id_image
|
(SELECT image_shop.id_image
|
||||||
FROM '._DB_PREFIX_.'image i'.
|
FROM '._DB_PREFIX_.'image i'.
|
||||||
@@ -1431,7 +1432,8 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
WHERE i.id_product ='.(int)$image->id_product.' LIMIT 1
|
WHERE i.id_product ='.(int)$image->id_product.' LIMIT 1
|
||||||
) tmpImage)
|
) tmpImage)
|
||||||
AND id_shop='.(int)$this->context->shop->id.'
|
AND id_shop='.(int)$this->context->shop->id.'
|
||||||
LIMIT 1');
|
AND i.id_image = image_shop.id_image
|
||||||
|
');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg'))
|
if (file_exists(_PS_TMP_IMG_DIR_.'product_'.$image->id_product.'.jpg'))
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class AdminSearchConfControllerCore extends AdminController
|
|||||||
'title' => $this->l('Blacklisted words'),
|
'title' => $this->l('Blacklisted words'),
|
||||||
'size' => 35,
|
'size' => 35,
|
||||||
'validation' => 'isGenericName',
|
'validation' => 'isGenericName',
|
||||||
'desc' => $this->l('Please enter the index words separated by a "|".'|".'),
|
'desc' => $this->l('Please enter the index words separated by a "|".'),
|
||||||
'type' => 'textLang'
|
'type' => 'textLang'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -202,7 +202,11 @@ class AdminSearchControllerCore extends AdminController
|
|||||||
global $_LANGADM;
|
global $_LANGADM;
|
||||||
$tabs = array();
|
$tabs = array();
|
||||||
$key_match = array();
|
$key_match = array();
|
||||||
$result = Db::getInstance()->executeS('SELECT class_name, name FROM '._DB_PREFIX_.'tab t INNER JOIN '._DB_PREFIX_.'tab_lang tl ON t.id_tab = tl.id_tab AND tl.id_lang = '.(int)$this->context->language->id);
|
$result = Db::getInstance()->executeS('
|
||||||
|
SELECT class_name, name
|
||||||
|
FROM '._DB_PREFIX_.'tab t
|
||||||
|
INNER JOIN '._DB_PREFIX_.'tab_lang tl ON (t.id_tab = tl.id_tab AND tl.id_lang = '.(int)$this->context->language->id.')
|
||||||
|
WHERE active = 1');
|
||||||
foreach ($result as $row)
|
foreach ($result as $row)
|
||||||
{
|
{
|
||||||
$tabs[strtolower($row['class_name'])] = $row['name'];
|
$tabs[strtolower($row['class_name'])] = $row['name'];
|
||||||
|
|||||||
@@ -604,22 +604,32 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
$global = false;
|
$global = false;
|
||||||
foreach ($lines as $line)
|
foreach ($lines as $line)
|
||||||
{
|
{
|
||||||
|
// PHP tags
|
||||||
if (in_array($line, array('<?php', '?>', '')))
|
if (in_array($line, array('<?php', '?>', '')))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Global variable declaration
|
||||||
if (!$global && preg_match('/^global\s+\$([a-z0-9-_]+)\s*;$/i', $line, $matches))
|
if (!$global && preg_match('/^global\s+\$([a-z0-9-_]+)\s*;$/i', $line, $matches))
|
||||||
{
|
{
|
||||||
$global = $matches[1];
|
$global = $matches[1];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Global variable initialization
|
||||||
if ($global != false && preg_match('/^\$'.preg_quote($global, '/').'\s*=\s*array\(\s*\)\s*;$/i', $line))
|
if ($global != false && preg_match('/^\$'.preg_quote($global, '/').'\s*=\s*array\(\s*\)\s*;$/i', $line))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Global variable initialization without declaration
|
||||||
if (!$global && preg_match('/^\$([a-z0-9-_]+)\s*=\s*array\(\s*\)\s*;$/i', $line, $matches))
|
if (!$global && preg_match('/^\$([a-z0-9-_]+)\s*=\s*array\(\s*\)\s*;$/i', $line, $matches))
|
||||||
{
|
{
|
||||||
$global = $matches[1];
|
$global = $matches[1];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assignation
|
||||||
if (preg_match('/^\$'.preg_quote($global, '/').'\[\''._PS_TRANS_PATTERN_.'\'\]\s*=\s*\''._PS_TRANS_PATTERN_.'\'\s*;$/i', $line))
|
if (preg_match('/^\$'.preg_quote($global, '/').'\[\''._PS_TRANS_PATTERN_.'\'\]\s*=\s*\''._PS_TRANS_PATTERN_.'\'\s*;$/i', $line))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Sometimes the global variable is returned...
|
||||||
if (preg_match('/^return\s+\$'.preg_quote($global, '/').'\s*;$/i', $line, $matches))
|
if (preg_match('/^return\s+\$'.preg_quote($global, '/').'\s*;$/i', $line, $matches))
|
||||||
continue;
|
continue;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -294,14 +294,16 @@ class AuthControllerCore extends FrontController
|
|||||||
$this->context->customer = $customer;
|
$this->context->customer = $customer;
|
||||||
|
|
||||||
if (Configuration::get('PS_CART_FOLLOWING') && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0))
|
if (Configuration::get('PS_CART_FOLLOWING') && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0))
|
||||||
|
{
|
||||||
$this->context->cookie->id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id);
|
$this->context->cookie->id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id);
|
||||||
|
$this->context->cart = new Cart((int)$this->context->cookie->id_cart);
|
||||||
// Update cart address
|
}
|
||||||
$this->context->cart->id = $this->context->cookie->id_cart;
|
else
|
||||||
$this->context->cart->setDeliveryOption(null);
|
{
|
||||||
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
|
$this->context->cart->setDeliveryOption(null);
|
||||||
|
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||||
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
|
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||||
|
}
|
||||||
$this->context->cart->secure_key = $customer->secure_key;
|
$this->context->cart->secure_key = $customer->secure_key;
|
||||||
$this->context->cart->update();
|
$this->context->cart->update();
|
||||||
$this->context->cart->autosetProductAddress();
|
$this->context->cart->autosetProductAddress();
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class DiscountControllerCore extends FrontController
|
|||||||
$cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false);
|
$cart_rules = CartRule::getCustomerCartRules($this->context->language->id, $this->context->customer->id, true, false);
|
||||||
$nb_cart_rules = count($cart_rules);
|
$nb_cart_rules = count($cart_rules);
|
||||||
|
|
||||||
$this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules));
|
$this->context->smarty->assign(array('nb_cart_rules' => (int)$nb_cart_rules, 'cart_rules' => $cart_rules, 'discount' => $cart_rules, 'nbDiscounts' => (int)$nb_cart_rules));
|
||||||
$this->setTemplate(_PS_THEME_DIR_.'discount.tpl');
|
$this->setTemplate(_PS_THEME_DIR_.'discount.tpl');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ class OrderControllerCore extends ParentOrderController
|
|||||||
|
|
||||||
// Add checking for all addresses
|
// Add checking for all addresses
|
||||||
$address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers();
|
$address_without_carriers = $this->context->cart->getDeliveryAddressesWithoutCarriers();
|
||||||
if (count($address_without_carriers))
|
if (count($address_without_carriers) && !$this->context->cart->isVirtualCart())
|
||||||
{
|
{
|
||||||
if (count($address_without_carriers) > 1)
|
if (count($address_without_carriers) > 1)
|
||||||
$this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to some addresses you selected.', !Tools::getValue('ajax')));
|
$this->errors[] = sprintf(Tools::displayError('There are no carriers that deliver to some addresses you selected.', !Tools::getValue('ajax')));
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class ProductControllerCore extends FrontController
|
|||||||
|
|
||||||
// Load category
|
// Load category
|
||||||
if (isset($_SERVER['HTTP_REFERER'])
|
if (isset($_SERVER['HTTP_REFERER'])
|
||||||
&& !strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) // Assure us the previous page was one of the shop
|
&& strstr($_SERVER['HTTP_REFERER'], Tools::getHttpHost()) // Assure us the previous page was one of the shop
|
||||||
&& preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs))
|
&& preg_match('!^(.*)\/([0-9]+)\-(.*[^\.])|(.*)id_category=([0-9]+)(.*)$!', $_SERVER['HTTP_REFERER'], $regs))
|
||||||
{
|
{
|
||||||
// If the previous page was a category and is a parent category of the product use this category as parent category
|
// If the previous page was a category and is a parent category of the product use this category as parent category
|
||||||
|
|||||||
@@ -274,7 +274,10 @@ abstract class InstallControllerHttp
|
|||||||
*/
|
*/
|
||||||
public function findNextStep()
|
public function findNextStep()
|
||||||
{
|
{
|
||||||
return (isset(self::$steps[$this->getStepOffset($this->step) + 1])) ? self::$steps[$this->getStepOffset($this->step) + 1] : false;
|
$nextStep = (isset(self::$steps[$this->getStepOffset($this->step) + 1])) ? self::$steps[$this->getStepOffset($this->step) + 1] : false;
|
||||||
|
if ($nextStep == 'system' && self::$instances[$nextStep]->validate())
|
||||||
|
$nextStep = self::$instances[$nextStep]->findNextStep();
|
||||||
|
return $nextStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class InstallControllerHttpConfigure extends InstallControllerHttp
|
|||||||
|
|
||||||
foreach ($top_countries as $iso)
|
foreach ($top_countries as $iso)
|
||||||
$this->list_countries[] = array('iso' => $iso, 'name' => $countries[$iso]);
|
$this->list_countries[] = array('iso' => $iso, 'name' => $countries[$iso]);
|
||||||
$this->list_countries[] = array('name' => '-----------------');
|
$this->list_countries[] = array('iso' => 0, 'name' => '-----------------');
|
||||||
|
|
||||||
foreach ($countries as $iso => $lang)
|
foreach ($countries as $iso => $lang)
|
||||||
if (!in_array($iso, $top_countries))
|
if (!in_array($iso, $top_countries))
|
||||||
|
|||||||
@@ -1182,6 +1182,7 @@ CREATE TABLE `PREFIX_order_cart_rule` (
|
|||||||
`name` varchar(254) NOT NULL,
|
`name` varchar(254) NOT NULL,
|
||||||
`value` decimal(17,2) NOT NULL default '0.00',
|
`value` decimal(17,2) NOT NULL default '0.00',
|
||||||
`value_tax_excl` decimal(17,2) NOT NULL default '0.00',
|
`value_tax_excl` decimal(17,2) NOT NULL default '0.00',
|
||||||
|
`free_shipping` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
PRIMARY KEY (`id_order_cart_rule`),
|
PRIMARY KEY (`id_order_cart_rule`),
|
||||||
KEY `id_order` (`id_order`),
|
KEY `id_order` (`id_order`),
|
||||||
KEY `id_cart_rule` (`id_cart_rule`)
|
KEY `id_cart_rule` (`id_cart_rule`)
|
||||||
|
|||||||
+86
-258
@@ -8,434 +8,262 @@
|
|||||||
</fields>
|
</fields>
|
||||||
<entities>
|
<entities>
|
||||||
<hook id="displayPayment" live_edit="1">
|
<hook id="displayPayment" live_edit="1">
|
||||||
<name>displayPayment</name>
|
<name>displayPayment</name><title>Payment</title><description>This hook displays new elements on the payment page</description>
|
||||||
<title>Payment</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionValidateOrder" live_edit="0">
|
<hook id="actionValidateOrder" live_edit="0">
|
||||||
<name>actionValidateOrder</name>
|
<name>actionValidateOrder</name><title>New orders</title><description/>
|
||||||
<title>New orders</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionPaymentConfirmation" live_edit="0">
|
<hook id="actionPaymentConfirmation" live_edit="0">
|
||||||
<name>actionPaymentConfirmation</name>
|
<name>actionPaymentConfirmation</name><title>Payment confirmation</title><description>This hook displays new elements after the payment is validated</description>
|
||||||
<title>Payment confirmation</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayPaymentReturn" live_edit="0">
|
<hook id="displayPaymentReturn" live_edit="0">
|
||||||
<name>displayPaymentReturn</name>
|
<name>displayPaymentReturn</name><title>Payment return</title><description/>
|
||||||
<title>Payment return</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionUpdateQuantity" live_edit="0">
|
<hook id="actionUpdateQuantity" live_edit="0">
|
||||||
<name>actionUpdateQuantity</name>
|
<name>actionUpdateQuantity</name><title>Quantity update</title><description>Quantity is updated only when a customer effectively places their order</description>
|
||||||
<title>Quantity update</title>
|
|
||||||
<description>Quantity is updated only when the customer effectively <b>place</b> his order.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayRightColumn" live_edit="1">
|
<hook id="displayRightColumn" live_edit="1">
|
||||||
<name>displayRightColumn</name>
|
<name>displayRightColumn</name><title>Right column blocks</title><description>This hook displays new elements in the right-hand column</description>
|
||||||
<title>Right column blocks</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayLeftColumn" live_edit="1">
|
<hook id="displayLeftColumn" live_edit="1">
|
||||||
<name>displayLeftColumn</name>
|
<name>displayLeftColumn</name><title>Left column blocks</title><description>This hook displays new elements in the left-hand column</description>
|
||||||
<title>Left column blocks</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayHome" live_edit="1">
|
<hook id="displayHome" live_edit="1">
|
||||||
<name>displayHome</name>
|
<name>displayHome</name><title>Homepage content</title><description>This hook displays new elements on the homepage</description>
|
||||||
<title>Homepage content</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayHeader" live_edit="0">
|
<hook id="displayHeader" live_edit="0">
|
||||||
<name>displayHeader</name>
|
<name>displayHeader</name><title>Pages header</title><description>This hook displays additional elements in the header of your pages</description>
|
||||||
<title>Header of pages</title>
|
|
||||||
<description>A hook which allow you to do things in the header of each pages</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCartSave" live_edit="0">
|
<hook id="actionCartSave" live_edit="0">
|
||||||
<name>actionCartSave</name>
|
<name>actionCartSave</name><title>Cart creation and update</title><description>This hook is displayed when a product is added to the cart or if the cart's content is modified</description>
|
||||||
<title>Cart creation and update</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAuthentication" live_edit="0">
|
<hook id="actionAuthentication" live_edit="0">
|
||||||
<name>actionAuthentication</name>
|
<name>actionAuthentication</name><title>Successful customer authentication</title><description>This hook is displayed after a customer successfully signs in</description>
|
||||||
<title>Successful customer authentication</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductAdd" live_edit="0">
|
<hook id="actionProductAdd" live_edit="0">
|
||||||
<name>actionProductAdd</name>
|
<name>actionProductAdd</name><title>Product creation</title><description>This hook is displayed after a product is created</description>
|
||||||
<title>Product creation</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductUpdate" live_edit="0">
|
<hook id="actionProductUpdate" live_edit="0">
|
||||||
<name>actionProductUpdate</name>
|
<name>actionProductUpdate</name><title>Product update</title><description>This hook is displayed after a product has been updated</description>
|
||||||
<title>Product Update</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayTop" live_edit="0">
|
<hook id="displayTop" live_edit="0">
|
||||||
<name>displayTop</name>
|
<name>displayTop</name><title>Top of pages</title><description>This hook displays additional elements at the top of your pages</description>
|
||||||
<title>Top of pages</title>
|
|
||||||
<description>A hook which allow you to do things a the top of each pages.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayRightColumnProduct" live_edit="0">
|
<hook id="displayRightColumnProduct" live_edit="0">
|
||||||
<name>displayRightColumnProduct</name>
|
<name>displayRightColumnProduct</name><title>New elements on the product page (right column)</title><description>This hook displays new elements in the right-hand column of the product page</description>
|
||||||
<title>Extra actions on the product page (right column).</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductDelete" live_edit="0">
|
<hook id="actionProductDelete" live_edit="0">
|
||||||
<name>actionProductDelete</name>
|
<name>actionProductDelete</name><title>Product deletion</title><description>This hook is called when a product is deleted</description>
|
||||||
<title>Product deletion</title>
|
|
||||||
<description>This hook is called when a product is deleted</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFooterProduct" live_edit="1">
|
<hook id="displayFooterProduct" live_edit="1">
|
||||||
<name>displayFooterProduct</name>
|
<name>displayFooterProduct</name><title>Product footer</title><description>This hook adds new blocks under the product's description</description>
|
||||||
<title>Product footer</title>
|
|
||||||
<description>Add new blocks under the product description</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayInvoice" live_edit="0">
|
<hook id="displayInvoice" live_edit="0">
|
||||||
<name>displayInvoice</name>
|
<name>displayInvoice</name><title>Invoice</title><description>This hook displays new blocks on the invoice (order)</description>
|
||||||
<title>Invoice</title>
|
|
||||||
<description>Add blocks to invoice (order)</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionOrderStatusUpdate" live_edit="0">
|
<hook id="actionOrderStatusUpdate" live_edit="0">
|
||||||
<name>actionOrderStatusUpdate</name>
|
<name>actionOrderStatusUpdate</name><title>Order status update - Event</title><description>This hook launches modules when the status of an order changes.</description>
|
||||||
<title>Order's status update event</title>
|
|
||||||
<description>Launch modules when the order's status of an order change.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAdminOrder" live_edit="0">
|
<hook id="displayAdminOrder" live_edit="0">
|
||||||
<name>displayAdminOrder</name>
|
<name>displayAdminOrder</name><title>Display new elements in the Back Office, tab AdminOrder</title><description>This hook launches modules when the AdminOrder" tab is displayed in the Back Office"</description>
|
||||||
<title>Display in Back-Office, tab AdminOrder</title>
|
|
||||||
<description>Launch modules when the tab AdminOrder is displayed on back-office.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFooter" live_edit="0">
|
<hook id="displayFooter" live_edit="0">
|
||||||
<name>displayFooter</name>
|
<name>displayFooter</name><title>Footer</title><description>This hook displays new blocks in the footer</description>
|
||||||
<title>Footer</title>
|
|
||||||
<description>Add block in footer</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayPDFInvoice" live_edit="0">
|
<hook id="displayPDFInvoice" live_edit="0">
|
||||||
<name>displayPDFInvoice</name>
|
<name>displayPDFInvoice</name><title>PDF Invoice</title><description>This hook allows you to display additional information on PDF invoices</description>
|
||||||
<title>PDF Invoice</title>
|
|
||||||
<description>Allow the display of extra informations into the PDF invoice</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAdminCustomers" live_edit="0">
|
<hook id="displayAdminCustomers" live_edit="0">
|
||||||
<name>displayAdminCustomers</name>
|
<name>displayAdminCustomers</name><title>Display new elements in the Back Office, tab AdminCustomers</title><description>This hook launches modules when the AdminCustomers" tab is displayed in the Back Office"</description>
|
||||||
<title>Display in Back-Office, tab AdminCustomers</title>
|
|
||||||
<description>Launch modules when the tab AdminCustomers is displayed on back-office.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayOrderConfirmation" live_edit="0">
|
<hook id="displayOrderConfirmation" live_edit="0">
|
||||||
<name>displayOrderConfirmation</name>
|
<name>displayOrderConfirmation</name><title>Order confirmation page</title><description>This hook is called within an order's confirmation page</description>
|
||||||
<title>Order confirmation page</title>
|
|
||||||
<description>Called on order confirmation page</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCustomerAccountAdd" live_edit="0">
|
<hook id="actionCustomerAccountAdd" live_edit="0">
|
||||||
<name>actionCustomerAccountAdd</name>
|
<name>actionCustomerAccountAdd</name><title>Successful customer account creation</title><description>This hook is called when a new customer creates an account successfully</description>
|
||||||
<title>Successful customer create account</title>
|
|
||||||
<description>Called when new customer create account successfuled</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayCustomerAccount" live_edit="0">
|
<hook id="displayCustomerAccount" live_edit="0">
|
||||||
<name>displayCustomerAccount</name>
|
<name>displayCustomerAccount</name><title>Customer account displayed in Front Office</title><description>This hook displays new elements on the customer account page</description>
|
||||||
<title>Customer account page display in front office</title>
|
|
||||||
<description>Display on page account of the customer</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionOrderSlipAdd" live_edit="0">
|
<hook id="actionOrderSlipAdd" live_edit="0">
|
||||||
<name>actionOrderSlipAdd</name>
|
<name>actionOrderSlipAdd</name><title>Order slip creation</title><description>This hook is called when a product's quantity is modified</description>
|
||||||
<title>Called when a order slip is created</title>
|
|
||||||
<description>Called when a quantity of one product change in an order.</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayProductTab" live_edit="0">
|
<hook id="displayProductTab" live_edit="0">
|
||||||
<name>displayProductTab</name>
|
<name>displayProductTab</name><title>Tabs on product page</title><description>This hook is called on the product page's tab</description>
|
||||||
<title>Tabs on product page</title>
|
|
||||||
<description>Called on order product page tabs</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayProductTabContent" live_edit="0">
|
<hook id="displayProductTabContent" live_edit="0">
|
||||||
<name>displayProductTabContent</name>
|
<name>displayProductTabContent</name><title>Tabs content on the product page</title><description>This hook is called on the product page's tab</description>
|
||||||
<title>Content of tabs on product page</title>
|
|
||||||
<description>Called on order product page tabs</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayShoppingCartFooter" live_edit="0">
|
<hook id="displayShoppingCartFooter" live_edit="0">
|
||||||
<name>displayShoppingCartFooter</name>
|
<name>displayShoppingCartFooter</name><title>Shopping cart footer</title><description>This hook displays some specific information on the shopping cart's page</description>
|
||||||
<title>Shopping cart footer</title>
|
|
||||||
<description>Display some specific informations on the shopping cart page</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayCustomerAccountForm" live_edit="0">
|
<hook id="displayCustomerAccountForm" live_edit="0">
|
||||||
<name>displayCustomerAccountForm</name>
|
<name>displayCustomerAccountForm</name><title>Customer account creation form</title><description>This hook displays some information on the form to create a customer account</description>
|
||||||
<title>Customer account creation form</title>
|
|
||||||
<description>Display some information on the form to create a customer account</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAdminStatsModules" live_edit="0">
|
<hook id="displayAdminStatsModules" live_edit="0">
|
||||||
<name>displayAdminStatsModules</name>
|
<name>displayAdminStatsModules</name><title>Stats - Modules</title><description/>
|
||||||
<title>Stats - Modules</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAdminStatsGraphEngine" live_edit="0">
|
<hook id="displayAdminStatsGraphEngine" live_edit="0">
|
||||||
<name>displayAdminStatsGraphEngine</name>
|
<name>displayAdminStatsGraphEngine</name><title>Graph engines</title><description/>
|
||||||
<title>Graph Engines</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionOrderReturn" live_edit="0">
|
<hook id="actionOrderReturn" live_edit="0">
|
||||||
<name>actionOrderReturn</name>
|
<name>actionOrderReturn</name><title>Returned product</title><description>This hook is displayed when a customer returns a product </description>
|
||||||
<title>Product returned</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayProductButtons" live_edit="0">
|
<hook id="displayProductButtons" live_edit="0">
|
||||||
<name>displayProductButtons</name>
|
<name>displayProductButtons</name><title>Product page actions</title><description>This hook adds new action buttons on the product page</description>
|
||||||
<title>Product actions</title>
|
|
||||||
<description>Put new action buttons on product page</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBackOfficeHome" live_edit="0">
|
<hook id="displayBackOfficeHome" live_edit="0">
|
||||||
<name>displayBackOfficeHome</name>
|
<name>displayBackOfficeHome</name><title>Administration panel homepage</title><description>This hook is displayed on the admin panel's homepage</description>
|
||||||
<title>Administration panel homepage</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAdminStatsGridEngine" live_edit="0">
|
<hook id="displayAdminStatsGridEngine" live_edit="0">
|
||||||
<name>displayAdminStatsGridEngine</name>
|
<name>displayAdminStatsGridEngine</name><title>Grid engines</title><description/>
|
||||||
<title>Grid Engines</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionWatermark" live_edit="0">
|
<hook id="actionWatermark" live_edit="0">
|
||||||
<name>actionWatermark</name>
|
<name>actionWatermark</name><title>Watermark</title><description/>
|
||||||
<title>Watermark</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductCancel" live_edit="0">
|
<hook id="actionProductCancel" live_edit="0">
|
||||||
<name>actionProductCancel</name>
|
<name>actionProductCancel</name><title>Product cancelled</title><description>This hook is called when you cancel a product in an order</description>
|
||||||
<title>Product cancelled</title>
|
|
||||||
<description>This hook is called when you cancel a product in an order</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayLeftColumnProduct" live_edit="0">
|
<hook id="displayLeftColumnProduct" live_edit="0">
|
||||||
<name>displayLeftColumnProduct</name>
|
<name>displayLeftColumnProduct</name><title>New elements on the product page (left column)</title><description>This hook displays new elements in the left-hand column of the product page</description>
|
||||||
<title>Extra actions on the product page (left column).</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductOutOfStock" live_edit="0">
|
<hook id="actionProductOutOfStock" live_edit="0">
|
||||||
<name>actionProductOutOfStock</name>
|
<name>actionProductOutOfStock</name><title>Out-of-stock product</title><description>This hook displays new action buttons if a product is out of stock</description>
|
||||||
<title>Product out of stock</title>
|
|
||||||
<description>Make action while product is out of stock</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductAttributeUpdate" live_edit="0">
|
<hook id="actionProductAttributeUpdate" live_edit="0">
|
||||||
<name>actionProductAttributeUpdate</name>
|
<name>actionProductAttributeUpdate</name><title>Product attribute update</title><description>This hook is displayed when a product's attribute is updated</description>
|
||||||
<title>Product attribute update</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayCarrierList" live_edit="0">
|
<hook id="displayCarrierList" live_edit="0">
|
||||||
<name>displayCarrierList</name>
|
<name>displayCarrierList</name><title>Extra carrier (module mode)</title><description/>
|
||||||
<title>Extra carrier (module mode)</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayShoppingCart" live_edit="0">
|
<hook id="displayShoppingCart" live_edit="0">
|
||||||
<name>displayShoppingCart</name>
|
<name>displayShoppingCart</name><title>Shopping cart - Additional button</title><description>This hook displays new action buttons within the shopping cart</description>
|
||||||
<title>Shopping cart extra button</title>
|
|
||||||
<description>Display some specific informations</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionSearch" live_edit="0">
|
<hook id="actionSearch" live_edit="0">
|
||||||
<name>actionSearch</name>
|
<name>actionSearch</name><title>Search</title><description/>
|
||||||
<title>Search</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBeforePayment" live_edit="0">
|
<hook id="displayBeforePayment" live_edit="0">
|
||||||
<name>displayBeforePayment</name>
|
<name>displayBeforePayment</name><title>Redirect during the order process</title><description>This hook redirects the user to the module instead of displaying payment modules</description>
|
||||||
<title>Redirect in order process</title>
|
|
||||||
<description>Redirect user to the module instead of displaying payment modules</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCarrierUpdate" live_edit="0">
|
<hook id="actionCarrierUpdate" live_edit="0">
|
||||||
<name>actionCarrierUpdate</name>
|
<name>actionCarrierUpdate</name><title>Carrier Update</title><description>This hook is called when a carrier is updated</description>
|
||||||
<title>Carrier Update</title>
|
|
||||||
<description>This hook is called when a carrier is updated</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionOrderStatusPostUpdate" live_edit="0">
|
<hook id="actionOrderStatusPostUpdate" live_edit="0">
|
||||||
<name>actionOrderStatusPostUpdate</name>
|
<name>actionOrderStatusPostUpdate</name><title>Post update of order status</title><description/>
|
||||||
<title>Post update of order status</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayCustomerAccountFormTop" live_edit="0">
|
<hook id="displayCustomerAccountFormTop" live_edit="0">
|
||||||
<name>displayCustomerAccountFormTop</name>
|
<name>displayCustomerAccountFormTop</name><title>Block above the form for create an account</title><description>This hook is displayed above the customer's account creation form</description>
|
||||||
<title>Block above the form for create an account</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBackOfficeHeader" live_edit="0">
|
<hook id="displayBackOfficeHeader" live_edit="0">
|
||||||
<name>displayBackOfficeHeader</name>
|
<name>displayBackOfficeHeader</name><title>Administration panel header</title><description>This hook is displayed in the header of the admin panel</description>
|
||||||
<title>Administration panel header</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBackOfficeTop" live_edit="0">
|
<hook id="displayBackOfficeTop" live_edit="0">
|
||||||
<name>displayBackOfficeTop</name>
|
<name>displayBackOfficeTop</name><title>Administration panel hover the tabs</title><description>This hook is displayed on the roll hover of the tabs within the admin panel</description>
|
||||||
<title>Administration panel hover the tabs</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBackOfficeFooter" live_edit="0">
|
<hook id="displayBackOfficeFooter" live_edit="0">
|
||||||
<name>displayBackOfficeFooter</name>
|
<name>displayBackOfficeFooter</name><title>Administration panel footer</title><description>This hook is displayed within the admin panel's footer</description>
|
||||||
<title>Administration panel footer</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductAttributeDelete" live_edit="0">
|
<hook id="actionProductAttributeDelete" live_edit="0">
|
||||||
<name>actionProductAttributeDelete</name>
|
<name>actionProductAttributeDelete</name><title>Product attribute deletion</title><description>This hook is displayed when a product's attribute is deleted</description>
|
||||||
<title>Product Attribute Deletion</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCarrierProcess" live_edit="0">
|
<hook id="actionCarrierProcess" live_edit="0">
|
||||||
<name>actionCarrierProcess</name>
|
<name>actionCarrierProcess</name><title>Carrier process</title><description/>
|
||||||
<title>Carrier Process</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionOrderDetail" live_edit="0">
|
<hook id="actionOrderDetail" live_edit="0">
|
||||||
<name>actionOrderDetail</name>
|
<name>actionOrderDetail</name><title>Order detail</title><description>This hook is used to set the follow-up in Smarty when an order's detail is called</description>
|
||||||
<title>Order Detail</title>
|
|
||||||
<description>To set the follow-up in smarty when order detail is called</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayBeforeCarrier" live_edit="0">
|
<hook id="displayBeforeCarrier" live_edit="0">
|
||||||
<name>displayBeforeCarrier</name>
|
<name>displayBeforeCarrier</name><title>Before carriers list</title><description>This hook is displayed before the carrier list in Front Office</description>
|
||||||
<title>Before carrier list</title>
|
|
||||||
<description>This hook is display before the carrier list on Front office</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayOrderDetail" live_edit="0">
|
<hook id="displayOrderDetail" live_edit="0">
|
||||||
<name>displayOrderDetail</name>
|
<name>displayOrderDetail</name><title>Order detail</title><description>This hook is displayed within the order's details in Front Office</description>
|
||||||
<title>Order detail displayed</title>
|
|
||||||
<description>Displayed on order detail on front office</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionPaymentCCAdd" live_edit="0">
|
<hook id="actionPaymentCCAdd" live_edit="0">
|
||||||
<name>actionPaymentCCAdd</name>
|
<name>actionPaymentCCAdd</name><title>Payment CC added</title><description/>
|
||||||
<title>Payment CC added</title>
|
|
||||||
<description>Payment CC added</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayProductComparison" live_edit="0">
|
<hook id="displayProductComparison" live_edit="0">
|
||||||
<name>displayProductComparison</name>
|
<name>displayProductComparison</name><title>Extra product comparison</title><description/>
|
||||||
<title>Extra Product Comparison</title>
|
|
||||||
<description>Extra Product Comparison</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCategoryAdd" live_edit="0">
|
<hook id="actionCategoryAdd" live_edit="0">
|
||||||
<name>actionCategoryAdd</name>
|
<name>actionCategoryAdd</name><title>Category creation</title><description>This hook is displayed when a category is created</description>
|
||||||
<title>Category creation</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCategoryUpdate" live_edit="0">
|
<hook id="actionCategoryUpdate" live_edit="0">
|
||||||
<name>actionCategoryUpdate</name>
|
<name>actionCategoryUpdate</name><title>Category modification</title><description>This hook is displayed when a category is modified</description>
|
||||||
<title>Category modification</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionCategoryDelete" live_edit="0">
|
<hook id="actionCategoryDelete" live_edit="0">
|
||||||
<name>actionCategoryDelete</name>
|
<name>actionCategoryDelete</name><title>Category deletion</title><description>This hook is displayed when a category is deleted</description>
|
||||||
<title>Category removal</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionBeforeAuthentication" live_edit="0">
|
<hook id="actionBeforeAuthentication" live_edit="0">
|
||||||
<name>actionBeforeAuthentication</name>
|
<name>actionBeforeAuthentication</name><title>Before authentication</title><description>This hook is displayed before the customer's authentication</description>
|
||||||
<title>Before Authentication</title>
|
|
||||||
<description>Before authentication</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayPaymentTop" live_edit="0">
|
<hook id="displayPaymentTop" live_edit="0">
|
||||||
<name>displayPaymentTop</name>
|
<name>displayPaymentTop</name><title>Top of payment page</title><description>This hook is displayed at the top of the payment page</description>
|
||||||
<title>Top of payment page</title>
|
|
||||||
<description>Top of payment page</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionHtaccessCreate" live_edit="0">
|
<hook id="actionHtaccessCreate" live_edit="0">
|
||||||
<name>actionHtaccessCreate</name>
|
<name>actionHtaccessCreate</name><title>After htaccess creation</title><description>This hook is displayed after the htaccess creation</description>
|
||||||
<title>After htaccess creation</title>
|
|
||||||
<description>After htaccess creation</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAdminMetaSave" live_edit="0">
|
<hook id="actionAdminMetaSave" live_edit="0">
|
||||||
<name>actionAdminMetaSave</name>
|
<name>actionAdminMetaSave</name><title>After saving the configuration in AdminMeta</title><description>This hook is displayed after saving the configuration in AdminMeta</description>
|
||||||
<title>After save configuration in AdminMeta</title>
|
|
||||||
<description>After save configuration in AdminMeta</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAttributeGroupForm" live_edit="0">
|
<hook id="displayAttributeGroupForm" live_edit="0">
|
||||||
<name>displayAttributeGroupForm</name>
|
<name>displayAttributeGroupForm</name><title>Add fields to the form 'attribute group'</title><description>This hook adds fields to the form 'attribute group'</description>
|
||||||
<title>Add fields to the form "attribute group"</title>
|
|
||||||
<description>Add fields to the form "attribute group"</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAttributeGroupSave" live_edit="0">
|
<hook id="actionAttributeGroupSave" live_edit="0">
|
||||||
<name>actionAttributeGroupSave</name>
|
<name>actionAttributeGroupSave</name><title>Saving an attribute group</title><description>This hook is called while saving an attributes group</description>
|
||||||
<title>On saving attribute group</title>
|
|
||||||
<description>On saving attribute group</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAttributeGroupDelete" live_edit="0">
|
<hook id="actionAttributeGroupDelete" live_edit="0">
|
||||||
<name>actionAttributeGroupDelete</name>
|
<name>actionAttributeGroupDelete</name><title>Deleting attribute group</title><description>This hook is called while deleting an attributes group</description>
|
||||||
<title>On deleting attribute group</title>
|
|
||||||
<description>On deleting attribute group</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFeatureForm" live_edit="0">
|
<hook id="displayFeatureForm" live_edit="0">
|
||||||
<name>displayFeatureForm</name>
|
<name>displayFeatureForm</name><title>Add fields to the form 'feature'</title><description>This hook adds fields to the form 'feature'</description>
|
||||||
<title>Add fields to the form "feature"</title>
|
|
||||||
<description>Add fields to the form "feature"</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionFeatureSave" live_edit="0">
|
<hook id="actionFeatureSave" live_edit="0">
|
||||||
<name>actionFeatureSave</name>
|
<name>actionFeatureSave</name><title>Saving attributes' features</title><description>This hook is called while saving an attributes features</description>
|
||||||
<title>On saving attribute feature</title>
|
|
||||||
<description>On saving attribute feature</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionFeatureDelete" live_edit="0">
|
<hook id="actionFeatureDelete" live_edit="0">
|
||||||
<name>actionFeatureDelete</name>
|
<name>actionFeatureDelete</name><title>Deleting attributes' features</title><description>This hook is called while deleting an attributes features</description>
|
||||||
<title>On deleting attribute feature</title>
|
|
||||||
<description>On deleting attribute feature</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductSave" live_edit="0">
|
<hook id="actionProductSave" live_edit="0">
|
||||||
<name>actionProductSave</name>
|
<name>actionProductSave</name><title>Saving products</title><description>This hook is called while saving products</description>
|
||||||
<title>On saving products</title>
|
|
||||||
<description>On saving products</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionProductListOverride" live_edit="0">
|
<hook id="actionProductListOverride" live_edit="0">
|
||||||
<name>actionProductListOverride</name>
|
<name>actionProductListOverride</name><title>Assign a products list to a category</title><description>This hook assigns a products list to a category</description>
|
||||||
<title>Assign product list to a category</title>
|
|
||||||
<description>Assign product list to a category</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAttributeGroupPostProcess" live_edit="0">
|
<hook id="displayAttributeGroupPostProcess" live_edit="0">
|
||||||
<name>displayAttributeGroupPostProcess</name>
|
<name>displayAttributeGroupPostProcess</name><title>On post-process in admin attribute group</title><description>This hook is called on post-process in admin attribute group</description>
|
||||||
<title>On post-process in admin attribute group</title>
|
|
||||||
<description>On post-process in admin attribute group</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFeaturePostProcess" live_edit="0">
|
<hook id="displayFeaturePostProcess" live_edit="0">
|
||||||
<name>displayFeaturePostProcess</name>
|
<name>displayFeaturePostProcess</name><title>On post-process in admin feature</title><description>This hook is called on post-process in admin feature</description>
|
||||||
<title>On post-process in admin feature</title>
|
|
||||||
<description>On post-process in admin feature</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFeatureValueForm" live_edit="0">
|
<hook id="displayFeatureValueForm" live_edit="0">
|
||||||
<name>displayFeatureValueForm</name>
|
<name>displayFeatureValueForm</name><title>Add fields to the form 'feature value'</title><description>This hook adds fields to the form 'feature value'</description>
|
||||||
<title>Add fields to the form "feature value"</title>
|
|
||||||
<description>Add fields to the form "feature value"</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayFeatureValuePostProcess" live_edit="0">
|
<hook id="displayFeatureValuePostProcess" live_edit="0">
|
||||||
<name>displayFeatureValuePostProcess</name>
|
<name>displayFeatureValuePostProcess</name><title>On post-process in admin feature value</title><description>This hook is called on post-process in admin feature value</description>
|
||||||
<title>On post-process in admin feature value</title>
|
|
||||||
<description>On post-process in admin feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionFeatureValueDelete" live_edit="0">
|
<hook id="actionFeatureValueDelete" live_edit="0">
|
||||||
<name>actionFeatureValueDelete</name>
|
<name>actionFeatureValueDelete</name><title>Deleting attributes' features' values</title><description>This hook is called while deleting an attributes features value</description>
|
||||||
<title>On deleting attribute feature value</title>
|
|
||||||
<description>On deleting attribute feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionFeatureValueSave" live_edit="0">
|
<hook id="actionFeatureValueSave" live_edit="0">
|
||||||
<name>actionFeatureValueSave</name>
|
<name>actionFeatureValueSave</name><title>Saving an attributes features value</title><description>This hook is called while saving an attributes features value</description>
|
||||||
<title>On saving attribute feature value</title>
|
|
||||||
<description>On saving attribute feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayAttributeForm" live_edit="0">
|
<hook id="displayAttributeForm" live_edit="0">
|
||||||
<name>displayAttributeForm</name>
|
<name>displayAttributeForm</name><title>Add fields to the form 'attribute value'</title><description>This hook adds fields to the form 'attribute value'</description>
|
||||||
<title>Add fields to the form "attribute value"</title>
|
|
||||||
<description>Add fields to the form "attribute value"</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAttributePostProcess" live_edit="0">
|
<hook id="actionAttributePostProcess" live_edit="0">
|
||||||
<name>actionAttributePostProcess</name>
|
<name>actionAttributePostProcess</name><title>On post-process in admin feature value</title><description>This hook is called on post-process in admin feature value</description>
|
||||||
<title>On post-process in admin feature value</title>
|
|
||||||
<description>On post-process in admin feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAttributeDelete" live_edit="0">
|
<hook id="actionAttributeDelete" live_edit="0">
|
||||||
<name>actionAttributeDelete</name>
|
<name>actionAttributeDelete</name><title>Deleting an attributes features value</title><description>This hook is called while deleting an attributes features value</description>
|
||||||
<title>On deleting attribute feature value</title>
|
|
||||||
<description>On deleting attribute feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionAttributeSave" live_edit="0">
|
<hook id="actionAttributeSave" live_edit="0">
|
||||||
<name>actionAttributeSave</name>
|
<name>actionAttributeSave</name><title>Saving an attributes features value</title><description>This hook is called while saving an attributes features value</description>
|
||||||
<title>On saving attribute feature value</title>
|
|
||||||
<description>On saving attribute feature value</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="actionTaxManager" live_edit="0">
|
<hook id="actionTaxManager" live_edit="0">
|
||||||
<name>actionTaxManager</name>
|
<name>actionTaxManager</name><title>Tax Manager Factory</title><description/>
|
||||||
<title>Tax Manager Factory</title>
|
|
||||||
<description/>
|
|
||||||
</hook>
|
</hook>
|
||||||
<hook id="displayMyAccountBlock" live_edit="0">
|
<hook id="displayMyAccountBlock" live_edit="0">
|
||||||
<name>displayMyAccountBlock</name>
|
<name>displayMyAccountBlock</name><title>My account block</title><description>This hook displays extra information within the 'my account' block"</description>
|
||||||
<title>My account block</title>
|
|
||||||
<description>Display extra informations inside the "my account" block</description>
|
|
||||||
</hook>
|
</hook>
|
||||||
</entities>
|
</entities>
|
||||||
</entity_hook>
|
</entity_hook>
|
||||||
|
|||||||
@@ -43,31 +43,31 @@
|
|||||||
<field name="advanced_stock_management"/>
|
<field name="advanced_stock_management"/>
|
||||||
</fields>
|
</fields>
|
||||||
<entities>
|
<entities>
|
||||||
<product id="iPod_Nano" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="124.581940" wholesale_price="70.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0.5" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="iPod_Nano" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="124.581940" wholesale_price="70.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_1" supplier_reference="" width="0" height="0" depth="0" weight="0.5" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="iPod_shuffle" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="66.053500" wholesale_price="33.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="iPod_shuffle" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="66.053500" wholesale_price="33.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_2" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="MacBook_Air" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="Laptops" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="1504.180602" wholesale_price="1000.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="1.36" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="MacBook_Air" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="Laptops" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="1504.180602" wholesale_price="1000.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_3" supplier_reference="" width="0" height="0" depth="0" weight="1.36" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="MacBook" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="Laptops" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="1170.568561" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0.75" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="MacBook" id_supplier="AppleStore" id_manufacturer="Apple_Computer_Inc" id_category_default="Laptops" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="1170.568561" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_4" supplier_reference="" width="0" height="0" depth="0" weight="0.75" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="iPod_touch" id_supplier="" id_manufacturer="" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="241.638796" wholesale_price="200.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="iPod_touch" id_supplier="" id_manufacturer="" id_category_default="iPods" on_sale="0" online_only="0" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="241.638796" wholesale_price="200.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_5" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="Belkin_Leather_Folio_for_iPod_nano_-_Black_Chocolate" id_supplier="" id_manufacturer="" id_category_default="Accessories" on_sale="0" online_only="1" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="25.041806" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="Belkin_Leather_Folio_for_iPod_nano_-_Black_Chocolate" id_supplier="" id_manufacturer="" id_category_default="Accessories" on_sale="0" online_only="1" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="25.041806" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_6" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
<product id="Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone" id_supplier="Shure_Online_Store" id_manufacturer="Shure_Incorporated" id_category_default="Accessories" on_sale="0" online_only="1" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="124.581940" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
<product id="Shure_SE210_Sound-Isolating_Earphones_for_iPod_and_iPhone" id_supplier="Shure_Online_Store" id_manufacturer="Shure_Incorporated" id_category_default="Accessories" on_sale="0" online_only="1" ean13="0" upc="" ecotax="0.000000" quantity="0" minimal_quantity="1" price="124.581940" wholesale_price="0.000000" unit_price_ratio="0.000000" additional_shipping_cost="0.00" reference="demo_7" supplier_reference="" width="0" height="0" depth="0" weight="0" out_of_stock="2" quantity_discount="0" customizable="0" uploadable_files="0" text_fields="0" active="1" redirect_type="" id_product_redirected="0" available_for_order="1" available_date="0000-00-00" condition="new" show_price="1" indexed="0" cache_is_pack="0" cache_has_attachments="0" is_virtual="0" cache_default_attribute="0" advanced_stock_management="0">
|
||||||
<unity/>
|
<unity/>
|
||||||
<location/>
|
<location/>
|
||||||
</product>
|
</product>
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ require_once(_PS_INSTALL_PATH_.'classes/simplexml.php');
|
|||||||
if (!@ini_get('date.timezone'))
|
if (!@ini_get('date.timezone'))
|
||||||
@date_default_timezone_set('UTC');
|
@date_default_timezone_set('UTC');
|
||||||
|
|
||||||
|
// Some hosting still have magic_quotes_runtime configured
|
||||||
|
ini_set('magic_quotes_runtime', 0);
|
||||||
|
|
||||||
// Try to improve memory limit if it's under 32M
|
// Try to improve memory limit if it's under 32M
|
||||||
if (psinstall_get_memory_limit() < psinstall_get_octets('32M'))
|
if (psinstall_get_memory_limit() < psinstall_get_octets('32M'))
|
||||||
ini_set('memory_limit', '32M');
|
ini_set('memory_limit', '32M');
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ return array(
|
|||||||
'Official forum' => 'Fórum oficial',
|
'Official forum' => 'Fórum oficial',
|
||||||
'Support' => 'Suporte',
|
'Support' => 'Suporte',
|
||||||
'Documentation' => 'Documentação',
|
'Documentation' => 'Documentação',
|
||||||
'Contact us!' => 'Entre em Contato !',
|
'Contact us' => 'Entre em Contato',
|
||||||
'Forum' => 'Fórum',
|
'Forum' => 'Fórum',
|
||||||
'Blog' => 'Blog',
|
'Blog' => 'Blog',
|
||||||
'Done!' => 'Feito !',
|
'Done!' => 'Feito !',
|
||||||
@@ -153,8 +153,8 @@ return array(
|
|||||||
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Se você precisar de ajuda, não deixe de visitar <a href="%1$s" target="_blank">nossa documentação</a> ou contatar nossa equipe de suporte : %2$s',
|
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Se você precisar de ajuda, não deixe de visitar <a href="%1$s" target="_blank">nossa documentação</a> ou contatar nossa equipe de suporte : %2$s',
|
||||||
'Choose the installer language:' => 'Escolha a língua para instalação :',
|
'Choose the installer language:' => 'Escolha a língua para instalação :',
|
||||||
'Did you know?' => 'Você sabia ?',
|
'Did you know?' => 'Você sabia ?',
|
||||||
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e sua comunidade oferece mais de 40 diferentes idiomas de graça, acessível diretamente a partir da sua Área Administrativa na aba localização.',
|
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e sua comunidade oferece mais de %d diferentes idiomas de graça, acessível diretamente a partir da sua Área Administrativa na aba localização.',
|
||||||
'Licenses Agreement' => 'Acordo de licenças',
|
'License Agreements' => 'Acordo de licença',
|
||||||
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'O núcleo PrestaShop é publicado sob a OSL 3.0 enquanto os módulos e temas são publicados sob a AFL 3.0.',
|
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'O núcleo PrestaShop é publicado sob a OSL 3.0 enquanto os módulos e temas são publicados sob a AFL 3.0.',
|
||||||
'I agree to the above terms and conditions.' => 'Eu concordo com os termos e condições acima.',
|
'I agree to the above terms and conditions.' => 'Eu concordo com os termos e condições acima.',
|
||||||
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Eu concordo em participar na melhoria da solução enviando informações anônimas sobre a minha configuração.',
|
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Eu concordo em participar na melhoria da solução enviando informações anônimas sobre a minha configuração.',
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
'Official forum' => 'Offizielles Forum',
|
'Official forum' => 'Offizielles Forum',
|
||||||
'Support' => 'Support',
|
'Support' => 'Support',
|
||||||
'Documentation' => 'Tutotrials',
|
'Documentation' => 'Tutotrials',
|
||||||
'Contact us!' => 'Kontaktieren Sie uns! Persönlicher Support',
|
'Contact us' => 'Kontaktieren Sie uns',
|
||||||
'Forum' => 'Forum',
|
'Forum' => 'Forum',
|
||||||
'Blog' => 'Blog',
|
'Blog' => 'Blog',
|
||||||
'Done!' => 'Erfolgreich abgeschlossen',
|
'Done!' => 'Erfolgreich abgeschlossen',
|
||||||
@@ -146,8 +146,8 @@
|
|||||||
'The installation process should take only few minutes!' => 'Der Installationsprozess dauert nur ein paar Minuten!',
|
'The installation process should take only few minutes!' => 'Der Installationsprozess dauert nur ein paar Minuten!',
|
||||||
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Falls Sie Hilfe benötigen, haben Sie folgende Möglichkeiten: <a href="%1$s" target="_blank">unsere Dokumentation einsehen</a>oder unser Support-Team zu kontaktieren: %2$s',
|
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Falls Sie Hilfe benötigen, haben Sie folgende Möglichkeiten: <a href="%1$s" target="_blank">unsere Dokumentation einsehen</a>oder unser Support-Team zu kontaktieren: %2$s',
|
||||||
'Did you know?' => 'Wussten Sie schon?',
|
'Did you know?' => 'Wussten Sie schon?',
|
||||||
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop und Community bietet Ihnen den kostenlosen Zugang zu über 40 verschiedenen Sprachen direkt aus Ihrem Back-office im Tabreiter "Tools"',
|
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop und Community bietet Ihnen den kostenlosen Zugang zu über %d verschiedenen Sprachen direkt aus Ihrem Back-office im Tabreiter "Tools"',
|
||||||
'Licenses Agreement' => 'Lizenzvertrag',
|
'License Agreements' => 'Lizenzvertrag',
|
||||||
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'PrestaShop core is unter der Lizenz OSL 3.0 herausgegeben. PrestaShop modules und Themes werden unter der Lizenz AFL 3.0. herausgegeben',
|
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'PrestaShop core is unter der Lizenz OSL 3.0 herausgegeben. PrestaShop modules und Themes werden unter der Lizenz AFL 3.0. herausgegeben',
|
||||||
'I agree to the above terms and conditions.' => 'Ich stimme den oben genannten Vertragsbedingungen zu.',
|
'I agree to the above terms and conditions.' => 'Ich stimme den oben genannten Vertragsbedingungen zu.',
|
||||||
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Ich möchte Prestashop in der verbesserung von Fehlern helfen, und stimme zu, dass bei groben Fehlern meine Konfigurationsdaten an Prestashop gesandt werden',
|
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Ich möchte Prestashop in der verbesserung von Fehlern helfen, und stimme zu, dass bei groben Fehlern meine Konfigurationsdaten an Prestashop gesandt werden',
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
'Official forum' => NULL,
|
'Official forum' => NULL,
|
||||||
'Support' => NULL,
|
'Support' => NULL,
|
||||||
'Documentation' => NULL,
|
'Documentation' => NULL,
|
||||||
'Contact us!' => '¡Contacte con nosotros!',
|
'Contact us' => 'Contacte con nosotros',
|
||||||
'Forum' => NULL,
|
'Forum' => NULL,
|
||||||
'Blog' => 'El blog',
|
'Blog' => 'El blog',
|
||||||
'Done!' => NULL,
|
'Done!' => NULL,
|
||||||
@@ -146,8 +146,8 @@
|
|||||||
'The installation process should take only few minutes!' => 'El proceso de instalación tardará solo unos minutos.',
|
'The installation process should take only few minutes!' => 'El proceso de instalación tardará solo unos minutos.',
|
||||||
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => NULL,
|
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => NULL,
|
||||||
'Did you know?' => '¿Sabía que?',
|
'Did you know?' => '¿Sabía que?',
|
||||||
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => NULL,
|
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => NULL,
|
||||||
'Licenses Agreement' => 'Contrato de Licencia',
|
'License Agreements' => 'Contrato de Licencia',
|
||||||
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => NULL,
|
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => NULL,
|
||||||
'I agree to the above terms and conditions.' => 'Estoy de acuerdo con los términos y condiciones.',
|
'I agree to the above terms and conditions.' => 'Estoy de acuerdo con los términos y condiciones.',
|
||||||
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => NULL,
|
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => NULL,
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ return array(
|
|||||||
'Official forum' => 'Forum officiel',
|
'Official forum' => 'Forum officiel',
|
||||||
'Support' => 'Support',
|
'Support' => 'Support',
|
||||||
'Documentation' => 'Documentation',
|
'Documentation' => 'Documentation',
|
||||||
'Contact us!' => 'Nous contacter !',
|
'Contact us' => 'Nous contacter',
|
||||||
'Forum' => 'Forum',
|
'Forum' => 'Forum',
|
||||||
'Blog' => 'Blog',
|
'Blog' => 'Blog',
|
||||||
'Done!' => 'Fin !',
|
'Done!' => 'Fin !',
|
||||||
@@ -153,8 +153,8 @@ return array(
|
|||||||
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Si vous avez besoin d\'aide, n\'hésitez pas à visiter <a href="%1$s" target="_blank">notre documentation</a> ou à contacter notre équipe de support : %2$s',
|
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Si vous avez besoin d\'aide, n\'hésitez pas à visiter <a href="%1$s" target="_blank">notre documentation</a> ou à contacter notre équipe de support : %2$s',
|
||||||
'Choose the installer language:' => 'Choisissez la langue pour l\'installation :',
|
'Choose the installer language:' => 'Choisissez la langue pour l\'installation :',
|
||||||
'Did you know?' => 'Le saviez vous ?',
|
'Did you know?' => 'Le saviez vous ?',
|
||||||
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop et sa communauté vous proposent plus de 40 langues gratuites directement accessibles depuis votre administration',
|
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop et sa communauté vous proposent gratuitement des traductions dans %d langues directement accessibles depuis votre administration.',
|
||||||
'Licenses Agreement' => 'Contrat de licences',
|
'License Agreements' => 'Contrats de licence',
|
||||||
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Le cœur de PrestaShop est publié sous licence OSL 3.0 tandis que les modules et thèmes sont publiés sous licence AFL 3.0.',
|
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Le cœur de PrestaShop est publié sous licence OSL 3.0 tandis que les modules et thèmes sont publiés sous licence AFL 3.0.',
|
||||||
'I agree to the above terms and conditions.' => 'J\'approuve les termes et conditions du contrat ci-dessus.',
|
'I agree to the above terms and conditions.' => 'J\'approuve les termes et conditions du contrat ci-dessus.',
|
||||||
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'J\'accepte de participer à l\'amélioration de la solution en envoyant des informations anonymes sur ma configuration',
|
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'J\'accepte de participer à l\'amélioration de la solution en envoyant des informations anonymes sur ma configuration',
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
'Official forum' => 'Forum ufficiale',
|
'Official forum' => 'Forum ufficiale',
|
||||||
'Support' => 'Supporto',
|
'Support' => 'Supporto',
|
||||||
'Documentation' => 'Documentazione',
|
'Documentation' => 'Documentazione',
|
||||||
'Contact us!' => 'Contattaci!',
|
'Contact us' => 'Contattaci',
|
||||||
'Forum' => 'Forum',
|
'Forum' => 'Forum',
|
||||||
'Blog' => 'Il blog',
|
'Blog' => 'Il blog',
|
||||||
'Done!' => 'Fatto!',
|
'Done!' => 'Fatto!',
|
||||||
@@ -146,8 +146,8 @@
|
|||||||
'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!',
|
'The installation process should take only few minutes!' => 'Il processo di installazione dovrebbe durare solo pochi minuti!',
|
||||||
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Se hai bisogno di aiuto non asitare a guardare <a href="%1$s" target="_blank">our documentation</a> o contattare il nostro supporto: %2$s',
|
'If you need help, do not hesitate to check <a href="%1$s" target="_blank">our documentation</a> or to contact our support team: %2$s' => 'Se hai bisogno di aiuto non asitare a guardare <a href="%1$s" target="_blank">our documentation</a> o contattare il nostro supporto: %2$s',
|
||||||
'Did you know?' => 'Lo sapevi?',
|
'Did you know?' => 'Lo sapevi?',
|
||||||
'PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e la sua comunità offre 40 diverse lingue gratuite, direttamente accessibile nel tuo back office nel tab Traduzioni',
|
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => 'PrestaShop e la sua comunità offre %d diverse lingue gratuite, direttamente accessibile nel tuo back office nel tab Traduzioni',
|
||||||
'Licenses Agreement' => 'Contratto di Licenza',
|
'License Agreements' => 'Contratto di Licenza',
|
||||||
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Il core di PrestaShop è rilasicata sollo licenza OSL 3.0 mentre i moduli e i temi prestashop sono rilasciati sotto licenza AFL 3.0',
|
'PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.' => 'Il core di PrestaShop è rilasicata sollo licenza OSL 3.0 mentre i moduli e i temi prestashop sono rilasciati sotto licenza AFL 3.0',
|
||||||
'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni del contratto seguente.',
|
'I agree to the above terms and conditions.' => 'Accetto i termini e le condizioni del contratto seguente.',
|
||||||
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di partecipare nell\'implementare la soluzione inviando informazioni anonime sulla mia configurazione',
|
'I agree to participate in improving the solution by sending anonymous information about my configuration.' => 'Accetto di partecipare nell\'implementare la soluzione inviando informazioni anonime sulla mia configurazione',
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ class InstallModelDatabase extends InstallAbstractModel
|
|||||||
// Check if a table with same prefix already exists
|
// Check if a table with same prefix already exists
|
||||||
if (!$clear && Db::hasTableWithSamePrefix($server, $login, $password, $database, $prefix))
|
if (!$clear && Db::hasTableWithSamePrefix($server, $login, $password, $database, $prefix))
|
||||||
$errors[] = $this->language->l('At least one table with same prefix was already found, please change your prefix or drop your database');
|
$errors[] = $this->language->l('At least one table with same prefix was already found, please change your prefix or drop your database');
|
||||||
|
if (($create_error = Db::checkCreatePrivilege($server, $login, $password, $database, $prefix, $engine)) !== true)
|
||||||
|
{
|
||||||
|
$errors[] = $this->language->l(sprintf('Your database login don\'t have the privileges to create table on the database "%s". Ask your hosting provider:', $database));
|
||||||
|
if ($create_error != false)
|
||||||
|
$errors[] = $create_error;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -22,4 +22,9 @@ $(document).ready(function()
|
|||||||
else
|
else
|
||||||
$('#btNext').addClass('disabled').attr('disabled', true);
|
$('#btNext').addClass('disabled').attr('disabled', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if ($('#set_license').prop('checked'))
|
||||||
|
$('#btNext').removeClass('disabled').attr('disabled', false);
|
||||||
|
else
|
||||||
|
$('#btNext').addClass('disabled').attr('disabled', true);
|
||||||
});
|
});
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<li><a href="http://www.prestashop.com" title="PrestaShop.com" target="_blank">PrestaShop.com</a> | </li>
|
<li><a href="http://www.prestashop.com" title="PrestaShop.com" target="_blank">PrestaShop.com</a> | </li>
|
||||||
<li><a href="<?php echo $this->getSupportLink() ?>" title="<?php echo $this->l('Support'); ?>" target="_blank"><?php echo $this->l('Support'); ?></a> | </li>
|
<li><a href="<?php echo $this->getSupportLink() ?>" title="<?php echo $this->l('Support'); ?>" target="_blank"><?php echo $this->l('Support'); ?></a> | </li>
|
||||||
<li><a href="<?php echo $this->getDocumentationLink() ?>" title="<?php echo $this->l('Documentation'); ?>" target="_blank"><?php echo $this->l('Documentation'); ?></a> | </li>
|
<li><a href="<?php echo $this->getDocumentationLink() ?>" title="<?php echo $this->l('Documentation'); ?>" target="_blank"><?php echo $this->l('Documentation'); ?></a> | </li>
|
||||||
<li><a href="http://www.prestashop.com/contact.php" title="<?php echo $this->l('Contact us!'); ?>" target="_blank"><?php echo $this->l('Contact us!'); ?></a> | </li>
|
<li><a href="http://www.prestashop.com/contact.php" title="<?php echo $this->l('Contact us'); ?>" target="_blank"><?php echo $this->l('Contact us'); ?></a> | </li>
|
||||||
<li>© 2005-<?php echo date('Y'); ?></li>
|
<li>© 2005-<?php echo date('Y'); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<div id="sheets" class="sheet shown">
|
<div id="sheets" class="sheet shown">
|
||||||
<div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix">
|
<div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix">
|
||||||
<div class="contentTitle">
|
<div class="contentTitle">
|
||||||
<h1><?php echo $this->l('menu_'.$this->step) ?></h1>
|
<h1><?php echo $this->l('Installation wizard') ?></h1>
|
||||||
|
|
||||||
<ul id="stepList_1" class="stepList clearfix">
|
<ul id="stepList_1" class="stepList clearfix">
|
||||||
<?php foreach ($this->getSteps() as $step): ?>
|
<?php foreach ($this->getSteps() as $step): ?>
|
||||||
|
|||||||
@@ -39,12 +39,12 @@
|
|||||||
|
|
||||||
<!-- Did you know -->
|
<!-- Did you know -->
|
||||||
<h3 class="no-margin"><?php echo $this->l('Did you know?'); ?></h3>
|
<h3 class="no-margin"><?php echo $this->l('Did you know?'); ?></h3>
|
||||||
<p><?php echo $this->l('PrestaShop and its community offers over 40 different languages for free, directly accessible from your Back Office on the Localization tab.'); ?> </p>
|
<p><?php echo $this->l('PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.', 56); ?> </p>
|
||||||
|
|
||||||
<!-- License agreement -->
|
<!-- License agreement -->
|
||||||
<h2 id="licenses-agreement"><?php echo $this->l('Licenses Agreement') ?></h2>
|
<h2 id="licenses-agreement"><?php echo $this->l('License Agreements') ?></h2>
|
||||||
|
<p><strong><?php echo $this->l('PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.') ?></strong></p>
|
||||||
<div style="height:200px; border:1px solid #ccc; margin-bottom:8px; padding:5px; background:#fff; overflow: auto; overflow-x:hidden; overflow-y:scroll;">
|
<div style="height:200px; border:1px solid #ccc; margin-bottom:8px; padding:5px; background:#fff; overflow: auto; overflow-x:hidden; overflow-y:scroll;">
|
||||||
<p><strong><?php echo $this->l('PrestaShop core is released under the OSL 3.0 while PrestaShop modules and themes are released under the AFL 3.0.') ?></strong></p>
|
|
||||||
<h3>Core: Open Software License ("OSL") v. 3.0</h3>
|
<h3>Core: Open Software License ("OSL") v. 3.0</h3>
|
||||||
<p>This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:</p>
|
<p>This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:</p>
|
||||||
<h4>Licensed under the Open Software License version 3.0</h4>
|
<h4>Licensed under the Open Software License version 3.0</h4>
|
||||||
@@ -100,16 +100,12 @@
|
|||||||
<p><strong>16. Modification of This License.</strong> This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.</p>
|
<p><strong>16. Modification of This License.</strong> This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
<label>
|
<label><input type="checkbox" id="set_license" class="required" name="licence_agrement" value="1" style="vertical-align: middle;float:left" <?php if ($this->session->licence_agrement): ?>checked="checked"<?php endif; ?> />
|
||||||
<input type="checkbox" id="set_license" class="required" name="licence_agrement" value="1" style="vertical-align: middle;" <?php if ($this->session->licence_agrement): ?>checked="checked"<?php endif; ?> />
|
<div style="float:left;width:600px;margin-left:8px"><strong><?php echo $this->l('I agree to the above terms and conditions.') ?></strong></div></label>
|
||||||
<strong><?php echo $this->l('I agree to the above terms and conditions.') ?></strong>
|
|
||||||
</label>
|
|
||||||
<br />
|
<br />
|
||||||
<label>
|
<label><input type="checkbox" name="configuration_agrement" value="1" style="vertical-align: middle;float:left" <?php if ($this->session->configuration_agrement): ?>checked="checked"<?php endif; ?> />
|
||||||
<input type="checkbox" name="configuration_agrement" value="1" style="vertical-align: middle;" <?php if ($this->session->configuration_agrement): ?>checked="checked"<?php endif; ?> />
|
<div style="float:left;width:600px;margin-left:8px"><strong><?php echo $this->l('I agree to participate in improving the solution by sending anonymous information about my configuration.') ?></strong></div></label>
|
||||||
<strong><?php echo $this->l('I agree to participate in improving the solution by sending anonymous information about my configuration.') ?></strong>
|
</div>
|
||||||
</label>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php $this->displayTemplate('footer') ?>
|
<?php $this->displayTemplate('footer') ?>
|
||||||
@@ -10,6 +10,16 @@ UPDATE `PREFIX_customer` c, `PREFIX_orders` o SET c.id_lang = o.id_lang WHERE c.
|
|||||||
|
|
||||||
UPDATE `PREFIX_quick_access` SET `link` = 'index.php?controller=AdminCartRules&addcart_rule' WHERE `link` = 'index.php?tab=AdminDiscounts&adddiscount';
|
UPDATE `PREFIX_quick_access` SET `link` = 'index.php?controller=AdminCartRules&addcart_rule' WHERE `link` = 'index.php?tab=AdminDiscounts&adddiscount';
|
||||||
|
|
||||||
|
ALTER TABLE `PREFIX_order_cart_rule` ADD `free_shipping` BOOLEAN NOT NULL DEFAULT FALSE AFTER `value_tax_excl`;
|
||||||
|
|
||||||
|
UPDATE `PREFIX_order_cart_rule` ocr, `PREFIX_cart_rule` cr SET ocr.free_shipping = 1 WHERE ocr.id_cart_rule = cr.id_cart_rule AND cr.free_shipping = 1;
|
||||||
|
|
||||||
|
UPDATE `PREFIX_orders` o, `PREFIX_order_cart_rule` ocr SET
|
||||||
|
o.`total_discounts` = o.total_discounts + o.`total_shipping_tax_incl`,
|
||||||
|
o.`total_discounts_tax_incl` = o.`total_discounts_tax_incl` + o.`total_shipping_tax_incl`,
|
||||||
|
o.`total_discounts_tax_excl` = o.`total_discounts_tax_excl` + o.`total_shipping_tax_excl`
|
||||||
|
WHERE o.id_order = ocr.id_order AND ocr.free_shipping = 1;
|
||||||
|
|
||||||
CREATE TABLE `PREFIX_tab_module_preference` (
|
CREATE TABLE `PREFIX_tab_module_preference` (
|
||||||
`id_tab_module_preference` int(11) NOT NULL auto_increment,
|
`id_tab_module_preference` int(11) NOT NULL auto_increment,
|
||||||
`id_employee` int(11) NOT NULL,
|
`id_employee` int(11) NOT NULL,
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ $(document).ready(function() {
|
|||||||
$('a').each(function() {
|
$('a').each(function() {
|
||||||
var href = this.href;
|
var href = this.href;
|
||||||
var search = this.search;
|
var search = this.search;
|
||||||
var hrefAdd = 'live_edit&liveToken=' + get('liveToken') + '&ad=' + get('ad') + '&id_shop=' + get('id_shop');
|
var hrefAdd = 'live_edit&liveToken=' + get('liveToken') + '&ad=' + get('ad') + '&id_shop=' + get('id_shop') + '&id_employee=' + get('id_employee');
|
||||||
if (href != undefined && href != '#' && href.substr(0, baseDir.length) == baseDir)
|
if (href != undefined && href != '#' && href.substr(0, baseDir.length) == baseDir)
|
||||||
{
|
{
|
||||||
if (search.length == 0)
|
if (search.length == 0)
|
||||||
|
|||||||
@@ -183,7 +183,8 @@ class LoyaltyDefaultModuleFrontController extends ModuleFrontController
|
|||||||
'page' => ((int)Tools::getValue('p') > 0 ? (int)Tools::getValue('p') : 1),
|
'page' => ((int)Tools::getValue('p') > 0 ? (int)Tools::getValue('p') : 1),
|
||||||
'nbpagination' => ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10),
|
'nbpagination' => ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10),
|
||||||
'nArray' => array(10, 20, 50),
|
'nArray' => array(10, 20, 50),
|
||||||
'max_page' => floor(count($orders) / ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10))
|
'max_page' => floor(count($orders) / ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10)),
|
||||||
|
'pagination_link' => $this->getSummaryPaginationLink(array(), $this->context->smarty)
|
||||||
));
|
));
|
||||||
|
|
||||||
/* Discounts */
|
/* Discounts */
|
||||||
|
|||||||
@@ -123,7 +123,8 @@ class StatsForecast extends Module
|
|||||||
$dataTable[$row['fix_date']] = $row;
|
$dataTable[$row['fix_date']] = $row;
|
||||||
|
|
||||||
$this->_html .= '<div>
|
$this->_html .= '<div>
|
||||||
<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>
|
<div class="blocStats">
|
||||||
|
<h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>
|
||||||
<p>'.$this->l('All amounts are without taxes.').'</p>
|
<p>'.$this->l('All amounts are without taxes.').'</p>
|
||||||
<form id="granularity" action="'.Tools::safeOutput($ru).'#granularity" method="post">
|
<form id="granularity" action="'.Tools::safeOutput($ru).'#granularity" method="post">
|
||||||
<input type="hidden" name="submitGranularity" value="1" />
|
<input type="hidden" name="submitGranularity" value="1" />
|
||||||
@@ -300,30 +301,28 @@ class StatsForecast extends Module
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<div class="blocConversion">
|
|
||||||
<span style="float:left;text-align:center;margin-right:10px; width:100px;">'.$this->l('Registered visitors').'</span>
|
|
||||||
<span style="float:left;text-align:center;margin-right:10px">
|
|
||||||
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $customers), 2).' % <img src="../modules/'.$this->name.'/next.png">
|
|
||||||
</span>
|
|
||||||
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('orders').'</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="separation"></div>
|
|
||||||
|
|
||||||
<div class="blocConversion">
|
<div class="blocConversion">
|
||||||
<span style="float:left;text-align:center;margin-right:10px; width:100px;">'.$this->l('Visitors').'</span>
|
<span style="float:left;text-align:center;margin-right:10px; width:100px;">'.$this->l('Registered visitors').'</span>
|
||||||
<span style="float:left;text-align:center;margin-right:10px">
|
<span style="float:left;text-align:center;margin-right:10px">
|
||||||
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $visitors), 2).' % <img src="../modules/'.$this->name.'/next.png">
|
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $customers), 2).' % <img src="../modules/'.$this->name.'/next.png">
|
||||||
</span>
|
</span>
|
||||||
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('orders').'</span>
|
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('orders').'</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="separation"></div>
|
<div class="separation"></div>
|
||||||
<p>
|
<div class="blocConversion">
|
||||||
'.$this->l('Turn your visitors into money:').'
|
<span style="float:left;text-align:center;margin-right:10px; width:100px;">'.$this->l('Visitors').'</span>
|
||||||
<br />'.$this->l('Each visitor yields').' <b style="color:#000;">'.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'.</b>
|
<span style="float:left;text-align:center;margin-right:10px">
|
||||||
<br />'.$this->l('Each registered visitor yields').' <b style="color:#000;">'.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'</b>.
|
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $visitors), 2).' % <img src="../modules/'.$this->name.'/next.png">
|
||||||
</p></div>';
|
</span>
|
||||||
|
<span style="float:left;text-align:center;margin-right:10px">'.$this->l('orders').'</span>
|
||||||
|
</div>
|
||||||
|
<div class="separation"></div>
|
||||||
|
<p>
|
||||||
|
'.$this->l('Turn your visitors into money:').'
|
||||||
|
<br />'.$this->l('Each visitor yields').' <b style="color:#000;">'.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'.</b>
|
||||||
|
<br />'.$this->l('Each registered visitor yields').' <b style="color:#000;">'.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'</b>.
|
||||||
|
</p>
|
||||||
|
</div>';
|
||||||
|
|
||||||
$from = strtotime($employee->stats_date_from.' 00:00:00');
|
$from = strtotime($employee->stats_date_from.' 00:00:00');
|
||||||
$to = strtotime($employee->stats_date_to.' 23:59:59');
|
$to = strtotime($employee->stats_date_to.' 23:59:59');
|
||||||
@@ -332,7 +331,10 @@ class StatsForecast extends Module
|
|||||||
|
|
||||||
$this->_html .= '
|
$this->_html .= '
|
||||||
<br />';
|
<br />';
|
||||||
$this->_html .= '<div class="blocStats"><h2 class="icon-payment"><span></span>'.$this->l('Payment distribution').'</h2>
|
$this->_html .= '
|
||||||
|
<div class="blocStats">
|
||||||
|
<h2 class="icon-payment"><span></span>'.$this->l('Payment distribution').'</h2>
|
||||||
|
<p>'.$this->l('The amounts are <b>with</b> taxes, so you can get an estimation of the commission due to the payment method.').'</p>
|
||||||
<form id="cat" action="'.$ru.'#payment" method="post" >
|
<form id="cat" action="'.$ru.'#payment" method="post" >
|
||||||
<input type="hidden" name="submitIdZone" value="1" />
|
<input type="hidden" name="submitIdZone" value="1" />
|
||||||
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
|
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
|
||||||
@@ -490,7 +492,7 @@ class StatsForecast extends Module
|
|||||||
WHERE l.active = 1';
|
WHERE l.active = 1';
|
||||||
$languages = Db::getInstance()->executeS($sql);
|
$languages = Db::getInstance()->executeS($sql);
|
||||||
foreach ($languages as $language)
|
foreach ($languages as $language)
|
||||||
$langValues .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_products / o.conversion_rate, 0)) as '.pSQL($language['iso_code']).',';
|
$langValues .= 'SUM(IF(o.id_lang = '.(int)$language['id_lang'].', total_paid_tax_excl / o.conversion_rate, 0)) as '.pSQL($language['iso_code']).',';
|
||||||
$langValues = rtrim($langValues, ',');
|
$langValues = rtrim($langValues, ',');
|
||||||
|
|
||||||
if ($langValues)
|
if ($langValues)
|
||||||
@@ -516,18 +518,18 @@ class StatsForecast extends Module
|
|||||||
$ca['langprev'] = array();
|
$ca['langprev'] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'SELECT module, SUM(total_products / o.conversion_rate) as total, COUNT(*) as nb, AVG(total_products / o.conversion_rate) as cart
|
$sql = 'SELECT module, SUM(total_paid_tax_incl / o.conversion_rate) as total, COUNT(*) as nb, AVG(total_paid_tax_incl / o.conversion_rate) as cart
|
||||||
FROM `'._DB_PREFIX_.'orders` o
|
FROM `'._DB_PREFIX_.'orders` o
|
||||||
'.$join.'
|
'.$join.'
|
||||||
WHERE o.valid = 1
|
WHERE o.valid = 1
|
||||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||||
'.$where.'
|
'.$where.'
|
||||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
|
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
|
||||||
GROUP BY o.module
|
GROUP BY o.module
|
||||||
ORDER BY total DESC';
|
ORDER BY total DESC';
|
||||||
$ca['payment'] = Db::getInstance()->executeS($sql);
|
$ca['payment'] = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
$sql = 'SELECT z.name, SUM(o.total_products / o.conversion_rate) as total, COUNT(*) as nb
|
$sql = 'SELECT z.name, SUM(o.total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) as nb
|
||||||
FROM `'._DB_PREFIX_.'orders` o
|
FROM `'._DB_PREFIX_.'orders` o
|
||||||
LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_invoice = a.id_address
|
LEFT JOIN `'._DB_PREFIX_.'address` a ON o.id_address_invoice = a.id_address
|
||||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.id_country = a.id_country
|
LEFT JOIN `'._DB_PREFIX_.'country` c ON c.id_country = a.id_country
|
||||||
@@ -539,7 +541,7 @@ class StatsForecast extends Module
|
|||||||
ORDER BY total DESC';
|
ORDER BY total DESC';
|
||||||
$ca['zones'] = Db::getInstance()->executeS($sql);
|
$ca['zones'] = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
$sql = 'SELECT cu.name, SUM(o.total_products / o.conversion_rate) as total, COUNT(*) as nb
|
$sql = 'SELECT cu.name, SUM(o.total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) as nb
|
||||||
FROM `'._DB_PREFIX_.'orders` o
|
FROM `'._DB_PREFIX_.'orders` o
|
||||||
LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency
|
LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency
|
||||||
'.$join.'
|
'.$join.'
|
||||||
@@ -551,7 +553,7 @@ class StatsForecast extends Module
|
|||||||
ORDER BY total DESC';
|
ORDER BY total DESC';
|
||||||
$ca['currencies'] = Db::getInstance()->executeS($sql);
|
$ca['currencies'] = Db::getInstance()->executeS($sql);
|
||||||
|
|
||||||
$sql = 'SELECT SUM(total_products / o.conversion_rate) as total, COUNT(*) AS nb
|
$sql = 'SELECT SUM(total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) AS nb
|
||||||
FROM `'._DB_PREFIX_.'orders` o
|
FROM `'._DB_PREFIX_.'orders` o
|
||||||
WHERE o.valid = 1
|
WHERE o.valid = 1
|
||||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||||
|
|||||||
+2
-5
@@ -191,12 +191,9 @@
|
|||||||
{assign var="shipping_discount_tax_incl" value="0"}
|
{assign var="shipping_discount_tax_incl" value="0"}
|
||||||
{foreach $cart_rules as $cart_rule}
|
{foreach $cart_rules as $cart_rule}
|
||||||
{cycle values='#FFF,#DDD' assign=bgcolor}
|
{cycle values='#FFF,#DDD' assign=bgcolor}
|
||||||
<tr style="line-height:6px;background-color:{$bgcolor};" text-align="left">
|
<tr style="line-height:6px;background-color:{$bgcolor}" text-align="left">
|
||||||
<td style="line-height:3px; text-align: left; width: 60%; vertical-align: top" colspan="{if !$tax_excluded_display}3{else}2{/if}">{$cart_rule.name}</td>
|
<td style="line-height:3px;text-align:left;width:60%;vertical-align:top" colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td>
|
||||||
<td>
|
<td>
|
||||||
{if $cart_rule.free_shipping}
|
|
||||||
{assign var="shipping_discount_tax_incl" value=$order_invoice->total_shipping_tax_incl}
|
|
||||||
{/if}
|
|
||||||
{if $tax_excluded_display}
|
{if $tax_excluded_display}
|
||||||
- {$cart_rule.value_tax_excl}
|
- {$cart_rule.value_tax_excl}
|
||||||
{else}
|
{else}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ var countriesNeedZipCode = new Array();
|
|||||||
$(function(){ldelim}
|
$(function(){ldelim}
|
||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
||||||
{rdelim});
|
{rdelim});
|
||||||
{if $vat_management}
|
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#company').blur(function(){
|
$('#company').blur(function(){
|
||||||
@@ -62,7 +61,6 @@ $(function(){ldelim}
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
{/if}
|
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -104,13 +102,7 @@ $(function(){ldelim}
|
|||||||
<label for="company">{l s='Company'}</label>
|
<label for="company">{l s='Company'}</label>
|
||||||
<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company}{/if}{/if}" />
|
<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company}{/if}{/if}" />
|
||||||
</p>
|
</p>
|
||||||
{if $vat_display == 2}
|
<div id="vat_area">
|
||||||
<div id="vat_area">
|
|
||||||
{elseif $vat_display == 1}
|
|
||||||
<div id="vat_area" style="display: none;">
|
|
||||||
{else}
|
|
||||||
<div style="display: none;">
|
|
||||||
{/if}
|
|
||||||
<div id="vat_number">
|
<div id="vat_number">
|
||||||
<p class="text">
|
<p class="text">
|
||||||
<label for="vat_number">{l s='VAT number'}</label>
|
<label for="vat_number">{l s='VAT number'}</label>
|
||||||
|
|||||||
@@ -52,23 +52,21 @@ $(function(){ldelim}
|
|||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
||||||
{rdelim});
|
{rdelim});
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}</h1>
|
<h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}</h1>
|
||||||
|
|||||||
@@ -931,7 +931,7 @@ table#cart_summary .gift-icon {
|
|||||||
|
|
||||||
#authentication #create-account_form fieldset,
|
#authentication #create-account_form fieldset,
|
||||||
#authentication #login_form fieldset {
|
#authentication #login_form fieldset {
|
||||||
height: 200px
|
min-height: 200px
|
||||||
}
|
}
|
||||||
|
|
||||||
#authentication #create-account_form .form_content,
|
#authentication #create-account_form .form_content,
|
||||||
@@ -977,7 +977,8 @@ table#cart_summary .gift-icon {
|
|||||||
width:220px;/* 230 */
|
width:220px;/* 230 */
|
||||||
border:1px solid #ccc;
|
border:1px solid #ccc;
|
||||||
color:#666;
|
color:#666;
|
||||||
background:url(../img/bg_discount_name.png) repeat-x 0 0 #fff
|
background:url(../img/bg_discount_name.png) repeat-x 0 0 #fff;
|
||||||
|
line-height:20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#create-account_form #SubmitCreate,
|
#create-account_form #SubmitCreate,
|
||||||
|
|||||||
@@ -35,18 +35,13 @@ function updateAddressesDisplay(first_view)
|
|||||||
{
|
{
|
||||||
// update content of delivery address
|
// update content of delivery address
|
||||||
updateAddressDisplay('delivery');
|
updateAddressDisplay('delivery');
|
||||||
|
|
||||||
var txtInvoiceTitle = "";
|
var txtInvoiceTitle = "";
|
||||||
|
|
||||||
try{
|
try{
|
||||||
var adrs_titles = getAddressesTitles();
|
var adrs_titles = getAddressesTitles();
|
||||||
txtInvoiceTitle = adrs_titles.invoice;
|
txtInvoiceTitle = adrs_titles.invoice;
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// update content of invoice address
|
// update content of invoice address
|
||||||
//if addresses have to be equals...
|
//if addresses have to be equals...
|
||||||
if ($('input[type=checkbox]#addressesAreEquals:checked').length === 1 && ($('#multishipping_mode_checkbox:checked').length === 0))
|
if ($('input[type=checkbox]#addressesAreEquals:checked').length === 1 && ($('#multishipping_mode_checkbox:checked').length === 0))
|
||||||
@@ -68,7 +63,6 @@ function updateAddressesDisplay(first_view)
|
|||||||
$('ul#address_invoice li.address_title').html(txtInvoiceTitle);
|
$('ul#address_invoice li.address_title').html(txtInvoiceTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!first_view)
|
if(!first_view)
|
||||||
{
|
{
|
||||||
if (orderProcess === 'order')
|
if (orderProcess === 'order')
|
||||||
@@ -82,15 +76,15 @@ function updateAddressDisplay(addressType)
|
|||||||
if (formatedAddressFieldsValuesList.length <= 0)
|
if (formatedAddressFieldsValuesList.length <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var idAddress = $('#id_address_' + addressType + '').val();
|
var idAddress = parseInt($('#id_address_' + addressType + '').val());
|
||||||
buildAddressBlock(idAddress, addressType, $('#address_'+ addressType));
|
buildAddressBlock(idAddress, addressType, $('#address_' + addressType));
|
||||||
|
|
||||||
// change update link
|
// change update link
|
||||||
var link = $('ul#address_' + addressType + ' li.address_update a').attr('href');
|
var link = $('ul#address_' + addressType + ' li.address_update a').attr('href');
|
||||||
var expression = /id_address=\d+/;
|
var expression = /id_address=\d+/;
|
||||||
if (link)
|
if (link)
|
||||||
{
|
{
|
||||||
link = link.replace(expression, 'id_address='+idAddress);
|
link = link.replace(expression, 'id_address=' + idAddress);
|
||||||
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
$('ul#address_' + addressType + ' li.address_update a').attr('href', link);
|
||||||
}
|
}
|
||||||
resizeAddressesBox();
|
resizeAddressesBox();
|
||||||
@@ -98,41 +92,43 @@ function updateAddressDisplay(addressType)
|
|||||||
|
|
||||||
function updateAddresses()
|
function updateAddresses()
|
||||||
{
|
{
|
||||||
var idAddress_delivery = $('#id_address_delivery').val();
|
var idAddress_delivery = parseInt($('#id_address_delivery').val());
|
||||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : $('#id_address_invoice').val();
|
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : parseInt($('#id_address_invoice').val());
|
||||||
$.ajax({
|
|
||||||
type: 'POST',
|
if(isNaN(idAddress_delivery) == false && isNaN(idAddress_invoice) == false)
|
||||||
headers: { "cache-control": "no-cache" },
|
$.ajax({
|
||||||
url: baseUri + '?rand=' + new Date().getTime(),
|
type: 'POST',
|
||||||
async: true,
|
headers: { "cache-control": "no-cache" },
|
||||||
cache: false,
|
url: baseUri + '?rand=' + new Date().getTime(),
|
||||||
dataType : "json",
|
async: true,
|
||||||
data: {
|
cache: false,
|
||||||
processAddress: true,
|
dataType : "json",
|
||||||
step: 2,
|
data: {
|
||||||
ajax: 'true',
|
processAddress: true,
|
||||||
controller: 'order',
|
step: 2,
|
||||||
'multi-shipping': $('#id_address_delivery:hidden').length,
|
ajax: 'true',
|
||||||
id_address_delivery: idAddress_delivery,
|
controller: 'order',
|
||||||
id_address_invoice: idAddress_invoice,
|
'multi-shipping': $('#id_address_delivery:hidden').length,
|
||||||
token: static_token
|
id_address_delivery: idAddress_delivery,
|
||||||
},
|
id_address_invoice: idAddress_invoice,
|
||||||
success: function(jsonData)
|
token: static_token
|
||||||
{
|
},
|
||||||
if (jsonData.hasError)
|
success: function(jsonData)
|
||||||
{
|
{
|
||||||
var errors = '';
|
if (jsonData.hasError)
|
||||||
for(var error in jsonData.errors)
|
{
|
||||||
//IE6 bug fix
|
var errors = '';
|
||||||
if(error !== 'indexOf')
|
for(var error in jsonData.errors)
|
||||||
errors += jsonData.errors[error] + "\n";
|
//IE6 bug fix
|
||||||
alert(errors);
|
if(error !== 'indexOf')
|
||||||
|
errors += jsonData.errors[error] + "\n";
|
||||||
|
alert(errors);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
|
if (textStatus !== 'abort')
|
||||||
|
alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
|
||||||
if (textStatus !== 'abort')
|
|
||||||
alert("TECHNICAL ERROR: unable to save adresses \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
resizeAddressesBox();
|
resizeAddressesBox();
|
||||||
}
|
}
|
||||||
@@ -305,9 +305,9 @@ function saveAddress(type)
|
|||||||
params += 'phone='+encodeURIComponent($('#phone'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
params += 'phone='+encodeURIComponent($('#phone'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
||||||
params += 'phone_mobile='+encodeURIComponent($('#phone_mobile'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
params += 'phone_mobile='+encodeURIComponent($('#phone_mobile'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
||||||
params += 'alias='+encodeURIComponent($('#alias'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
params += 'alias='+encodeURIComponent($('#alias'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
||||||
if (type === 'delivery' && $('#opc_id_address_delivery').val() != 'undefined' && parseInt($('#opc_id_address_delivery').val()) > 0)
|
if (type === 'delivery' && $('#opc_id_address_delivery').val() != undefined && parseInt($('#opc_id_address_delivery').val()) > 0)
|
||||||
params += 'opc_id_address_delivery='+encodeURIComponent($('#opc_id_address_delivery').val())+'&';
|
params += 'opc_id_address_delivery='+encodeURIComponent($('#opc_id_address_delivery').val())+'&';
|
||||||
if (type === 'invoice' && $('#opc_id_address_invoice').val() != 'undefined' && parseInt($('#opc_id_address_invoice').val()) > 0)
|
if (type === 'invoice' && $('#opc_id_address_invoice').val() != undefined && parseInt($('#opc_id_address_invoice').val()) > 0)
|
||||||
params += 'opc_id_address_invoice='+encodeURIComponent($('#opc_id_address_invoice').val())+'&';
|
params += 'opc_id_address_invoice='+encodeURIComponent($('#opc_id_address_invoice').val())+'&';
|
||||||
// Clean the last &
|
// Clean the last &
|
||||||
params = params.substr(0, params.length-1);
|
params = params.substr(0, params.length-1);
|
||||||
|
|||||||
@@ -51,23 +51,21 @@ countriesNeedZipCode = new Array();
|
|||||||
$(function(){ldelim}
|
$(function(){ldelim}
|
||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
||||||
{rdelim});
|
{rdelim});
|
||||||
{if $vat_management}
|
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#company').blur(function(){
|
$('#company').blur(function(){
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
vat_number();
|
||||||
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
{/if}
|
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -53,23 +53,21 @@ $(function(){ldelim}
|
|||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
||||||
{rdelim});
|
{rdelim});
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{assign var='stateExist' value=false}
|
{assign var='stateExist' value=false}
|
||||||
@@ -77,4 +75,4 @@ $(function(){ldelim}
|
|||||||
{include file="./authentication-choice.tpl"}
|
{include file="./authentication-choice.tpl"}
|
||||||
{else}
|
{else}
|
||||||
{include file="./authentication-create-account.tpl"}
|
{include file="./authentication-create-account.tpl"}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -71,35 +71,33 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
function vat_number()
|
||||||
function vat_number()
|
{
|
||||||
{
|
if ($('#company').val() != '')
|
||||||
if ($('#company').val() != '')
|
$('#vat_number_block').show();
|
||||||
$('#vat_number_block').show();
|
else
|
||||||
else
|
$('#vat_number_block').hide();
|
||||||
$('#vat_number_block').hide();
|
}
|
||||||
}
|
function vat_number_invoice()
|
||||||
function vat_number_invoice()
|
{
|
||||||
{
|
if ($('#company_invoice').val() != '')
|
||||||
if ($('#company_invoice').val() != '')
|
$('#vat_number_block_invoice').show();
|
||||||
$('#vat_number_block_invoice').show();
|
else
|
||||||
else
|
$('#vat_number_block_invoice').hide();
|
||||||
$('#vat_number_block_invoice').hide();
|
}
|
||||||
}
|
|
||||||
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
$('#company_invoice').blur(function(){
|
|
||||||
vat_number_invoice();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
|
});
|
||||||
|
$('#company_invoice').blur(function(){
|
||||||
vat_number_invoice();
|
vat_number_invoice();
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
vat_number_invoice();
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
<!-- Error return block -->
|
<!-- Error return block -->
|
||||||
<div id="opc_account_errors" class="error" style="display:none;"></div>
|
<div id="opc_account_errors" class="error" style="display:none;"></div>
|
||||||
|
|||||||
@@ -88,31 +88,7 @@
|
|||||||
<td class="price" id="total_product">{displayPrice price=$total_products}</td>
|
<td class="price" id="total_product">{displayPrice price=$total_products}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
|
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display:none"{/if}>
|
||||||
<td colspan="5">
|
|
||||||
{if $use_taxes}
|
|
||||||
{if $priceDisplay}
|
|
||||||
{if $display_tax_label}{l s='Total vouchers (tax excl.):'}{else}{l s='Total vouchers:'}{/if}
|
|
||||||
{else}
|
|
||||||
{if $display_tax_label}{l s='Total vouchers (tax incl.):'}{else}{l s='Total vouchers:'}{/if}
|
|
||||||
{/if}
|
|
||||||
{else}
|
|
||||||
{l s='Total vouchers:'}
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td class="price-discount price" id="total_discount">
|
|
||||||
{if $use_taxes}
|
|
||||||
{if $priceDisplay}
|
|
||||||
{displayPrice price=$total_discounts_tax_exc}
|
|
||||||
{else}
|
|
||||||
{displayPrice price=$total_discounts}
|
|
||||||
{/if}
|
|
||||||
{else}
|
|
||||||
{displayPrice price=$total_discounts_tax_exc}
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
|
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
{if $priceDisplay}
|
{if $priceDisplay}
|
||||||
@@ -144,25 +120,54 @@
|
|||||||
{else}
|
{else}
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
{if $priceDisplay}
|
{if $priceDisplay}
|
||||||
<tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
|
<tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none"{/if}>
|
||||||
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}</td>
|
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax excl.):'}{else}{l s='Total shipping:'}{/if}</td>
|
||||||
<td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
|
<td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{else}
|
{else}
|
||||||
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
|
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none"{/if}>
|
||||||
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td>
|
<td colspan="5">{if $display_tax_label}{l s='Total shipping (tax incl.):'}{else}{l s='Total shipping:'}{/if}</td>
|
||||||
<td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
|
<td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
{else}
|
||||||
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
|
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none"{/if}>
|
||||||
<td colspan="5">{l s='Total shipping:'}</td>
|
<td colspan="5">{l s='Total shipping:'}</td>
|
||||||
<td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
|
<td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
|
||||||
|
<td colspan="5">
|
||||||
|
{if $use_taxes}
|
||||||
|
{if $priceDisplay}
|
||||||
|
{if $display_tax_label}{l s='Total vouchers (tax excl.):'}{else}{l s='Total vouchers:'}{/if}
|
||||||
|
{else}
|
||||||
|
{if $display_tax_label}{l s='Total vouchers (tax incl.):'}{else}{l s='Total vouchers:'}{/if}
|
||||||
|
{/if}
|
||||||
|
{else}
|
||||||
|
{l s='Total vouchers:'}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
<td class="price-discount price" id="total_discount">
|
||||||
|
{if $use_taxes}
|
||||||
|
{if $priceDisplay}
|
||||||
|
{displayPrice price=$total_discounts_tax_exc*-1}
|
||||||
|
{else}
|
||||||
|
{displayPrice price=$total_discounts*-1}
|
||||||
|
{/if}
|
||||||
|
{else}
|
||||||
|
{displayPrice price=$total_discounts_tax_exc*-1}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
|
{if $priceDisplay && $total_tax != 0}
|
||||||
|
<tr class="cart_total_tax">
|
||||||
|
<td colspan="5">{l s='Total tax:'}</td>
|
||||||
|
<td class="price" id="total_tax" >{displayPrice price=$total_tax}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
<tr class="cart_total_price">
|
<tr class="cart_total_price">
|
||||||
<td colspan="5" id="cart_voucher" class="cart_voucher">
|
<td colspan="5" id="cart_voucher" class="cart_voucher">
|
||||||
{if $voucherAllowed}
|
{if $voucherAllowed}
|
||||||
|
|||||||
@@ -100,23 +100,6 @@
|
|||||||
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
|
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
|
|
||||||
<td colspan="5">
|
|
||||||
{if $use_taxes && $display_tax_label}
|
|
||||||
{l s='Total vouchers (tax excl.):'}
|
|
||||||
{else}
|
|
||||||
{l s='Total vouchers:'}
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td colspan="2" class="price-discount price" id="total_discount">
|
|
||||||
{if $use_taxes && !$priceDisplay}
|
|
||||||
{assign var='total_discounts_negative' value=$total_discounts * -1}
|
|
||||||
{else}
|
|
||||||
{assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
|
|
||||||
{/if}
|
|
||||||
{displayPrice price=$total_discounts_negative}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
|
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
@@ -162,6 +145,27 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
<tr class="cart_total_voucher" {if $total_discounts == 0}style="display:none"{/if}>
|
||||||
|
<td colspan="5">
|
||||||
|
{if $display_tax_label}
|
||||||
|
{if $use_taxes && $priceDisplay == 0}
|
||||||
|
{l s='Total vouchers (tax incl.):'}
|
||||||
|
{else}
|
||||||
|
{l s='Total vouchers (tax excl.):'}
|
||||||
|
{/if}
|
||||||
|
{else}
|
||||||
|
{l s='Total vouchers:'}
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
|
<td colspan="2" class="price-discount price" id="total_discount">
|
||||||
|
{if $use_taxes}
|
||||||
|
{assign var='total_discounts_negative' value=$total_discounts * -1}
|
||||||
|
{else}
|
||||||
|
{assign var='total_discounts_negative' value=$total_discounts_tax_exc * -1}
|
||||||
|
{/if}
|
||||||
|
{displayPrice price=$total_discounts_negative}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
{if $use_taxes}
|
{if $use_taxes}
|
||||||
<tr class="cart_total_price">
|
<tr class="cart_total_price">
|
||||||
<td colspan="5">{l s='Total (tax excl.):'}</td>
|
<td colspan="5">{l s='Total (tax excl.):'}</td>
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ class Hook extends HookCore
|
|||||||
return self::$hookMemoryUsage;
|
return self::$hookMemoryUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function exec($hook_name, $hookArgs = array(), $id_module = null)
|
public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true)
|
||||||
{
|
{
|
||||||
$memoryUsage = memory_get_usage();
|
$memoryUsage = memory_get_usage();
|
||||||
$t0 = microtime(true);
|
$t0 = microtime(true);
|
||||||
$result = parent::exec($hook_name, $hookArgs, $id_module);
|
$result = parent::exec($hook_name, $hook_args, $id_module, $array_return, $check_exceptions);
|
||||||
self::$hookTime[$hook_name] = microtime(true) - $t0;
|
self::$hookTime[$hook_name] = microtime(true) - $t0;
|
||||||
self::$hookMemoryUsage[$hook_name] = memory_get_usage() - $memoryUsage;
|
self::$hookMemoryUsage[$hook_name] = memory_get_usage() - $memoryUsage;
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
Reference in New Issue
Block a user