[-] BO : error message on install module
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
<div class="margin-form">
|
||||
<select name="id_hook" {if $edit_graft} disabled="disabled"{/if}>
|
||||
{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}
|
||||
</select><sup> *</sup>
|
||||
</div>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
{if sizeof($invoices_collection)}
|
||||
<select name="product_invoice" class="edit_product_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}
|
||||
</select>
|
||||
{else}
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
id_product: id_product,
|
||||
id_product_attribute: id_product_attribute,
|
||||
id_customer: id_customer,
|
||||
price: new_price
|
||||
price: new Number(new_price.replace(",",".")).toFixed(4).toString()
|
||||
},
|
||||
success : function(res)
|
||||
{
|
||||
|
||||
+8
-9
@@ -1331,6 +1331,9 @@ class CartCore extends ObjectModel
|
||||
else
|
||||
$shipping_fees = 0;
|
||||
|
||||
if ($type == Cart::ONLY_SHIPPING)
|
||||
return $shipping_fees;
|
||||
|
||||
if ($type == Cart::ONLY_PRODUCTS_WITHOUT_SHIPPING)
|
||||
$type = Cart::ONLY_PRODUCTS;
|
||||
|
||||
@@ -1455,12 +1458,14 @@ class CartCore extends ObjectModel
|
||||
$wrapping_fees = 0;
|
||||
if ($this->gift)
|
||||
$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;
|
||||
if (!in_array($type, array(Cart::ONLY_SHIPPING, Cart::ONLY_PRODUCTS)) && CartRule::isFeatureActive())
|
||||
{
|
||||
// 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);
|
||||
else
|
||||
{
|
||||
@@ -1486,7 +1491,7 @@ class CartCore extends ObjectModel
|
||||
foreach ($cart_rules as $cart_rule)
|
||||
{
|
||||
// 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);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
if ($type == Cart::ONLY_SHIPPING)
|
||||
return $shipping_fees;
|
||||
|
||||
if ($type == Cart::ONLY_WRAPPING)
|
||||
return $wrapping_fees;
|
||||
|
||||
if ($type == Cart::BOTH)
|
||||
$order_total += $shipping_fees + $wrapping_fees;
|
||||
|
||||
@@ -2837,8 +2836,8 @@ class CartCore extends ObjectModel
|
||||
$invoice = new Address((int)$this->id_address_invoice);
|
||||
|
||||
// New layout system with personalization fields
|
||||
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
||||
$formatted_addresses['invoice'] = AddressFormat::getFormattedLayoutData($invoice);
|
||||
$formatted_addresses['delivery'] = AddressFormat::getFormattedLayoutData($delivery);
|
||||
|
||||
$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_REDUCTION = 3;
|
||||
const FILTER_ACTION_GIFT = 4;
|
||||
const FILTER_ACTION_ALL_NOCAP = 5;
|
||||
|
||||
const BO_ORDER_CODE_PREFIX = 'BO_ORDER_';
|
||||
|
||||
@@ -119,14 +120,20 @@ class CartRuleCore extends ObjectModel
|
||||
/**
|
||||
* @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;
|
||||
|
||||
Configuration::updateGlobalValue('PS_CART_RULE_FEATURE_ACTIVE', '1');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update($null_values = false)
|
||||
{
|
||||
Cache::clean('getContextualValue_'.$this->id.'_*');
|
||||
return parent::update($null_values);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ObjectModel::delete()
|
||||
@@ -216,27 +223,26 @@ class CartRuleCore extends ObjectModel
|
||||
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.')
|
||||
WHERE (
|
||||
cr.`id_customer` = '.(int)$id_customer.'
|
||||
cr.`id_customer` = '.(int)$id_customer.' OR cr.group_restriction = 1
|
||||
'.($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' : '').'
|
||||
'.($inStock ? 'AND cr.`quantity` > 0' : ''));
|
||||
|
||||
// Remove cart rule that does not match the customer groups
|
||||
if ($includeGeneric)
|
||||
{
|
||||
$customerGroups = Customer::getGroupsStatic($id_customer);
|
||||
foreach ($result as $key => $cart_rule)
|
||||
if ($cart_rule['group_restriction'])
|
||||
{
|
||||
$cartRuleGroups = Db::getInstance()->getValue('SELECT id_group FROM '._DB_PREFIX_.'cart_rule_group WHERE id_cart_rule = '.(int)$cart_rule['id_cart_rule']);
|
||||
foreach ($cartRuleGroups as $cartRuleGroup)
|
||||
if (in_array($cartRuleGroups['id_group'], $customerGroups))
|
||||
continue 2;
|
||||
$customerGroups = Customer::getGroupsStatic($id_customer);
|
||||
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)
|
||||
if (in_array($cartRuleGroup['id_group'], $customerGroups))
|
||||
continue 2;
|
||||
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
unset($result[$key]);
|
||||
}
|
||||
|
||||
foreach ($result as &$cart_rule)
|
||||
if ($cart_rule['quantity_per_user'])
|
||||
@@ -749,7 +755,7 @@ class CartRuleCore extends ObjectModel
|
||||
return Cache::retrieve($cache_id);
|
||||
|
||||
// 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)
|
||||
$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
|
||||
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 ($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;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($this->reduction_product > 0)
|
||||
@@ -884,9 +898,12 @@ class CartRuleCore extends ObjectModel
|
||||
// Discount (¤) on the whole order
|
||||
elseif ($this->reduction_product == 0)
|
||||
{
|
||||
// TODO : this should not use the prorata
|
||||
$cart_amount_ti = $context->cart->getOrderTotal(true, 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;
|
||||
|
||||
@@ -911,7 +928,7 @@ class CartRuleCore extends ObjectModel
|
||||
}
|
||||
|
||||
// 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']);
|
||||
foreach ($package_products as $product)
|
||||
|
||||
@@ -412,16 +412,17 @@ class CustomerCore extends ObjectModel
|
||||
*/
|
||||
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`
|
||||
FROM `'._DB_PREFIX_.'address`
|
||||
WHERE `id_customer` = '.(int)$id_customer.'
|
||||
AND `id_address` = '.(int)$id_address.'
|
||||
AND `deleted` = 0');
|
||||
}
|
||||
return self::$_customerHasAddress[$id_customer];
|
||||
return self::$_customerHasAddress[$key];
|
||||
}
|
||||
|
||||
public static function resetAddressCache($id_customer)
|
||||
@@ -438,13 +439,14 @@ class CustomerCore extends ObjectModel
|
||||
*/
|
||||
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
|
||||
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_.'state` s ON (s.`id_state` = a.`id_state`)
|
||||
'.(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';
|
||||
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -468,7 +468,7 @@ class DispatcherCore
|
||||
if ($keywords)
|
||||
{
|
||||
$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++)
|
||||
{
|
||||
$prepend = $m[2][$i];
|
||||
@@ -537,7 +537,7 @@ class DispatcherCore
|
||||
if (!isset($this->routes[$id_lang]) && !isset($this->routes[$id_lang][$route_id]))
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
return (count($errors)) ? false : true;
|
||||
@@ -614,10 +614,10 @@ class DispatcherCore
|
||||
$replace = $route['keywords'][$key]['prepend'].$params[$key].$route['keywords'][$key]['append'];
|
||||
else
|
||||
$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))
|
||||
$url .= '?'.http_build_query($add_param, '', '&');
|
||||
}
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ class HookCore extends ObjectModel
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
|
||||
SELECT * FROM `'._DB_PREFIX_.'hook` h
|
||||
'.($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)
|
||||
{
|
||||
clearstatcache(true, $src_file);
|
||||
if (PHP_VERSION_ID < 50300)
|
||||
clearstatcache();
|
||||
else
|
||||
clearstatcache(true, $src_file);
|
||||
|
||||
if (!file_exists($src_file) || !filesize($src_file))
|
||||
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.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.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.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),
|
||||
@@ -539,4 +539,4 @@ class MediaCore
|
||||
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);
|
||||
$values = array(
|
||||
'tax_incl' => $cart_rule['obj']->getContextualValue(true, $this->context, CartRule::FILTER_ACTION_ALL, $package),
|
||||
'tax_excl' => $cart_rule['obj']->getContextualValue(false, $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_NOCAP, $package)
|
||||
);
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
$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))
|
||||
{
|
||||
@@ -616,7 +616,7 @@ abstract class PaymentModuleCore extends Module
|
||||
{
|
||||
$pdf = new PDF($order->getInvoicesCollection(), PDF::TEMPLATE_INVOICE, $this->context->smarty);
|
||||
$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';
|
||||
}
|
||||
else
|
||||
|
||||
+3
-2
@@ -902,7 +902,7 @@ class ProductCore extends ObjectModel
|
||||
);
|
||||
|
||||
$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)
|
||||
$return &= $this->cleanPositions((int)$row['id_category']);
|
||||
|
||||
@@ -4951,7 +4951,7 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
$query->from('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('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);
|
||||
@@ -4962,6 +4962,7 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
$query->from('product_lang', 'pl');
|
||||
$query->where('pl.id_product = '.(int)$id_product);
|
||||
$query->where('pl.id_lang = '.(int)$id_lang.Shop::addSqlRestrictionOnLang('pl'));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
if ($stream_context == null)
|
||||
$stream_context = @stream_context_create(array('http' => array('timeout' => 5)));
|
||||
|
||||
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')))
|
||||
if ($stream_context == null && !preg_match('/^https?:\/\//', $url))
|
||||
$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))
|
||||
return @file_get_contents($url, $use_include_path, $stream_context);
|
||||
elseif (function_exists('curl_init'))
|
||||
{
|
||||
@@ -1289,6 +1288,16 @@ class ToolsCore
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $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);
|
||||
curl_close($curl);
|
||||
return $content;
|
||||
@@ -1299,10 +1308,7 @@ class ToolsCore
|
||||
|
||||
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);
|
||||
else
|
||||
return false;
|
||||
return @simplexml_load_string(Tools::file_get_contents($url), $class_name);
|
||||
}
|
||||
|
||||
|
||||
@@ -1535,6 +1541,18 @@ class ToolsCore
|
||||
'virtual' => $shop_url->virtual_uri,
|
||||
'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
|
||||
|
||||
Vendored
+34
-23
@@ -46,26 +46,33 @@ class CacheMemcacheCore extends Cache
|
||||
|
||||
// Get keys (this code comes from Doctrine 2 project)
|
||||
$this->keys = array();
|
||||
$all_slabs = $this->memcache->getExtendedStats('slabs');
|
||||
|
||||
foreach ($all_slabs as $server => $slabs)
|
||||
{
|
||||
if (is_array($slabs))
|
||||
{
|
||||
foreach (array_keys($slabs) as $slab_id)
|
||||
{
|
||||
$dump = $this->memcache->getExtendedStats('cachedump', (int)$slab_id);
|
||||
if ($dump)
|
||||
{
|
||||
foreach ($dump as $entries)
|
||||
{
|
||||
if ($entries)
|
||||
$this->keys = array_merge($this->keys, array_keys($entries));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$servers = self::getMemcachedServers();
|
||||
|
||||
if(is_array($servers) && count($servers) > 0 && method_exists('Memcache', 'getStats'))
|
||||
$all_slabs = $this->memcache->getStats('slabs');
|
||||
|
||||
if(isset($all_slabs) && is_array($all_slabs))
|
||||
foreach ($all_slabs as $server => $slabs)
|
||||
{
|
||||
if (is_array($slabs))
|
||||
{
|
||||
foreach (array_keys($slabs) as $slab_id)
|
||||
{
|
||||
if(is_int($slab_id))
|
||||
{
|
||||
$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()
|
||||
@@ -78,12 +85,16 @@ class CacheMemcacheCore extends Cache
|
||||
*/
|
||||
public function connect()
|
||||
{
|
||||
$this->memcache = new Memcache();
|
||||
$servers = CacheMemcache::getMemcachedServers();
|
||||
if (class_exists('Memcache') && extension_loaded('memcache'))
|
||||
$this->memcache = new Memcache();
|
||||
else
|
||||
return false;
|
||||
|
||||
$servers = self::getMemcachedServers();
|
||||
if (!$servers)
|
||||
return false;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -2268,9 +2268,10 @@ class AdminControllerCore extends Controller
|
||||
$class_name = $this->className;
|
||||
|
||||
/* 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 */
|
||||
$default_language = new Language((int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
@@ -2280,56 +2281,61 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
|
||||
/* Checking for required fields */
|
||||
foreach ($rules['required'] as $field)
|
||||
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is required.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
if (isset($rules['required']) && is_array($rules['required']))
|
||||
foreach ($rules['required'] as $field)
|
||||
if (($value = Tools::getValue($field)) == false && (string)$value != '0')
|
||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is required.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
|
||||
/* Checking for multilingual required fields */
|
||||
foreach ($rules['requiredLang'] as $field_lang)
|
||||
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||
$default_language->name
|
||||
);
|
||||
if (isset($rules['requiredLang']) && is_array($rules['requiredLang']))
|
||||
foreach ($rules['requiredLang'] as $field_lang)
|
||||
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||
$default_language->name
|
||||
);
|
||||
|
||||
/* Checking for maximum fields sizes */
|
||||
foreach ($rules['size'] as $field => $max_length)
|
||||
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
||||
$this->errors[] = sprintf(
|
||||
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)
|
||||
if (isset($rules['size']) && is_array($rules['size']))
|
||||
foreach ($rules['size'] as $field => $max_length)
|
||||
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $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'],
|
||||
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 */
|
||||
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 */
|
||||
$this->_childValidation();
|
||||
|
||||
/* Checking for fields validity */
|
||||
foreach ($rules['validate'] as $field => $function)
|
||||
if (($value = Tools::getValue($field)) !== false && ($field != 'passwd'))
|
||||
if (!Validate::$function($value) && !empty($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
if (isset($rules['validate']) && is_array($rules['validate']))
|
||||
foreach ($rules['validate'] as $field => $function)
|
||||
if (($value = Tools::getValue($field)) !== false && ($field != 'passwd'))
|
||||
if (!Validate::$function($value) && !empty($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %s is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||
);
|
||||
|
||||
/* Checking for passwd_old validity */
|
||||
if (($value = Tools::getValue('passwd')) != false)
|
||||
@@ -2347,15 +2353,16 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
|
||||
/* Checking for multilingual fields validity */
|
||||
foreach ($rules['validateLang'] as $field_lang => $function)
|
||||
foreach ($languages as $language)
|
||||
if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value))
|
||||
if (!Validate::$function($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
||||
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||
$language['name']
|
||||
);
|
||||
if (isset($rules['validateLang']) && is_array($rules['validateLang']))
|
||||
foreach ($rules['validateLang'] as $field_lang => $function)
|
||||
foreach ($languages as $language)
|
||||
if (($value = Tools::getValue($field_lang.'_'.$language['id_lang'])) !== false && !empty($value))
|
||||
if (!Validate::$function($value))
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
||||
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 */
|
||||
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;
|
||||
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));
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -185,6 +185,25 @@ class DbMySQLiCore extends Db
|
||||
$link->close();
|
||||
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()
|
||||
|
||||
@@ -174,6 +174,28 @@ class DbPDOCore extends Db
|
||||
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()
|
||||
*/
|
||||
|
||||
@@ -174,6 +174,28 @@ class MySQLCore extends Db
|
||||
@mysql_close($link);
|
||||
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()
|
||||
|
||||
@@ -189,7 +189,10 @@ abstract class ModuleCore
|
||||
{
|
||||
// Check module name validation
|
||||
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
|
||||
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()
|
||||
{
|
||||
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();
|
||||
}
|
||||
@@ -289,7 +289,7 @@ class OrderCore extends ObjectModel
|
||||
|
||||
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');
|
||||
$orderDetail->product_quantity_return += (int)($quantity);
|
||||
return $orderDetail->update();
|
||||
@@ -1027,7 +1027,7 @@ class OrderCore extends ObjectModel
|
||||
* @param int $id_order_invoice
|
||||
* @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->id_order = $this->id;
|
||||
@@ -1036,12 +1036,18 @@ class OrderCore extends ObjectModel
|
||||
$order_cart_rule->name = $name;
|
||||
$order_cart_rule->value = $values['tax_incl'];
|
||||
$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();
|
||||
}
|
||||
|
||||
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)
|
||||
return true;
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
|
||||
@@ -1059,7 +1065,7 @@ class OrderCore extends ObjectModel
|
||||
*/
|
||||
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 false;
|
||||
@@ -1082,10 +1088,10 @@ class OrderCore extends ObjectModel
|
||||
{
|
||||
$order_invoice = new OrderInvoice();
|
||||
$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 ($order_invoice->number)
|
||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false );
|
||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $this->id_shop);
|
||||
else
|
||||
$order_invoice->number = Order::getLastInvoiceNumber() + 1;
|
||||
|
||||
@@ -1169,11 +1175,11 @@ class OrderCore extends ObjectModel
|
||||
$order_invoice_collection = $this->getInvoicesCollection();
|
||||
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 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;
|
||||
}
|
||||
|
||||
@@ -1185,7 +1191,7 @@ class OrderCore extends ObjectModel
|
||||
|
||||
// Keep for backward compatibility
|
||||
$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
|
||||
@@ -1591,7 +1597,7 @@ class OrderCore extends ObjectModel
|
||||
else
|
||||
{
|
||||
$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;
|
||||
else
|
||||
$total += Tools::convertPrice($amount, $currency->id, true);
|
||||
|
||||
@@ -70,10 +70,10 @@ class OrderHistoryCore extends ObjectModel
|
||||
* Sets the new state of the given order
|
||||
*
|
||||
* @param int $new_order_state
|
||||
* @param int $id_order
|
||||
* @param int/object $id_order
|
||||
* @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)
|
||||
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 (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)
|
||||
{
|
||||
if ($pack_product->advanced_stock_management == 1)
|
||||
|
||||
@@ -345,6 +345,11 @@ class OrderInvoiceCore extends ObjectModel
|
||||
// shipping cost are added in the product taxes breakdown
|
||||
if ($this->useOneAfterAnotherTaxComputationMethod())
|
||||
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;
|
||||
|
||||
@@ -654,9 +659,9 @@ class OrderInvoiceCore extends ObjectModel
|
||||
* @param int $id_lang for invoice_prefix
|
||||
* @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)
|
||||
|
||||
@@ -225,11 +225,12 @@ class OrderReturnCore extends ObjectModel
|
||||
public static function addReturnedQuantity(&$products, $id_order)
|
||||
{
|
||||
$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
|
||||
LEFT JOIN '._DB_PREFIX_.'order_return_detail ord
|
||||
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)
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
|
||||
$this->date = Tools::displayDate($order_invoice->date_add, (int)$this->order->id_lang);
|
||||
|
||||
$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
|
||||
$this->shop = new Shop((int)$this->order->id_shop);
|
||||
}
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ function bqSQL($string)
|
||||
function displayFatalError()
|
||||
{
|
||||
$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'];
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
|
||||
$this->_select .= 'currency_shop.conversion_rate conversion_rate';
|
||||
$this->_join .= Shop::addSqlAssociation('currency', 'a');
|
||||
$this->_group .= 'GROUP BY id_currency';
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
|
||||
@@ -644,10 +644,14 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path));
|
||||
file_put_contents($uniqid_path, $field);
|
||||
$fd = fopen($uniqid_path, 'r');
|
||||
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
|
||||
fclose($fd);
|
||||
unlink($uniqid_path);
|
||||
$tab = '';
|
||||
if(!empty($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)))
|
||||
return array();
|
||||
@@ -727,8 +731,9 @@ class AdminImportControllerCore extends AdminController
|
||||
public static function getMaskedRow($row)
|
||||
{
|
||||
$res = array();
|
||||
foreach (self::$column_mask as $type => $nb)
|
||||
$res[$type] = isset($row[$nb]) ? $row[$nb] : null;
|
||||
if (is_array(self::$column_mask))
|
||||
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.
|
||||
unset($res['id']);
|
||||
@@ -899,7 +904,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$category_to_create->name[$default_language_id],
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -972,10 +977,10 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$info['name'],
|
||||
(isset($info['id']) ? $info['id'] : 'null')
|
||||
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||
(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 != '')
|
||||
$this->errors[] = $error_tmp;
|
||||
}
|
||||
@@ -1099,7 +1104,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$manufacturer->name,
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -1130,7 +1135,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$supplier->name,
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -1176,7 +1181,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$category_to_create->name[$default_language_id],
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -1208,7 +1213,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$category_to_create->name[$default_language_id],
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -1303,10 +1308,10 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$info['name'],
|
||||
(isset($info['id']) ? $info['id'] : 'null')
|
||||
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||
(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();
|
||||
|
||||
}
|
||||
@@ -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->to = (isset($info['reduction_to']) && Validate::isDate($info['reduction_to'])) ? $info['reduction_to'] : '0000-00-00 00:00:00';
|
||||
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))
|
||||
@@ -1363,7 +1368,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$is_tag_added = Tag::addTags($key, $product->id, $tags, $this->multiple_value_separator);
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1380,7 +1385,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$is_tag_added = Tag::addTags($key, $product->id, $str, $this->multiple_value_separator);
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1445,9 +1450,12 @@ class AdminImportControllerCore extends AdminController
|
||||
$feature_name = trim($tab_feature[0]);
|
||||
$feature_value = trim($tab_feature[1]);
|
||||
$position = isset($tab_feature[2]) ? $tab_feature[2]: false;
|
||||
$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);
|
||||
if(!empty($feature_name) && !empty($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
|
||||
Feature::cleanPositions();
|
||||
@@ -1464,9 +1472,6 @@ class AdminImportControllerCore extends AdminController
|
||||
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_SEARCH_INDEXATION'))
|
||||
Search::indexation(true);
|
||||
|
||||
$this->closeCsvFile($handle);
|
||||
}
|
||||
|
||||
@@ -1511,8 +1516,12 @@ class AdminImportControllerCore extends AdminController
|
||||
$id_shop_list[] = Shop::getIdByName($shop);
|
||||
else
|
||||
$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;
|
||||
|
||||
//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'),
|
||||
(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'])
|
||||
@@ -1577,53 +1586,54 @@ class AdminImportControllerCore extends AdminController
|
||||
$id_attribute_group = 0;
|
||||
// groups
|
||||
$groups_attributes = array();
|
||||
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]))
|
||||
if(isset($info['group']))
|
||||
foreach (explode($this->multiple_value_separator, $info['group']) as $key => $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;
|
||||
}
|
||||
$tab_group = explode(':', $group);
|
||||
$group = trim($tab_group[0]);
|
||||
if (!isset($tab_group[1]))
|
||||
$type = 'select';
|
||||
else
|
||||
$this->errors[] = ($field_error !== true ? $field_error : '').($lang_field_error !== true ? $lang_field_error : '');
|
||||
|
||||
// fils groups attributes
|
||||
$id_attribute_group = $obj->id;
|
||||
$groups_attributes[$key]['id'] = $id_attribute_group;
|
||||
$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();
|
||||
$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
|
||||
$id_product_attribute = 0;
|
||||
@@ -1631,116 +1641,118 @@ class AdminImportControllerCore extends AdminController
|
||||
$attributes_to_add = array();
|
||||
|
||||
// for each 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]))
|
||||
if(isset($info['attribute']))
|
||||
foreach (explode($this->multiple_value_separator, $info['attribute']) as $key => $attribute)
|
||||
{
|
||||
$group = $groups_attributes[$key]['group'];
|
||||
if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2)
|
||||
$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]))
|
||||
{
|
||||
$id_attribute_group = $groups_attributes[$key]['id'];
|
||||
$obj = new Attribute();
|
||||
// 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)
|
||||
$group = $groups_attributes[$key]['group'];
|
||||
if (!isset($attributes[$group.'_'.$attribute]) && count($groups_attributes[$key]) == 2)
|
||||
{
|
||||
$obj->add();
|
||||
$obj->associateTo($id_shop_list);
|
||||
$attributes[$group.'_'.$attribute] = $obj->id;
|
||||
}
|
||||
else
|
||||
$this->errors[] = ($field_error !== true ? $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)
|
||||
$id_attribute_group = $groups_attributes[$key]['id'];
|
||||
$obj = new Attribute();
|
||||
// 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 && isset($groups[$group])) ? Attribute::getHigherPosition($groups[$group]) + 1 : $position;
|
||||
|
||||
if (($field_error = $obj->validateFields(UNFRIENDLY_ERROR, true)) === true &&
|
||||
($lang_field_error = $obj->validateFieldsLang(UNFRIENDLY_ERROR, true)) === true)
|
||||
{
|
||||
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(
|
||||
$id_product_attribute,
|
||||
(float)$info['wholesale_price'],
|
||||
(float)$info['price'],
|
||||
(float)$info['weight'],
|
||||
0,
|
||||
(float)$info['ecotax'],
|
||||
$id_image,
|
||||
strval($info['reference']),
|
||||
strval($info['ean13']),
|
||||
(int)$info['default_on'],
|
||||
0,
|
||||
strval($info['upc']),
|
||||
(int)$info['minimal_quantity'],
|
||||
0,
|
||||
null,
|
||||
$id_shop_list
|
||||
);
|
||||
|
||||
$id_product_attribute_update = true;
|
||||
if ($id_product_attribute && in_array($id_product_attribute, $attribute_combination))
|
||||
{
|
||||
$product->updateAttribute(
|
||||
$id_product_attribute,
|
||||
(float)$info['wholesale_price'],
|
||||
(float)$info['price'],
|
||||
(float)$info['weight'],
|
||||
0,
|
||||
(float)$info['ecotax'],
|
||||
$id_image,
|
||||
strval($info['reference']),
|
||||
strval($info['ean13']),
|
||||
(int)$info['default_on'],
|
||||
0,
|
||||
strval($info['upc']),
|
||||
(int)$info['minimal_quantity'],
|
||||
0,
|
||||
null,
|
||||
$id_shop_list
|
||||
);
|
||||
|
||||
$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();
|
||||
if (!$product->cache_default_attribute)
|
||||
@@ -1907,7 +1919,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$info['email'],
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -1954,7 +1966,7 @@ class AdminImportControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
$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();
|
||||
}
|
||||
}
|
||||
@@ -1984,7 +1996,7 @@ class AdminImportControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
$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();
|
||||
}
|
||||
}
|
||||
@@ -2053,7 +2065,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$manufacturer->name,
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -2074,7 +2086,7 @@ class AdminImportControllerCore extends AdminController
|
||||
$supplier->name,
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -2188,10 +2200,10 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$info['name'],
|
||||
(isset($info['id']) ? $info['id'] : 'null')
|
||||
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||
(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();
|
||||
}
|
||||
}
|
||||
@@ -2235,8 +2247,8 @@ class AdminImportControllerCore extends AdminController
|
||||
if (!$res)
|
||||
$this->errors[] = Db::getInstance()->getMsgError().' '.sprintf(
|
||||
Tools::displayError('%1$s (ID: %2$s) cannot be saved'),
|
||||
$info['name'],
|
||||
(isset($info['id']) ? $info['id'] : 'null')
|
||||
(isset($info['name']) ? Tools::safeOutput($info['name']) : 'No Name'),
|
||||
(isset($info['id']) ? Tools::safeOutput($info['id']) : 'No ID')
|
||||
);
|
||||
else
|
||||
{
|
||||
@@ -2263,7 +2275,7 @@ class AdminImportControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
$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);
|
||||
|
||||
@@ -215,7 +215,7 @@ class AdminLoginControllerCore extends AdminController
|
||||
'{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
|
||||
$result = $employee->update();
|
||||
|
||||
@@ -61,7 +61,7 @@ class AdminLogsControllerCore extends AdminController
|
||||
'submit' => array()
|
||||
)
|
||||
);
|
||||
|
||||
$this->list_no_link = true;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
@@ -208,6 +208,7 @@ class AdminModulesControllerCore extends AdminController
|
||||
die ('KO');
|
||||
if ($result == 'OK')
|
||||
{
|
||||
Configuration::updateValue('PS_LOGGED_ON_ADDONS', 1);
|
||||
$this->context->cookie->username_addons = pSQL(trim(Tools::getValue('username_addons')));
|
||||
$this->context->cookie->password_addons = pSQL(trim(Tools::getValue('password_addons')));
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
else
|
||||
{
|
||||
$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);
|
||||
|
||||
$varsTpl = array(
|
||||
@@ -972,7 +972,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
}
|
||||
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');
|
||||
elseif ($order->hasInvoice())
|
||||
$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)
|
||||
{
|
||||
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
|
||||
{
|
||||
$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_out_of_stock_warning = false;
|
||||
$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;
|
||||
|
||||
// products current stock (from stock_available)
|
||||
@@ -1352,7 +1352,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'invoices_collection' => $order->getInvoicesCollection(),
|
||||
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
|
||||
'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();
|
||||
@@ -1535,7 +1535,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$use_taxes = true;
|
||||
|
||||
$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
|
||||
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;
|
||||
if ($order_invoice->number)
|
||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false);
|
||||
Configuration::updateValue('PS_INVOICE_START_NUMBER', false, false, null, $order->id_shop);
|
||||
else
|
||||
$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);
|
||||
$tax_calculator = $carrier->getTaxCalculator($invoice_address);
|
||||
|
||||
@@ -1713,7 +1713,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$invoice_array = array();
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1909,14 +1909,14 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$product['quantity_refundable'] = $product['product_quantity'] - $resume['product_quantity'];
|
||||
$product['amount_refundable'] = $product['total_price_tax_incl'] - $resume['amount_tax_incl'];
|
||||
$product['amount_refund'] = Tools::displayPrice($resume['amount_tax_incl']);
|
||||
|
||||
$product['refund_history'] = OrderSlip::getProductSlipDetail($order_detail->id);
|
||||
// Get invoices collection
|
||||
$invoice_collection = $order->getInvoicesCollection();
|
||||
|
||||
$invoice_array = array();
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -2003,7 +2003,7 @@ class AdminOrdersControllerCore extends AdminController
|
||||
$invoice_array = array();
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -725,6 +725,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
$cache_active = 0;
|
||||
else
|
||||
$cache_active = 1;
|
||||
|
||||
if (!$caching_system = Tools::getValue('caching_system'))
|
||||
$this->errors[] = Tools::displayError('Caching system is missing');
|
||||
else
|
||||
@@ -733,6 +734,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
'define(\'_PS_CACHING_SYSTEM_\', \''.$caching_system.'\');',
|
||||
$new_settings
|
||||
);
|
||||
|
||||
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.').'
|
||||
<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);
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
if (!count($this->errors))
|
||||
@@ -778,8 +780,7 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit here.');
|
||||
}
|
||||
|
||||
if ($redirecAdmin)
|
||||
if ($redirecAdmin && (!isset($this->errors) || !count($this->errors)))
|
||||
Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=4');
|
||||
else
|
||||
return parent::postProcess();
|
||||
|
||||
@@ -1422,8 +1422,9 @@ class AdminProductsControllerCore extends AdminController
|
||||
if (!Image::getCover($image->id_product))
|
||||
{
|
||||
$res &= Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'image_shop` image_shop
|
||||
SET image_shop.`cover` = 1
|
||||
UPDATE `'._DB_PREFIX_.'image_shop` image_shop, '._DB_PREFIX_.'image i
|
||||
SET image_shop.`cover` = 1,
|
||||
i.cover = 1
|
||||
WHERE image_shop.`id_image` = (SELECT id_image FROM
|
||||
(SELECT image_shop.id_image
|
||||
FROM '._DB_PREFIX_.'image i'.
|
||||
@@ -1431,7 +1432,8 @@ class AdminProductsControllerCore extends AdminController
|
||||
WHERE i.id_product ='.(int)$image->id_product.' LIMIT 1
|
||||
) tmpImage)
|
||||
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'))
|
||||
|
||||
@@ -113,7 +113,7 @@ class AdminSearchConfControllerCore extends AdminController
|
||||
'title' => $this->l('Blacklisted words'),
|
||||
'size' => 35,
|
||||
'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'
|
||||
)
|
||||
),
|
||||
|
||||
@@ -202,7 +202,11 @@ class AdminSearchControllerCore extends AdminController
|
||||
global $_LANGADM;
|
||||
$tabs = 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)
|
||||
{
|
||||
$tabs[strtolower($row['class_name'])] = $row['name'];
|
||||
|
||||
@@ -604,22 +604,32 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
$global = false;
|
||||
foreach ($lines as $line)
|
||||
{
|
||||
// PHP tags
|
||||
if (in_array($line, array('<?php', '?>', '')))
|
||||
continue;
|
||||
|
||||
// Global variable declaration
|
||||
if (!$global && preg_match('/^global\s+\$([a-z0-9-_]+)\s*;$/i', $line, $matches))
|
||||
{
|
||||
$global = $matches[1];
|
||||
continue;
|
||||
}
|
||||
// Global variable initialization
|
||||
if ($global != false && preg_match('/^\$'.preg_quote($global, '/').'\s*=\s*array\(\s*\)\s*;$/i', $line))
|
||||
continue;
|
||||
|
||||
// Global variable initialization without declaration
|
||||
if (!$global && preg_match('/^\$([a-z0-9-_]+)\s*=\s*array\(\s*\)\s*;$/i', $line, $matches))
|
||||
{
|
||||
$global = $matches[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
// Assignation
|
||||
if (preg_match('/^\$'.preg_quote($global, '/').'\[\''._PS_TRANS_PATTERN_.'\'\]\s*=\s*\''._PS_TRANS_PATTERN_.'\'\s*;$/i', $line))
|
||||
continue;
|
||||
|
||||
// Sometimes the global variable is returned...
|
||||
if (preg_match('/^return\s+\$'.preg_quote($global, '/').'\s*;$/i', $line, $matches))
|
||||
continue;
|
||||
return false;
|
||||
|
||||
@@ -294,14 +294,16 @@ class AuthControllerCore extends FrontController
|
||||
$this->context->customer = $customer;
|
||||
|
||||
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);
|
||||
|
||||
// Update cart address
|
||||
$this->context->cart->id = $this->context->cookie->id_cart;
|
||||
$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 = new Cart((int)$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->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
|
||||
}
|
||||
$this->context->cart->secure_key = $customer->secure_key;
|
||||
$this->context->cart->update();
|
||||
$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);
|
||||
$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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ class OrderControllerCore extends ParentOrderController
|
||||
|
||||
// Add checking for all addresses
|
||||
$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)
|
||||
$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
|
||||
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))
|
||||
{
|
||||
// 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()
|
||||
{
|
||||
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)
|
||||
$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)
|
||||
if (!in_array($iso, $top_countries))
|
||||
|
||||
@@ -1182,6 +1182,7 @@ CREATE TABLE `PREFIX_order_cart_rule` (
|
||||
`name` varchar(254) NOT NULL,
|
||||
`value` 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`),
|
||||
KEY `id_order` (`id_order`),
|
||||
KEY `id_cart_rule` (`id_cart_rule`)
|
||||
|
||||
+86
-258
@@ -8,434 +8,262 @@
|
||||
</fields>
|
||||
<entities>
|
||||
<hook id="displayPayment" live_edit="1">
|
||||
<name>displayPayment</name>
|
||||
<title>Payment</title>
|
||||
<description/>
|
||||
<name>displayPayment</name><title>Payment</title><description>This hook displays new elements on the payment page</description>
|
||||
</hook>
|
||||
<hook id="actionValidateOrder" live_edit="0">
|
||||
<name>actionValidateOrder</name>
|
||||
<title>New orders</title>
|
||||
<description/>
|
||||
<name>actionValidateOrder</name><title>New orders</title><description/>
|
||||
</hook>
|
||||
<hook id="actionPaymentConfirmation" live_edit="0">
|
||||
<name>actionPaymentConfirmation</name>
|
||||
<title>Payment confirmation</title>
|
||||
<description/>
|
||||
<name>actionPaymentConfirmation</name><title>Payment confirmation</title><description>This hook displays new elements after the payment is validated</description>
|
||||
</hook>
|
||||
<hook id="displayPaymentReturn" live_edit="0">
|
||||
<name>displayPaymentReturn</name>
|
||||
<title>Payment return</title>
|
||||
<description/>
|
||||
<name>displayPaymentReturn</name><title>Payment return</title><description/>
|
||||
</hook>
|
||||
<hook id="actionUpdateQuantity" live_edit="0">
|
||||
<name>actionUpdateQuantity</name>
|
||||
<title>Quantity update</title>
|
||||
<description>Quantity is updated only when the customer effectively <b>place</b> his order.</description>
|
||||
<name>actionUpdateQuantity</name><title>Quantity update</title><description>Quantity is updated only when a customer effectively places their order</description>
|
||||
</hook>
|
||||
<hook id="displayRightColumn" live_edit="1">
|
||||
<name>displayRightColumn</name>
|
||||
<title>Right column blocks</title>
|
||||
<description/>
|
||||
<name>displayRightColumn</name><title>Right column blocks</title><description>This hook displays new elements in the right-hand column</description>
|
||||
</hook>
|
||||
<hook id="displayLeftColumn" live_edit="1">
|
||||
<name>displayLeftColumn</name>
|
||||
<title>Left column blocks</title>
|
||||
<description/>
|
||||
<name>displayLeftColumn</name><title>Left column blocks</title><description>This hook displays new elements in the left-hand column</description>
|
||||
</hook>
|
||||
<hook id="displayHome" live_edit="1">
|
||||
<name>displayHome</name>
|
||||
<title>Homepage content</title>
|
||||
<description/>
|
||||
<name>displayHome</name><title>Homepage content</title><description>This hook displays new elements on the homepage</description>
|
||||
</hook>
|
||||
<hook id="displayHeader" live_edit="0">
|
||||
<name>displayHeader</name>
|
||||
<title>Header of pages</title>
|
||||
<description>A hook which allow you to do things in the header of each pages</description>
|
||||
<name>displayHeader</name><title>Pages header</title><description>This hook displays additional elements in the header of your pages</description>
|
||||
</hook>
|
||||
<hook id="actionCartSave" live_edit="0">
|
||||
<name>actionCartSave</name>
|
||||
<title>Cart creation and update</title>
|
||||
<description/>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionAuthentication" live_edit="0">
|
||||
<name>actionAuthentication</name>
|
||||
<title>Successful customer authentication</title>
|
||||
<description/>
|
||||
<name>actionAuthentication</name><title>Successful customer authentication</title><description>This hook is displayed after a customer successfully signs in</description>
|
||||
</hook>
|
||||
<hook id="actionProductAdd" live_edit="0">
|
||||
<name>actionProductAdd</name>
|
||||
<title>Product creation</title>
|
||||
<description/>
|
||||
<name>actionProductAdd</name><title>Product creation</title><description>This hook is displayed after a product is created</description>
|
||||
</hook>
|
||||
<hook id="actionProductUpdate" live_edit="0">
|
||||
<name>actionProductUpdate</name>
|
||||
<title>Product Update</title>
|
||||
<description/>
|
||||
<name>actionProductUpdate</name><title>Product update</title><description>This hook is displayed after a product has been updated</description>
|
||||
</hook>
|
||||
<hook id="displayTop" live_edit="0">
|
||||
<name>displayTop</name>
|
||||
<title>Top of pages</title>
|
||||
<description>A hook which allow you to do things a the top of each pages.</description>
|
||||
<name>displayTop</name><title>Top of pages</title><description>This hook displays additional elements at the top of your pages</description>
|
||||
</hook>
|
||||
<hook id="displayRightColumnProduct" live_edit="0">
|
||||
<name>displayRightColumnProduct</name>
|
||||
<title>Extra actions on the product page (right column).</title>
|
||||
<description/>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionProductDelete" live_edit="0">
|
||||
<name>actionProductDelete</name>
|
||||
<title>Product deletion</title>
|
||||
<description>This hook is called when a product is deleted</description>
|
||||
<name>actionProductDelete</name><title>Product deletion</title><description>This hook is called when a product is deleted</description>
|
||||
</hook>
|
||||
<hook id="displayFooterProduct" live_edit="1">
|
||||
<name>displayFooterProduct</name>
|
||||
<title>Product footer</title>
|
||||
<description>Add new blocks under the product description</description>
|
||||
<name>displayFooterProduct</name><title>Product footer</title><description>This hook adds new blocks under the product's description</description>
|
||||
</hook>
|
||||
<hook id="displayInvoice" live_edit="0">
|
||||
<name>displayInvoice</name>
|
||||
<title>Invoice</title>
|
||||
<description>Add blocks to invoice (order)</description>
|
||||
<name>displayInvoice</name><title>Invoice</title><description>This hook displays new blocks on the invoice (order)</description>
|
||||
</hook>
|
||||
<hook id="actionOrderStatusUpdate" live_edit="0">
|
||||
<name>actionOrderStatusUpdate</name>
|
||||
<title>Order's status update event</title>
|
||||
<description>Launch modules when the order's status of an order change.</description>
|
||||
<name>actionOrderStatusUpdate</name><title>Order status update - Event</title><description>This hook launches modules when the status of an order changes.</description>
|
||||
</hook>
|
||||
<hook id="displayAdminOrder" live_edit="0">
|
||||
<name>displayAdminOrder</name>
|
||||
<title>Display in Back-Office, tab AdminOrder</title>
|
||||
<description>Launch modules when the tab AdminOrder is displayed on back-office.</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayFooter" live_edit="0">
|
||||
<name>displayFooter</name>
|
||||
<title>Footer</title>
|
||||
<description>Add block in footer</description>
|
||||
<name>displayFooter</name><title>Footer</title><description>This hook displays new blocks in the footer</description>
|
||||
</hook>
|
||||
<hook id="displayPDFInvoice" live_edit="0">
|
||||
<name>displayPDFInvoice</name>
|
||||
<title>PDF Invoice</title>
|
||||
<description>Allow the display of extra informations into the PDF invoice</description>
|
||||
<name>displayPDFInvoice</name><title>PDF Invoice</title><description>This hook allows you to display additional information on PDF invoices</description>
|
||||
</hook>
|
||||
<hook id="displayAdminCustomers" live_edit="0">
|
||||
<name>displayAdminCustomers</name>
|
||||
<title>Display in Back-Office, tab AdminCustomers</title>
|
||||
<description>Launch modules when the tab AdminCustomers is displayed on back-office.</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayOrderConfirmation" live_edit="0">
|
||||
<name>displayOrderConfirmation</name>
|
||||
<title>Order confirmation page</title>
|
||||
<description>Called on order confirmation page</description>
|
||||
<name>displayOrderConfirmation</name><title>Order confirmation page</title><description>This hook is called within an order's confirmation page</description>
|
||||
</hook>
|
||||
<hook id="actionCustomerAccountAdd" live_edit="0">
|
||||
<name>actionCustomerAccountAdd</name>
|
||||
<title>Successful customer create account</title>
|
||||
<description>Called when new customer create account successfuled</description>
|
||||
<name>actionCustomerAccountAdd</name><title>Successful customer account creation</title><description>This hook is called when a new customer creates an account successfully</description>
|
||||
</hook>
|
||||
<hook id="displayCustomerAccount" live_edit="0">
|
||||
<name>displayCustomerAccount</name>
|
||||
<title>Customer account page display in front office</title>
|
||||
<description>Display on page account of the customer</description>
|
||||
<name>displayCustomerAccount</name><title>Customer account displayed in Front Office</title><description>This hook displays new elements on the customer account page</description>
|
||||
</hook>
|
||||
<hook id="actionOrderSlipAdd" live_edit="0">
|
||||
<name>actionOrderSlipAdd</name>
|
||||
<title>Called when a order slip is created</title>
|
||||
<description>Called when a quantity of one product change in an order.</description>
|
||||
<name>actionOrderSlipAdd</name><title>Order slip creation</title><description>This hook is called when a product's quantity is modified</description>
|
||||
</hook>
|
||||
<hook id="displayProductTab" live_edit="0">
|
||||
<name>displayProductTab</name>
|
||||
<title>Tabs on product page</title>
|
||||
<description>Called on order product page tabs</description>
|
||||
<name>displayProductTab</name><title>Tabs on product page</title><description>This hook is called on the product page's tab</description>
|
||||
</hook>
|
||||
<hook id="displayProductTabContent" live_edit="0">
|
||||
<name>displayProductTabContent</name>
|
||||
<title>Content of tabs on product page</title>
|
||||
<description>Called on order product page tabs</description>
|
||||
<name>displayProductTabContent</name><title>Tabs content on the product page</title><description>This hook is called on the product page's tab</description>
|
||||
</hook>
|
||||
<hook id="displayShoppingCartFooter" live_edit="0">
|
||||
<name>displayShoppingCartFooter</name>
|
||||
<title>Shopping cart footer</title>
|
||||
<description>Display some specific informations on the shopping cart page</description>
|
||||
<name>displayShoppingCartFooter</name><title>Shopping cart footer</title><description>This hook displays some specific information on the shopping cart's page</description>
|
||||
</hook>
|
||||
<hook id="displayCustomerAccountForm" live_edit="0">
|
||||
<name>displayCustomerAccountForm</name>
|
||||
<title>Customer account creation form</title>
|
||||
<description>Display some information on the form to create a customer account</description>
|
||||
<name>displayCustomerAccountForm</name><title>Customer account creation form</title><description>This hook displays some information on the form to create a customer account</description>
|
||||
</hook>
|
||||
<hook id="displayAdminStatsModules" live_edit="0">
|
||||
<name>displayAdminStatsModules</name>
|
||||
<title>Stats - Modules</title>
|
||||
<description/>
|
||||
<name>displayAdminStatsModules</name><title>Stats - Modules</title><description/>
|
||||
</hook>
|
||||
<hook id="displayAdminStatsGraphEngine" live_edit="0">
|
||||
<name>displayAdminStatsGraphEngine</name>
|
||||
<title>Graph Engines</title>
|
||||
<description/>
|
||||
<name>displayAdminStatsGraphEngine</name><title>Graph engines</title><description/>
|
||||
</hook>
|
||||
<hook id="actionOrderReturn" live_edit="0">
|
||||
<name>actionOrderReturn</name>
|
||||
<title>Product returned</title>
|
||||
<description/>
|
||||
<name>actionOrderReturn</name><title>Returned product</title><description>This hook is displayed when a customer returns a product </description>
|
||||
</hook>
|
||||
<hook id="displayProductButtons" live_edit="0">
|
||||
<name>displayProductButtons</name>
|
||||
<title>Product actions</title>
|
||||
<description>Put new action buttons on product page</description>
|
||||
<name>displayProductButtons</name><title>Product page actions</title><description>This hook adds new action buttons on the product page</description>
|
||||
</hook>
|
||||
<hook id="displayBackOfficeHome" live_edit="0">
|
||||
<name>displayBackOfficeHome</name>
|
||||
<title>Administration panel homepage</title>
|
||||
<description/>
|
||||
<name>displayBackOfficeHome</name><title>Administration panel homepage</title><description>This hook is displayed on the admin panel's homepage</description>
|
||||
</hook>
|
||||
<hook id="displayAdminStatsGridEngine" live_edit="0">
|
||||
<name>displayAdminStatsGridEngine</name>
|
||||
<title>Grid Engines</title>
|
||||
<description/>
|
||||
<name>displayAdminStatsGridEngine</name><title>Grid engines</title><description/>
|
||||
</hook>
|
||||
<hook id="actionWatermark" live_edit="0">
|
||||
<name>actionWatermark</name>
|
||||
<title>Watermark</title>
|
||||
<description/>
|
||||
<name>actionWatermark</name><title>Watermark</title><description/>
|
||||
</hook>
|
||||
<hook id="actionProductCancel" live_edit="0">
|
||||
<name>actionProductCancel</name>
|
||||
<title>Product cancelled</title>
|
||||
<description>This hook is called when you cancel a product in an order</description>
|
||||
<name>actionProductCancel</name><title>Product cancelled</title><description>This hook is called when you cancel a product in an order</description>
|
||||
</hook>
|
||||
<hook id="displayLeftColumnProduct" live_edit="0">
|
||||
<name>displayLeftColumnProduct</name>
|
||||
<title>Extra actions on the product page (left column).</title>
|
||||
<description/>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionProductOutOfStock" live_edit="0">
|
||||
<name>actionProductOutOfStock</name>
|
||||
<title>Product out of stock</title>
|
||||
<description>Make action while product is out of stock</description>
|
||||
<name>actionProductOutOfStock</name><title>Out-of-stock product</title><description>This hook displays new action buttons if a product is out of stock</description>
|
||||
</hook>
|
||||
<hook id="actionProductAttributeUpdate" live_edit="0">
|
||||
<name>actionProductAttributeUpdate</name>
|
||||
<title>Product attribute update</title>
|
||||
<description/>
|
||||
<name>actionProductAttributeUpdate</name><title>Product attribute update</title><description>This hook is displayed when a product's attribute is updated</description>
|
||||
</hook>
|
||||
<hook id="displayCarrierList" live_edit="0">
|
||||
<name>displayCarrierList</name>
|
||||
<title>Extra carrier (module mode)</title>
|
||||
<description/>
|
||||
<name>displayCarrierList</name><title>Extra carrier (module mode)</title><description/>
|
||||
</hook>
|
||||
<hook id="displayShoppingCart" live_edit="0">
|
||||
<name>displayShoppingCart</name>
|
||||
<title>Shopping cart extra button</title>
|
||||
<description>Display some specific informations</description>
|
||||
<name>displayShoppingCart</name><title>Shopping cart - Additional button</title><description>This hook displays new action buttons within the shopping cart</description>
|
||||
</hook>
|
||||
<hook id="actionSearch" live_edit="0">
|
||||
<name>actionSearch</name>
|
||||
<title>Search</title>
|
||||
<description/>
|
||||
<name>actionSearch</name><title>Search</title><description/>
|
||||
</hook>
|
||||
<hook id="displayBeforePayment" live_edit="0">
|
||||
<name>displayBeforePayment</name>
|
||||
<title>Redirect in order process</title>
|
||||
<description>Redirect user to the module instead of displaying payment modules</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionCarrierUpdate" live_edit="0">
|
||||
<name>actionCarrierUpdate</name>
|
||||
<title>Carrier Update</title>
|
||||
<description>This hook is called when a carrier is updated</description>
|
||||
<name>actionCarrierUpdate</name><title>Carrier Update</title><description>This hook is called when a carrier is updated</description>
|
||||
</hook>
|
||||
<hook id="actionOrderStatusPostUpdate" live_edit="0">
|
||||
<name>actionOrderStatusPostUpdate</name>
|
||||
<title>Post update of order status</title>
|
||||
<description/>
|
||||
<name>actionOrderStatusPostUpdate</name><title>Post update of order status</title><description/>
|
||||
</hook>
|
||||
<hook id="displayCustomerAccountFormTop" live_edit="0">
|
||||
<name>displayCustomerAccountFormTop</name>
|
||||
<title>Block above the form for create an account</title>
|
||||
<description/>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayBackOfficeHeader" live_edit="0">
|
||||
<name>displayBackOfficeHeader</name>
|
||||
<title>Administration panel header</title>
|
||||
<description/>
|
||||
<name>displayBackOfficeHeader</name><title>Administration panel header</title><description>This hook is displayed in the header of the admin panel</description>
|
||||
</hook>
|
||||
<hook id="displayBackOfficeTop" live_edit="0">
|
||||
<name>displayBackOfficeTop</name>
|
||||
<title>Administration panel hover the tabs</title>
|
||||
<description/>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayBackOfficeFooter" live_edit="0">
|
||||
<name>displayBackOfficeFooter</name>
|
||||
<title>Administration panel footer</title>
|
||||
<description/>
|
||||
<name>displayBackOfficeFooter</name><title>Administration panel footer</title><description>This hook is displayed within the admin panel's footer</description>
|
||||
</hook>
|
||||
<hook id="actionProductAttributeDelete" live_edit="0">
|
||||
<name>actionProductAttributeDelete</name>
|
||||
<title>Product Attribute Deletion</title>
|
||||
<description/>
|
||||
<name>actionProductAttributeDelete</name><title>Product attribute deletion</title><description>This hook is displayed when a product's attribute is deleted</description>
|
||||
</hook>
|
||||
<hook id="actionCarrierProcess" live_edit="0">
|
||||
<name>actionCarrierProcess</name>
|
||||
<title>Carrier Process</title>
|
||||
<description/>
|
||||
<name>actionCarrierProcess</name><title>Carrier process</title><description/>
|
||||
</hook>
|
||||
<hook id="actionOrderDetail" live_edit="0">
|
||||
<name>actionOrderDetail</name>
|
||||
<title>Order Detail</title>
|
||||
<description>To set the follow-up in smarty when order detail is called</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayBeforeCarrier" live_edit="0">
|
||||
<name>displayBeforeCarrier</name>
|
||||
<title>Before carrier list</title>
|
||||
<description>This hook is display before the carrier list on Front office</description>
|
||||
<name>displayBeforeCarrier</name><title>Before carriers list</title><description>This hook is displayed before the carrier list in Front Office</description>
|
||||
</hook>
|
||||
<hook id="displayOrderDetail" live_edit="0">
|
||||
<name>displayOrderDetail</name>
|
||||
<title>Order detail displayed</title>
|
||||
<description>Displayed on order detail on front office</description>
|
||||
<name>displayOrderDetail</name><title>Order detail</title><description>This hook is displayed within the order's details in Front Office</description>
|
||||
</hook>
|
||||
<hook id="actionPaymentCCAdd" live_edit="0">
|
||||
<name>actionPaymentCCAdd</name>
|
||||
<title>Payment CC added</title>
|
||||
<description>Payment CC added</description>
|
||||
<name>actionPaymentCCAdd</name><title>Payment CC added</title><description/>
|
||||
</hook>
|
||||
<hook id="displayProductComparison" live_edit="0">
|
||||
<name>displayProductComparison</name>
|
||||
<title>Extra Product Comparison</title>
|
||||
<description>Extra Product Comparison</description>
|
||||
<name>displayProductComparison</name><title>Extra product comparison</title><description/>
|
||||
</hook>
|
||||
<hook id="actionCategoryAdd" live_edit="0">
|
||||
<name>actionCategoryAdd</name>
|
||||
<title>Category creation</title>
|
||||
<description/>
|
||||
<name>actionCategoryAdd</name><title>Category creation</title><description>This hook is displayed when a category is created</description>
|
||||
</hook>
|
||||
<hook id="actionCategoryUpdate" live_edit="0">
|
||||
<name>actionCategoryUpdate</name>
|
||||
<title>Category modification</title>
|
||||
<description/>
|
||||
<name>actionCategoryUpdate</name><title>Category modification</title><description>This hook is displayed when a category is modified</description>
|
||||
</hook>
|
||||
<hook id="actionCategoryDelete" live_edit="0">
|
||||
<name>actionCategoryDelete</name>
|
||||
<title>Category removal</title>
|
||||
<description/>
|
||||
<name>actionCategoryDelete</name><title>Category deletion</title><description>This hook is displayed when a category is deleted</description>
|
||||
</hook>
|
||||
<hook id="actionBeforeAuthentication" live_edit="0">
|
||||
<name>actionBeforeAuthentication</name>
|
||||
<title>Before Authentication</title>
|
||||
<description>Before authentication</description>
|
||||
<name>actionBeforeAuthentication</name><title>Before authentication</title><description>This hook is displayed before the customer's authentication</description>
|
||||
</hook>
|
||||
<hook id="displayPaymentTop" live_edit="0">
|
||||
<name>displayPaymentTop</name>
|
||||
<title>Top of payment page</title>
|
||||
<description>Top of payment page</description>
|
||||
<name>displayPaymentTop</name><title>Top of payment page</title><description>This hook is displayed at the top of the payment page</description>
|
||||
</hook>
|
||||
<hook id="actionHtaccessCreate" live_edit="0">
|
||||
<name>actionHtaccessCreate</name>
|
||||
<title>After htaccess creation</title>
|
||||
<description>After htaccess creation</description>
|
||||
<name>actionHtaccessCreate</name><title>After htaccess creation</title><description>This hook is displayed after the htaccess creation</description>
|
||||
</hook>
|
||||
<hook id="actionAdminMetaSave" live_edit="0">
|
||||
<name>actionAdminMetaSave</name>
|
||||
<title>After save configuration in AdminMeta</title>
|
||||
<description>After save configuration in AdminMeta</description>
|
||||
<name>actionAdminMetaSave</name><title>After saving the configuration in AdminMeta</title><description>This hook is displayed after saving the configuration in AdminMeta</description>
|
||||
</hook>
|
||||
<hook id="displayAttributeGroupForm" live_edit="0">
|
||||
<name>displayAttributeGroupForm</name>
|
||||
<title>Add fields to the form "attribute group"</title>
|
||||
<description>Add fields to the form "attribute group"</description>
|
||||
<name>displayAttributeGroupForm</name><title>Add fields to the form 'attribute group'</title><description>This hook adds fields to the form 'attribute group'</description>
|
||||
</hook>
|
||||
<hook id="actionAttributeGroupSave" live_edit="0">
|
||||
<name>actionAttributeGroupSave</name>
|
||||
<title>On saving attribute group</title>
|
||||
<description>On saving attribute group</description>
|
||||
<name>actionAttributeGroupSave</name><title>Saving an attribute group</title><description>This hook is called while saving an attributes group</description>
|
||||
</hook>
|
||||
<hook id="actionAttributeGroupDelete" live_edit="0">
|
||||
<name>actionAttributeGroupDelete</name>
|
||||
<title>On deleting attribute group</title>
|
||||
<description>On deleting attribute group</description>
|
||||
<name>actionAttributeGroupDelete</name><title>Deleting attribute group</title><description>This hook is called while deleting an attributes group</description>
|
||||
</hook>
|
||||
<hook id="displayFeatureForm" live_edit="0">
|
||||
<name>displayFeatureForm</name>
|
||||
<title>Add fields to the form "feature"</title>
|
||||
<description>Add fields to the form "feature"</description>
|
||||
<name>displayFeatureForm</name><title>Add fields to the form 'feature'</title><description>This hook adds fields to the form 'feature'</description>
|
||||
</hook>
|
||||
<hook id="actionFeatureSave" live_edit="0">
|
||||
<name>actionFeatureSave</name>
|
||||
<title>On saving attribute feature</title>
|
||||
<description>On saving attribute feature</description>
|
||||
<name>actionFeatureSave</name><title>Saving attributes' features</title><description>This hook is called while saving an attributes features</description>
|
||||
</hook>
|
||||
<hook id="actionFeatureDelete" live_edit="0">
|
||||
<name>actionFeatureDelete</name>
|
||||
<title>On deleting attribute feature</title>
|
||||
<description>On deleting attribute feature</description>
|
||||
<name>actionFeatureDelete</name><title>Deleting attributes' features</title><description>This hook is called while deleting an attributes features</description>
|
||||
</hook>
|
||||
<hook id="actionProductSave" live_edit="0">
|
||||
<name>actionProductSave</name>
|
||||
<title>On saving products</title>
|
||||
<description>On saving products</description>
|
||||
<name>actionProductSave</name><title>Saving products</title><description>This hook is called while saving products</description>
|
||||
</hook>
|
||||
<hook id="actionProductListOverride" live_edit="0">
|
||||
<name>actionProductListOverride</name>
|
||||
<title>Assign product list to a category</title>
|
||||
<description>Assign product list to a category</description>
|
||||
<name>actionProductListOverride</name><title>Assign a products list to a category</title><description>This hook assigns a products list to a category</description>
|
||||
</hook>
|
||||
<hook id="displayAttributeGroupPostProcess" live_edit="0">
|
||||
<name>displayAttributeGroupPostProcess</name>
|
||||
<title>On post-process in admin attribute group</title>
|
||||
<description>On post-process in admin attribute group</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="displayFeaturePostProcess" live_edit="0">
|
||||
<name>displayFeaturePostProcess</name>
|
||||
<title>On post-process in admin feature</title>
|
||||
<description>On post-process in admin feature</description>
|
||||
<name>displayFeaturePostProcess</name><title>On post-process in admin feature</title><description>This hook is called on post-process in admin feature</description>
|
||||
</hook>
|
||||
<hook id="displayFeatureValueForm" live_edit="0">
|
||||
<name>displayFeatureValueForm</name>
|
||||
<title>Add fields to the form "feature value"</title>
|
||||
<description>Add fields to the form "feature value"</description>
|
||||
<name>displayFeatureValueForm</name><title>Add fields to the form 'feature value'</title><description>This hook adds fields to the form 'feature value'</description>
|
||||
</hook>
|
||||
<hook id="displayFeatureValuePostProcess" live_edit="0">
|
||||
<name>displayFeatureValuePostProcess</name>
|
||||
<title>On post-process in admin feature value</title>
|
||||
<description>On post-process in admin feature value</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionFeatureValueDelete" live_edit="0">
|
||||
<name>actionFeatureValueDelete</name>
|
||||
<title>On deleting attribute feature value</title>
|
||||
<description>On deleting attribute feature value</description>
|
||||
<name>actionFeatureValueDelete</name><title>Deleting attributes' features' values</title><description>This hook is called while deleting an attributes features value</description>
|
||||
</hook>
|
||||
<hook id="actionFeatureValueSave" live_edit="0">
|
||||
<name>actionFeatureValueSave</name>
|
||||
<title>On saving attribute feature value</title>
|
||||
<description>On saving attribute feature value</description>
|
||||
<name>actionFeatureValueSave</name><title>Saving an attributes features value</title><description>This hook is called while saving an attributes features value</description>
|
||||
</hook>
|
||||
<hook id="displayAttributeForm" live_edit="0">
|
||||
<name>displayAttributeForm</name>
|
||||
<title>Add fields to the form "attribute value"</title>
|
||||
<description>Add fields to the form "attribute value"</description>
|
||||
<name>displayAttributeForm</name><title>Add fields to the form 'attribute value'</title><description>This hook adds fields to the form 'attribute value'</description>
|
||||
</hook>
|
||||
<hook id="actionAttributePostProcess" live_edit="0">
|
||||
<name>actionAttributePostProcess</name>
|
||||
<title>On post-process in admin feature value</title>
|
||||
<description>On post-process in admin feature value</description>
|
||||
<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>
|
||||
</hook>
|
||||
<hook id="actionAttributeDelete" live_edit="0">
|
||||
<name>actionAttributeDelete</name>
|
||||
<title>On deleting attribute feature value</title>
|
||||
<description>On deleting attribute feature value</description>
|
||||
<name>actionAttributeDelete</name><title>Deleting an attributes features value</title><description>This hook is called while deleting an attributes features value</description>
|
||||
</hook>
|
||||
<hook id="actionAttributeSave" live_edit="0">
|
||||
<name>actionAttributeSave</name>
|
||||
<title>On saving attribute feature value</title>
|
||||
<description>On saving attribute feature value</description>
|
||||
<name>actionAttributeSave</name><title>Saving an attributes features value</title><description>This hook is called while saving an attributes features value</description>
|
||||
</hook>
|
||||
<hook id="actionTaxManager" live_edit="0">
|
||||
<name>actionTaxManager</name>
|
||||
<title>Tax Manager Factory</title>
|
||||
<description/>
|
||||
<name>actionTaxManager</name><title>Tax Manager Factory</title><description/>
|
||||
</hook>
|
||||
<hook id="displayMyAccountBlock" live_edit="0">
|
||||
<name>displayMyAccountBlock</name>
|
||||
<title>My account block</title>
|
||||
<description>Display extra informations inside the "my account" block</description>
|
||||
<name>displayMyAccountBlock</name><title>My account block</title><description>This hook displays extra information within the 'my account' block"</description>
|
||||
</hook>
|
||||
</entities>
|
||||
</entity_hook>
|
||||
|
||||
@@ -43,31 +43,31 @@
|
||||
<field name="advanced_stock_management"/>
|
||||
</fields>
|
||||
<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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</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/>
|
||||
<location/>
|
||||
</product>
|
||||
|
||||
@@ -67,6 +67,9 @@ require_once(_PS_INSTALL_PATH_.'classes/simplexml.php');
|
||||
if (!@ini_get('date.timezone'))
|
||||
@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
|
||||
if (psinstall_get_memory_limit() < psinstall_get_octets('32M'))
|
||||
ini_set('memory_limit', '32M');
|
||||
|
||||
@@ -127,7 +127,7 @@ return array(
|
||||
'Official forum' => 'Fórum oficial',
|
||||
'Support' => 'Suporte',
|
||||
'Documentation' => 'Documentação',
|
||||
'Contact us!' => 'Entre em Contato !',
|
||||
'Contact us' => 'Entre em Contato',
|
||||
'Forum' => 'Fórum',
|
||||
'Blog' => 'Blog',
|
||||
'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',
|
||||
'Choose the installer language:' => 'Escolha a língua para instalação :',
|
||||
'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.',
|
||||
'Licenses Agreement' => 'Acordo de licenças',
|
||||
'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.',
|
||||
'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.',
|
||||
'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.',
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
'Official forum' => 'Offizielles Forum',
|
||||
'Support' => 'Support',
|
||||
'Documentation' => 'Tutotrials',
|
||||
'Contact us!' => 'Kontaktieren Sie uns! Persönlicher Support',
|
||||
'Contact us' => 'Kontaktieren Sie uns',
|
||||
'Forum' => 'Forum',
|
||||
'Blog' => 'Blog',
|
||||
'Done!' => 'Erfolgreich abgeschlossen',
|
||||
@@ -146,8 +146,8 @@
|
||||
'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',
|
||||
'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"',
|
||||
'Licenses Agreement' => 'Lizenzvertrag',
|
||||
'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"',
|
||||
'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',
|
||||
'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',
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
'Official forum' => NULL,
|
||||
'Support' => NULL,
|
||||
'Documentation' => NULL,
|
||||
'Contact us!' => '¡Contacte con nosotros!',
|
||||
'Contact us' => 'Contacte con nosotros',
|
||||
'Forum' => NULL,
|
||||
'Blog' => 'El blog',
|
||||
'Done!' => NULL,
|
||||
@@ -146,8 +146,8 @@
|
||||
'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,
|
||||
'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,
|
||||
'Licenses Agreement' => 'Contrato de Licencia',
|
||||
'PrestaShop and its community offers over %d different languages for free, directly accessible from your Back Office on the Localization tab.' => NULL,
|
||||
'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,
|
||||
'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,
|
||||
|
||||
@@ -127,7 +127,7 @@ return array(
|
||||
'Official forum' => 'Forum officiel',
|
||||
'Support' => 'Support',
|
||||
'Documentation' => 'Documentation',
|
||||
'Contact us!' => 'Nous contacter !',
|
||||
'Contact us' => 'Nous contacter',
|
||||
'Forum' => 'Forum',
|
||||
'Blog' => 'Blog',
|
||||
'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',
|
||||
'Choose the installer language:' => 'Choisissez la langue pour l\'installation :',
|
||||
'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',
|
||||
'Licenses Agreement' => 'Contrat de licences',
|
||||
'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.',
|
||||
'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.',
|
||||
'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',
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
'Official forum' => 'Forum ufficiale',
|
||||
'Support' => 'Supporto',
|
||||
'Documentation' => 'Documentazione',
|
||||
'Contact us!' => 'Contattaci!',
|
||||
'Contact us' => 'Contattaci',
|
||||
'Forum' => 'Forum',
|
||||
'Blog' => 'Il blog',
|
||||
'Done!' => 'Fatto!',
|
||||
@@ -146,8 +146,8 @@
|
||||
'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',
|
||||
'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',
|
||||
'Licenses Agreement' => 'Contratto di Licenza',
|
||||
'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',
|
||||
'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',
|
||||
'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',
|
||||
|
||||
@@ -71,6 +71,12 @@ class InstallModelDatabase extends InstallAbstractModel
|
||||
// Check if a table with same prefix already exists
|
||||
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');
|
||||
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;
|
||||
|
||||
case 1:
|
||||
|
||||
@@ -22,4 +22,9 @@ $(document).ready(function()
|
||||
else
|
||||
$('#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="<?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="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>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<div id="sheets" class="sheet shown">
|
||||
<div id="sheet_<?php echo $this->step ?>" class="sheet shown clearfix">
|
||||
<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">
|
||||
<?php foreach ($this->getSteps() as $step): ?>
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
|
||||
<!-- Did you know -->
|
||||
<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 -->
|
||||
<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;">
|
||||
<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>
|
||||
<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>
|
||||
@@ -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>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<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; ?> />
|
||||
<strong><?php echo $this->l('I agree to the above terms and conditions.') ?></strong>
|
||||
</label>
|
||||
<div>
|
||||
<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; ?> />
|
||||
<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>
|
||||
<br />
|
||||
<label>
|
||||
<input type="checkbox" name="configuration_agrement" value="1" style="vertical-align: middle;" <?php if ($this->session->configuration_agrement): ?>checked="checked"<?php endif; ?> />
|
||||
<strong><?php echo $this->l('I agree to participate in improving the solution by sending anonymous information about my configuration.') ?></strong>
|
||||
</label>
|
||||
</p>
|
||||
<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; ?> />
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<?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';
|
||||
|
||||
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` (
|
||||
`id_tab_module_preference` int(11) NOT NULL auto_increment,
|
||||
`id_employee` int(11) NOT NULL,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ $(document).ready(function() {
|
||||
$('a').each(function() {
|
||||
var href = this.href;
|
||||
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 (search.length == 0)
|
||||
|
||||
@@ -183,7 +183,8 @@ class LoyaltyDefaultModuleFrontController extends ModuleFrontController
|
||||
'page' => ((int)Tools::getValue('p') > 0 ? (int)Tools::getValue('p') : 1),
|
||||
'nbpagination' => ((int)Tools::getValue('n') > 0 ? (int)Tools::getValue('n') : 10),
|
||||
'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 */
|
||||
|
||||
@@ -123,7 +123,8 @@ class StatsForecast extends Module
|
||||
$dataTable[$row['fix_date']] = $row;
|
||||
|
||||
$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>
|
||||
<form id="granularity" action="'.Tools::safeOutput($ru).'#granularity" method="post">
|
||||
<input type="hidden" name="submitGranularity" value="1" />
|
||||
@@ -300,30 +301,28 @@ class StatsForecast extends Module
|
||||
</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">
|
||||
<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">
|
||||
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $visitors), 2).' % <img src="../modules/'.$this->name.'/next.png">
|
||||
</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; 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>
|
||||
<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>';
|
||||
<div class="separation"></div>
|
||||
<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">
|
||||
<img src="../modules/'.$this->name.'/next.png"> '.round(100 * $orders / max(1, $visitors), 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>
|
||||
<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');
|
||||
$to = strtotime($employee->stats_date_to.' 23:59:59');
|
||||
@@ -332,7 +331,10 @@ class StatsForecast extends Module
|
||||
|
||||
$this->_html .= '
|
||||
<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" >
|
||||
<input type="hidden" name="submitIdZone" value="1" />
|
||||
'.$this->l('Zone:').' <select name="stats_id_zone" onchange="this.form.submit();">
|
||||
@@ -490,7 +492,7 @@ class StatsForecast extends Module
|
||||
WHERE l.active = 1';
|
||||
$languages = Db::getInstance()->executeS($sql);
|
||||
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, ',');
|
||||
|
||||
if ($langValues)
|
||||
@@ -516,18 +518,18 @@ class StatsForecast extends Module
|
||||
$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
|
||||
'.$join.'
|
||||
WHERE o.valid = 1
|
||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
'.$where.'
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
'.$where.'
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
GROUP BY o.module
|
||||
ORDER BY total DESC';
|
||||
$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
|
||||
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
|
||||
@@ -539,7 +541,7 @@ class StatsForecast extends Module
|
||||
ORDER BY total DESC';
|
||||
$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
|
||||
LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency
|
||||
'.$join.'
|
||||
@@ -551,7 +553,7 @@ class StatsForecast extends Module
|
||||
ORDER BY total DESC';
|
||||
$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
|
||||
WHERE o.valid = 1
|
||||
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
|
||||
|
||||
+2
-5
@@ -191,12 +191,9 @@
|
||||
{assign var="shipping_discount_tax_incl" value="0"}
|
||||
{foreach $cart_rules as $cart_rule}
|
||||
{cycle values='#FFF,#DDD' assign=bgcolor}
|
||||
<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>
|
||||
<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}5{else}4{/if}">{$cart_rule.name}</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}
|
||||
- {$cart_rule.value_tax_excl}
|
||||
{else}
|
||||
|
||||
@@ -46,7 +46,6 @@ var countriesNeedZipCode = new Array();
|
||||
$(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);
|
||||
{rdelim});
|
||||
{if $vat_management}
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
@@ -62,7 +61,6 @@ $(function(){ldelim}
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
{/if}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -104,13 +102,7 @@ $(function(){ldelim}
|
||||
<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}" />
|
||||
</p>
|
||||
{if $vat_display == 2}
|
||||
<div id="vat_area">
|
||||
{elseif $vat_display == 1}
|
||||
<div id="vat_area" style="display: none;">
|
||||
{else}
|
||||
<div style="display: none;">
|
||||
{/if}
|
||||
<div id="vat_area">
|
||||
<div id="vat_number">
|
||||
<p class="text">
|
||||
<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);
|
||||
{rdelim});
|
||||
//]]>
|
||||
{if $vat_management}
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
});
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number').show();
|
||||
else
|
||||
$('#vat_number').hide();
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
{/if}
|
||||
vat_number();
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number').show();
|
||||
else
|
||||
$('#vat_number').hide();
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
<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 #login_form fieldset {
|
||||
height: 200px
|
||||
min-height: 200px
|
||||
}
|
||||
|
||||
#authentication #create-account_form .form_content,
|
||||
@@ -977,7 +977,8 @@ table#cart_summary .gift-icon {
|
||||
width:220px;/* 230 */
|
||||
border:1px solid #ccc;
|
||||
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,
|
||||
|
||||
@@ -35,18 +35,13 @@ function updateAddressesDisplay(first_view)
|
||||
{
|
||||
// update content of delivery address
|
||||
updateAddressDisplay('delivery');
|
||||
|
||||
var txtInvoiceTitle = "";
|
||||
|
||||
try{
|
||||
var adrs_titles = getAddressesTitles();
|
||||
txtInvoiceTitle = adrs_titles.invoice;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
{}
|
||||
// update content of invoice address
|
||||
//if addresses have to be equals...
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if(!first_view)
|
||||
{
|
||||
if (orderProcess === 'order')
|
||||
@@ -82,15 +76,15 @@ function updateAddressDisplay(addressType)
|
||||
if (formatedAddressFieldsValuesList.length <= 0)
|
||||
return false;
|
||||
|
||||
var idAddress = $('#id_address_' + addressType + '').val();
|
||||
buildAddressBlock(idAddress, addressType, $('#address_'+ addressType));
|
||||
var idAddress = parseInt($('#id_address_' + addressType + '').val());
|
||||
buildAddressBlock(idAddress, addressType, $('#address_' + addressType));
|
||||
|
||||
// change update link
|
||||
var link = $('ul#address_' + addressType + ' li.address_update a').attr('href');
|
||||
var expression = /id_address=\d+/;
|
||||
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);
|
||||
}
|
||||
resizeAddressesBox();
|
||||
@@ -98,41 +92,43 @@ function updateAddressDisplay(addressType)
|
||||
|
||||
function updateAddresses()
|
||||
{
|
||||
var idAddress_delivery = $('#id_address_delivery').val();
|
||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : $('#id_address_invoice').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: baseUri + '?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
data: {
|
||||
processAddress: true,
|
||||
step: 2,
|
||||
ajax: 'true',
|
||||
controller: 'order',
|
||||
'multi-shipping': $('#id_address_delivery:hidden').length,
|
||||
id_address_delivery: idAddress_delivery,
|
||||
id_address_invoice: idAddress_invoice,
|
||||
token: static_token
|
||||
},
|
||||
success: function(jsonData)
|
||||
{
|
||||
if (jsonData.hasError)
|
||||
var idAddress_delivery = parseInt($('#id_address_delivery').val());
|
||||
var idAddress_invoice = $('input[type=checkbox]#addressesAreEquals:checked').length === 1 ? idAddress_delivery : parseInt($('#id_address_invoice').val());
|
||||
|
||||
if(isNaN(idAddress_delivery) == false && isNaN(idAddress_invoice) == false)
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: baseUri + '?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "json",
|
||||
data: {
|
||||
processAddress: true,
|
||||
step: 2,
|
||||
ajax: 'true',
|
||||
controller: 'order',
|
||||
'multi-shipping': $('#id_address_delivery:hidden').length,
|
||||
id_address_delivery: idAddress_delivery,
|
||||
id_address_invoice: idAddress_invoice,
|
||||
token: static_token
|
||||
},
|
||||
success: function(jsonData)
|
||||
{
|
||||
var errors = '';
|
||||
for(var error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
if(error !== 'indexOf')
|
||||
errors += jsonData.errors[error] + "\n";
|
||||
alert(errors);
|
||||
if (jsonData.hasError)
|
||||
{
|
||||
var errors = '';
|
||||
for(var error in jsonData.errors)
|
||||
//IE6 bug fix
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -305,9 +305,9 @@ function saveAddress(type)
|
||||
params += 'phone='+encodeURIComponent($('#phone'+(type === 'invoice' ? '_invoice' : '')).val())+'&';
|
||||
params += 'phone_mobile='+encodeURIComponent($('#phone_mobile'+(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())+'&';
|
||||
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())+'&';
|
||||
// Clean the last &
|
||||
params = params.substr(0, params.length-1);
|
||||
|
||||
@@ -51,23 +51,21 @@ countriesNeedZipCode = new Array();
|
||||
$(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');
|
||||
{rdelim});
|
||||
{if $vat_management}
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
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}
|
||||
{/if}
|
||||
//]]>
|
||||
</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');
|
||||
{rdelim});
|
||||
//]]>
|
||||
{if $vat_management}
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
});
|
||||
{literal}
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number').show();
|
||||
else
|
||||
$('#vat_number').hide();
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
{/if}
|
||||
vat_number();
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number').show();
|
||||
else
|
||||
$('#vat_number').hide();
|
||||
}
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{assign var='stateExist' value=false}
|
||||
@@ -77,4 +75,4 @@ $(function(){ldelim}
|
||||
{include file="./authentication-choice.tpl"}
|
||||
{else}
|
||||
{include file="./authentication-create-account.tpl"}
|
||||
{/if}
|
||||
{/if}
|
||||
@@ -71,35 +71,33 @@
|
||||
{/foreach}
|
||||
{/if}
|
||||
//]]>
|
||||
{if $vat_management}
|
||||
{literal}
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number_block').show();
|
||||
else
|
||||
$('#vat_number_block').hide();
|
||||
}
|
||||
function vat_number_invoice()
|
||||
{
|
||||
if ($('#company_invoice').val() != '')
|
||||
$('#vat_number_block_invoice').show();
|
||||
else
|
||||
$('#vat_number_block_invoice').hide();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
});
|
||||
$('#company_invoice').blur(function(){
|
||||
vat_number_invoice();
|
||||
});
|
||||
{literal}
|
||||
function vat_number()
|
||||
{
|
||||
if ($('#company').val() != '')
|
||||
$('#vat_number_block').show();
|
||||
else
|
||||
$('#vat_number_block').hide();
|
||||
}
|
||||
function vat_number_invoice()
|
||||
{
|
||||
if ($('#company_invoice').val() != '')
|
||||
$('#vat_number_block_invoice').show();
|
||||
else
|
||||
$('#vat_number_block_invoice').hide();
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#company').blur(function(){
|
||||
vat_number();
|
||||
});
|
||||
$('#company_invoice').blur(function(){
|
||||
vat_number_invoice();
|
||||
});
|
||||
{/literal}
|
||||
{/if}
|
||||
vat_number();
|
||||
vat_number_invoice();
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
<!-- Error return block -->
|
||||
<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>
|
||||
</tr>
|
||||
{/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}
|
||||
{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}>
|
||||
<tr class="cart_total_voucher" {if $total_wrapping == 0}style="display:none"{/if}>
|
||||
<td colspan="5">
|
||||
{if $use_taxes}
|
||||
{if $priceDisplay}
|
||||
@@ -144,25 +120,54 @@
|
||||
{else}
|
||||
{if $use_taxes}
|
||||
{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 class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
|
||||
</tr>
|
||||
{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 class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{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 class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
|
||||
</tr>
|
||||
{/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 $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">
|
||||
<td colspan="5" id="cart_voucher" class="cart_voucher">
|
||||
{if $voucherAllowed}
|
||||
|
||||
@@ -100,23 +100,6 @@
|
||||
<td colspan="2" class="price" id="total_product">{displayPrice price=$total_products}</td>
|
||||
</tr>
|
||||
{/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}>
|
||||
<td colspan="5">
|
||||
{if $use_taxes}
|
||||
@@ -162,6 +145,27 @@
|
||||
</tr>
|
||||
{/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}
|
||||
<tr class="cart_total_price">
|
||||
<td colspan="5">{l s='Total (tax excl.):'}</td>
|
||||
|
||||
@@ -43,11 +43,11 @@ class Hook extends HookCore
|
||||
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();
|
||||
$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::$hookMemoryUsage[$hook_name] = memory_get_usage() - $memoryUsage;
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user