Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release

This commit is contained in:
Jerome Nadaud
2013-10-03 09:12:01 +02:00
26 changed files with 211 additions and 135 deletions
@@ -38,6 +38,11 @@
var defaults_order_state = new Array();
var customization_errors = false;
var pic_dir = '{$pic_dir}';
var currency_format = 5;
var currency_sign = '';
var currency_blank = false;
var priceDisplayPrecision = 2;
{foreach from=$defaults_order_state key='module' item='id_order_state'}
defaults_order_state['{$module}'] = '{$id_order_state}';
{/foreach}
@@ -505,7 +510,6 @@
}
displaySummary(res);
resetBind();
updateCurrencySign();
}
});
}
@@ -652,11 +656,12 @@
var id_product = Number(this.id_product);
var id_product_attribute = Number(this.id_product_attribute);
cart_quantity[Number(this.id_product)+'_'+Number(this.id_product_attribute)+'_'+Number(this.id_customization)] = this.cart_quantity;
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" size="7" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="'+this.price+'" />&nbsp;<span class="currency_sign"></span></td><td>';
cart_content += '<tr><td><img src="'+this.image_link+'" title="'+this.name+'" /></td><td>'+this.name+'<br />'+this.attributes_small+'</td><td>'+this.reference+'</td><td><input type="text" size="7" rel="'+this.id_product+'_'+this.id_product_attribute+'" class="product_unit_price" value="' + formatCurrency(parseFloat(this.price.replace(',', '.')), currency_format, currency_sign, currency_blank) + '" /></td><td>';
cart_content += (!this.id_customization ? '<div style="float:left;"><a href="#" class="increaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/up.gif" /></a><br /><a href="#" class="decreaseqty_product" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'"><img src="../img/admin/down.gif" /></a></div>' : '');
cart_content += (!this.id_customization ? '<div style="float:left;"><input type="text" rel="'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" class="cart_quantity" size="2" value="'+this.cart_quantity+'" />' : '');
cart_content += (!this.id_customization ? '<a href="#" class="delete_product" rel="delete_'+this.id_product+'_'+this.id_product_attribute+'_'+(this.id_customization ? this.id_customization : 0)+'" ><img src="../img/admin/delete.gif" /></a></div>' : '');
cart_content += '</td><td>'+this.total+'&nbsp;<span class="currency_sign"></span></td></tr>';
cart_content += '</td><td>' + formatCurrency(parseFloat(this.total.replace(',', '.')), currency_format, currency_sign, currency_blank) + '</td></tr>';
if (this.id_customization && this.id_customization != 0)
{
$.each(this.customized_datas[this.id_product][this.id_product_attribute][id_address_delivery], function() {
@@ -712,6 +717,11 @@
function displaySummary(jsonSummary)
{
currency_format = jsonSummary.currency.format;
currency_sign = jsonSummary.currency.sign;
currency_blank = jsonSummary.currency.blank;
priceDisplayPrecision = jsonSummary.currency.decimals ? 2 : 0;
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products, jsonSummary.cart.id_address_delivery);
updateCartVouchers(jsonSummary.summary.discounts);
updateAddressesList(jsonSummary.addresses, jsonSummary.cart.id_address_delivery, jsonSummary.cart.id_address_invoice);
@@ -737,20 +747,19 @@
$('#free_shipping').removeAttr('checked');
$('#gift_message').html(jsonSummary.cart.gift_message);
if(!changed_shipping_price)
$('#shipping_price').html('<b>'+jsonSummary.summary.total_shipping+'</b>');
if (!changed_shipping_price)
$('#shipping_price').html('<b>' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + '</b>');
shipping_price_selected_carrier = jsonSummary.summary.total_shipping;
$('#total_vouchers').html(jsonSummary.summary.total_discounts_tax_exc);
$('#total_shipping').html(jsonSummary.summary.total_shipping_tax_exc);
$('#total_taxes').html(jsonSummary.summary.total_tax);
$('#total_without_taxes').html(jsonSummary.summary.total_price_without_tax);
$('#total_with_taxes').html(jsonSummary.summary.total_price);
$('#total_products').html(jsonSummary.summary.total_products);
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank));
$('#total_shipping').html(formatCurrency(parseFloat(jsonSummary.summary.total_shipping_tax_exc.replace(',', '.')), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax.replace(',', '.')), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax.replace(',', '.')), currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price.replace(',', '.')), currency_format, currency_sign, currency_blank));
$('#total_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_products.replace(',', '.')), currency_format, currency_sign, currency_blank));
id_currency = jsonSummary.cart.id_currency;
$('#id_currency option').removeAttr('selected');
$('#id_currency option[value="'+id_currency+'"]').attr('selected', true);
updateCurrencySign();
id_lang = jsonSummary.cart.id_lang;
$('#id_lang option').removeAttr('selected');
$('#id_lang option[value="'+id_lang+'"]').attr('selected', true);
@@ -778,21 +787,21 @@
qty: qty,
id_customer: id_customer,
id_cart: id_cart,
},
},
success : function(res)
{
displaySummary(res);
var errors = '';
if(res.errors.length)
{
$.each(res.errors, function() {
errors += this+'<br />';
});
$('#products_err').show();
}
else
$('#products_err').hide();
$('#products_err').html(errors);
displaySummary(res);
var errors = '';
if (res.errors.length)
{
$.each(res.errors, function() {
errors += this + '<br />';
});
$('#products_err').show();
}
else
$('#products_err').hide();
$('#products_err').html(errors);
}
});
}
@@ -888,11 +897,6 @@
});
}
function updateCurrencySign()
{
$('.currency_sign').html(currencies[id_currency]);
}
function sendMailToCustomer()
{
$.ajax({
@@ -1184,7 +1188,7 @@
</select>
</p>
<p>
<label for="shipping_price">{l s='Shipping price'}</label> <span id="shipping_price" name="shipping_price"></span>&nbsp;<span class="currency_sign"></span>&nbsp;
<label for="shipping_price">{l s='Shipping price'}</label> <span id="shipping_price" name="shipping_price"></span>
</p>
<p>
<label for="free_shipping">{l s='Free shipping'}</label>
@@ -1208,12 +1212,12 @@
<div id="send_email_feedback"></div>
<div id="cart_summary" style="clear:both;float:left;">
<ul>
<li><span class="total_cart">{l s='Total products'}</span><span id="total_products"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total vouchers'}</span><span id="total_vouchers"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total shipping'}</span><span id="total_shipping"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total taxes'}</span><span id="total_taxes"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total without taxes'}</span><span id="total_without_taxes"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total with taxes'}</span><span id="total_with_taxes"></span><span class="currency_sign"></span></li>
<li><span class="total_cart">{l s='Total products'}</span><span id="total_products"></span></li>
<li><span class="total_cart">{l s='Total vouchers'}</span><span id="total_vouchers"></span></li>
<li><span class="total_cart">{l s='Total shipping'}</span><span id="total_shipping"></span></li>
<li><span class="total_cart">{l s='Total taxes'}</span><span id="total_taxes"></span></li>
<li><span class="total_cart">{l s='Total without taxes'}</span><span id="total_without_taxes"></span></li>
<li><span class="total_cart">{l s='Total with taxes'}</span><span id="total_with_taxes"></span></li>
</ul>
</div>
<div class="order_message_right">
@@ -41,7 +41,7 @@
<div class="margin-form">
<select id="id_category" name="id_category">
{foreach from=$categories item='category'}
<option value="{$category.id_category}">{$category.name}</option>
<option value="{$category.id_category|intval}">({$category.id_category|intval}) {$category.name}</option>
{/foreach}
</select>
<a class="button bt-icon" href="#" id="add_condition_category">
+2 -1
View File
@@ -340,6 +340,7 @@ class CartCore extends ObjectModel
'.($filter == CartRule::FILTER_ACTION_SHIPPING ? 'AND free_shipping = 1' : '').'
'.($filter == CartRule::FILTER_ACTION_GIFT ? 'AND gift_product != 0' : '').'
'.($filter == CartRule::FILTER_ACTION_REDUCTION ? 'AND (reduction_percent != 0 OR reduction_amount != 0)' : '')
.' ORDER by cr.priority ASC'
);
Cache::store($cache_key, $result);
}
@@ -1260,7 +1261,7 @@ class CartCore extends ObjectModel
return true;
}
public static function getTotalCart($id_cart, $use_tax_display = false, $type = CART::BOTH)
public static function getTotalCart($id_cart, $use_tax_display = false, $type = Cart::BOTH)
{
$cart = new Cart($id_cart);
if (!Validate::isLoadedObject($cart))
+9 -3
View File
@@ -399,6 +399,8 @@ abstract class PaymentModuleCore extends Module
} // end foreach ($products)
$cart_rules_list = '';
$total_reduction_value_ti = 0;
$total_reduction_value_tex = 0;
foreach ($cart_rules as $cart_rule)
{
$package = array('id_carrier' => $order->id_carrier, 'id_address' => $order->id_address_delivery, 'products' => $order->product_list);
@@ -419,7 +421,8 @@ abstract class PaymentModuleCore extends Module
** THEN
** The voucher is cloned with a new value corresponding to the remainder
*/
if (count($order_list) == 1 && $values['tax_incl'] > $order->total_products_wt && $cart_rule['obj']->partial_use == 1 && $cart_rule['obj']->reduction_amount > 0)
if (count($order_list) == 1 && $values['tax_incl'] > ($order->total_products_wt - $total_reduction_value_ti) && $cart_rule['obj']->partial_use == 1 && $cart_rule['obj']->reduction_amount > 0)
{
// Create a new voucher from the original
$voucher = new CartRule($cart_rule['obj']->id); // We need to instantiate the CartRule without lang parameter to allow saving it
@@ -432,9 +435,9 @@ abstract class PaymentModuleCore extends Module
// Set the new voucher value
if ($voucher->reduction_tax)
$voucher->reduction_amount = $values['tax_incl'] - $order->total_products_wt - ($voucher->free_shipping == 1 ? $order->total_shipping_tax_incl : 0);
$voucher->reduction_amount = $values['tax_incl'] - ($order->total_products_wt - $total_reduction_value_ti) - ($voucher->free_shipping == 1 ? $order->total_shipping_tax_incl : 0);
else
$voucher->reduction_amount = $values['tax_excl'] - $order->total_products - ($voucher->free_shipping == 1 ? $order->total_shipping_tax_excl : 0);
$voucher->reduction_amount = $values['tax_excl'] - ($order->total_products - $total_reduction_value_tex) - ($voucher->free_shipping == 1 ? $order->total_shipping_tax_excl : 0);
$voucher->id_customer = $order->id_customer;
$voucher->quantity = 1;
@@ -466,7 +469,10 @@ abstract class PaymentModuleCore extends Module
$values['tax_incl'] -= $values['tax_incl'] - $order->total_products_wt;
$values['tax_excl'] -= $values['tax_excl'] - $order->total_products;
}
$total_reduction_value_ti += $values['tax_incl'];
$total_reduction_value_tex += $values['tax_excl'];
$order->addCartRule($cart_rule['obj']->id, $cart_rule['obj']->name, $values, 0, $cart_rule['obj']->free_shipping);
+2 -2
View File
@@ -1368,8 +1368,8 @@ class ProductCore extends ObjectModel
}
$product_supplier->product_supplier_reference = pSQL($supplier_reference);
$product_supplier->product_supplier_price_te = (float)$price;
$product_supplier->id_currency = (int)$id_currency;
$product_supplier->product_supplier_price_te = !is_null($price) ? (float)$price : (float)$product_supplier->product_supplier_price_te;
$product_supplier->id_currency = !is_null($id_currency) ? (int)$id_currency : (int)$product_supplier->id_currency;
$product_supplier->save();
}
}
+1 -1
View File
@@ -229,7 +229,7 @@ class SpecificPriceCore extends ObjectModel
(`to` = \'0000-00-00 00:00:00\' OR \''.$now.'\' <= `to`)
)
AND id_cart IN (0, '.(int)$id_cart.')'.
(($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.(int)$real_quantity).'
(($real_quantity != 0 && !Configuration::get('PS_QTY_DISCOUNT_ON_COMBINATION')) ? ' AND IF(`from_quantity` > 1, `from_quantity`, 0) <= IF(id_product_attribute=0,'.(int)$quantity.' ,'.(int)$real_quantity.')' : 'AND `from_quantity` <= '.max(1, (int)$real_quantity)).'
ORDER BY `id_product_attribute` DESC, `from_quantity` DESC, `id_specific_price_rule` ASC, `score` DESC');
}
return self::$_specificPriceCache[$key];
+6 -3
View File
@@ -2167,8 +2167,7 @@ class AdminControllerCore extends Controller
$order_by = $this->fields_list[$order_by]['order_key'];
/* Determine offset from current page */
if (isset($this->context->cookie->{$this->list_id.'_page'}))
$start = $this->context->cookie->{$this->list_id.'_page'};
if ((isset($_POST['submitFilter'.$this->list_id]) ||
isset($_POST['submitFilter'.$this->list_id.'_x']) ||
@@ -2176,8 +2175,12 @@ class AdminControllerCore extends Controller
!empty($_POST['submitFilter'.$this->list_id]) &&
is_numeric($_POST['submitFilter'.$this->list_id]))
$start = ((int)$_POST['submitFilter'.$this->list_id] - 1) * $limit;
elseif (empty($start) && isset($this->context->cookie->{$this->list_id.'_start'}) && Tools::isSubmit('export'.$this->table))
$start = $this->context->cookie->{$this->list_id.'_start'};
else
$start = $this->_listTotal;
$this->context->cookie->{$this->list_id.'_page'} = $start;
$this->context->cookie->{$this->list_id.'_start'} = $start;
/* Cache */
$this->_lang = (int)$id_lang;
+15 -12
View File
@@ -684,18 +684,21 @@ class AdminCartsControllerCore extends AdminController
$free_shipping = true;
break;
}
return array('summary' => $this->getCartSummary(),
'delivery_option_list' => $this->getDeliveryOptionList(),
'cart' => $this->context->cart,
'addresses' => $this->context->customer->getAddresses((int)$this->context->cart->id_lang),
'id_cart' => $id_cart,
'order_message' => $message_content,
'link_order' => $this->context->link->getPageLink(
'order', false,
(int)$this->context->cart->id_lang,
'step=3&recover_cart='.$id_cart.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)),
'free_shipping' => (int)$free_shipping
);
return array(
'summary' => $this->getCartSummary(),
'delivery_option_list' => $this->getDeliveryOptionList(),
'cart' => $this->context->cart,
'currency' => new Currency($this->context->cart->id_currency),
'addresses' => $this->context->customer->getAddresses((int)$this->context->cart->id_lang),
'id_cart' => $id_cart,
'order_message' => $message_content,
'link_order' => $this->context->link->getPageLink(
'order', false,
(int)$this->context->cart->id_lang,
'step=3&recover_cart='.$id_cart.'&token_cart='.md5(_COOKIE_KEY_.'recover_cart_'.$id_cart)
),
'free_shipping' => (int)$free_shipping
);
}
public function initToolbar()
+104 -64
View File
@@ -670,7 +670,8 @@ class AdminImportControllerCore extends AdminController
$fd = fopen($uniqid_path, 'r');
$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);
fclose($fd);
unlink($uniqid_path);
if (file_exists($uniqid_path))
@unlink($uniqid_path);
}
if (empty($tab) || (!is_array($tab)))
@@ -1269,7 +1270,7 @@ class AdminImportControllerCore extends AdminController
$product->id_category_default = isset($product->id_category[0]) ? (int)$product->id_category[0] : '';
$link_rewrite = (is_array($product->link_rewrite) && count($product->link_rewrite)) ? trim($product->link_rewrite[$id_lang]) : '';
$link_rewrite = (is_array($product->link_rewrite) && isset($product->link_rewrite[$id_lang])) ? trim($product->link_rewrite[$id_lang]) : '';
$valid_link = Validate::isLinkRewrite($link_rewrite);
@@ -1394,31 +1395,67 @@ class AdminImportControllerCore extends AdminController
}
// SpecificPrice (only the basic reduction feature is supported by the import)
if ((isset($info['reduction_price']) && $info['reduction_price'] > 0) || (isset($info['reduction_percent']) && $info['reduction_percent'] > 0))
{
$specific_price = new SpecificPrice();
$specific_price->id_product = (int)$product->id;
// @todo multishop specific price import
$specific_price->id_shop = $this->context->shop->id;
$specific_price->id_currency = 0;
$specific_price->id_country = 0;
$specific_price->id_group = 0;
$specific_price->price = -1;
$specific_price->id_customer = 0;
$specific_price->from_quantity = 1;
$specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? $info['reduction_price'] : $info['reduction_percent'] / 100;
$specific_price->reduction_type = (isset($info['reduction_price']) && $info['reduction_price']) ? 'amount' : 'percentage';
$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(Tools::safeOutput($info['name']), $product->id, $this->l('Discount is invalid'));
}
if (!Shop::isFeatureActive())
$info['shop'] = 1;
elseif (!isset($info['shop']) || empty($info['shop']))
$info['shop'] = implode($this->multiple_value_separator, Shop::getContextListShopID());
// Get shops for each attributes
$info['shop'] = explode($this->multiple_value_separator, $info['shop']);
$id_shop_list = array();
foreach ($info['shop'] as $shop)
if (!is_numeric($shop))
$id_shop_list[] = (int)Shop::getIdByName($shop);
else
$id_shop_list[] = $shop;
if ((isset($info['reduction_price']) && $info['reduction_price'] > 0) || (isset($info['reduction_percent']) && $info['reduction_percent'] > 0))
foreach($id_shop_list as $id_shop)
{
$specific_price = SpecificPrice::getSpecificPrice($product->id, $id_shop, 0, 0, 0, 1, 0, 0, 0, 0);
if (is_array($specific_price))
$specific_price = new SpecificPrice((int)$specific_price['id_specific_price']);
else
$specific_price = new SpecificPrice();
$specific_price->id_product = (int)$product->id;
$specific_price->id_specific_price_rule = 0;
$specific_price->id_shop = $id_shop;
$specific_price->id_currency = 0;
$specific_price->id_country = 0;
$specific_price->id_group = 0;
$specific_price->price = -1;
$specific_price->id_customer = 0;
$specific_price->from_quantity = 1;
$specific_price->reduction = (isset($info['reduction_price']) && $info['reduction_price']) ? $info['reduction_price'] : $info['reduction_percent'] / 100;
$specific_price->reduction_type = (isset($info['reduction_price']) && $info['reduction_price']) ? 'amount' : 'percentage';
$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->save())
$this->addProductWarning(Tools::safeOutput($info['name']), $product->id, $this->l('Discount is invalid'));
}
if (isset($product->tags) && !empty($product->tags))
{
if (isset($product->id) && $product->id)
{
$tags = Tag::getProductTags($product->id);
if (is_array($tags) && count($tags))
{
if (!empty($product->tags))
$product->tags = explode($this->multiple_value_separator, $product->tags);
if (is_array($product->tags) && count($product->tags))
{
foreach ($product->tags as $key => $tag)
$product->tags[$key] = trim($tag);
$tags[$id_lang] = $product->tags;
$product->tags = $tags;
}
}
}
// Delete tags for this id product, for no duplicating error
Tag::deleteTagsForProduct($product->id);
if (!is_array($product->tags))
{
$product->tags = AdminImportController::createMultiLangField($product->tags);
@@ -1771,8 +1808,9 @@ class AdminImportControllerCore extends AdminController
null,
$id_shop_list
);
$id_product_attribute_update = true;
if (isset($info['supplier_reference']) && !empty($info['supplier_reference']))
$product->addSupplierReference($product->id_supplier, $id_product_attribute, $info['supplier_reference']);
}
}
}
@@ -1798,8 +1836,10 @@ class AdminImportControllerCore extends AdminController
(int)$info['minimal_quantity'],
$id_shop_list
);
if (isset($info['supplier_reference']) && !empty($info['supplier_reference']))
$product->addSupplierReference($product->id_supplier, $id_product_attribute, $info['supplier_reference']);
}
// 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];
@@ -2610,37 +2650,37 @@ class AdminImportControllerCore extends AdminController
unlink(_PS_CAT_IMG_DIR_.$d);
break;
case $this->entities[$this->l('Products')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_shop');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_carrier');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'cart_product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'compare_product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_shop`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'feature_product`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_lang`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'category_product`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_tag`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_lang`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'image_shop`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'specific_price_priority`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_carrier`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'cart_product`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'compare_product`');
if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.'favorite_product\' '))) //check if table exist
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'favorite_product');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attachment');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_country_tax');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_download');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_group_reduction_cache');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_sale');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_supplier');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'scene_products');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'warehouse_product_location');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_available');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_mvt');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization_field');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supply_order_detail');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'favorite_product`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attachment`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_country_tax`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_download`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_group_reduction_cache`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_sale`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_supplier`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'scene_products`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'warehouse_product_location`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_available`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'stock_mvt`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customization_field`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supply_order_detail`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`');
@@ -2651,7 +2691,7 @@ class AdminImportControllerCore extends AdminController
break;
case $this->entities[$this->l('Combinations')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_impact`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_lang`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'attribute_group_lang`');
@@ -2661,26 +2701,26 @@ class AdminImportControllerCore extends AdminController
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_shop`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_combination`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'product_attribute_image`');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'stock_available` WHERE id_product_attribute !=0');
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'stock_available` WHERE id_product_attribute != 0');
break;
case $this->entities[$this->l('Customers')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'customer`');
break;
case $this->entities[$this->l('Addresses')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'address`');
break;
case $this->entities[$this->l('Manufacturers')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_shop');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_lang`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'manufacturer_shop`');
foreach (scandir(_PS_MANU_IMG_DIR_) as $d)
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
unlink(_PS_MANU_IMG_DIR_.$d);
break;
case $this->entities[$this->l('Suppliers')]:
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_shop');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_lang`');
Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'supplier_shop`');
foreach (scandir(_PS_SUPP_IMG_DIR_) as $d)
if (preg_match('/^[0-9]+(\-(.*))?\.jpg$/', $d))
unlink(_PS_SUPP_IMG_DIR_.$d);
@@ -44,7 +44,7 @@ class AdminInvoicesControllerCore extends AdminController
),
'PS_INVOICE_TAXES_BREAKDOWN' => array(
'title' => $this->l('Enable the breakdown of taxes on the invoice:'),
'desc' => $this->l('Enable the breakdown of taxes on the invoice when there are computed (like in QC)'),
'desc' => $this->l('Show a breakdown of taxes by tax rate on the invoice when there are several taxes combined'),
'cast' => 'intval',
'type' => 'bool'
),
+5 -3
View File
@@ -2,8 +2,8 @@
return array(
'informations' => array(
'phone' => '+1 888.947.6543',
'support' => 'https://www.prestashop.com/pt/support',
'blog' => 'http://www.prestashop.com/blog/pt/'
'support' => 'https://www.prestashop.com/pt/support',
'blog' => 'http://www.prestashop.com/blog/pt/',
),
'translations' => array(
'menu_welcome' => 'Escolha seu idioma',
@@ -247,5 +247,7 @@ return array(
'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Para instalar o PrestaShop, você precisa ter JavaScript ativado no seu navegador',
'To enjoy the many features that are offered for free by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.' => 'Para aproveitar os muitos recursos que são oferecidos grátis pelo PrestaShop, por favor, leia os termos de licença abaixo. O núcleo do PrestaShop é licenciado sob OSL 3.0, enquanto os módulos e temas são licenciados sob AFL 3.0.',
'For security purposes, you must delete the "install" folder.' => 'Por questões de segurança, você deve deletar a pasta "install"',
'Files' => 'Arquivos',
'All files are not successfuly uploaded on your server' => 'Todos os arquivos não foram carregados no seu servidor com sucesso',
),
);
);
+11
View File
@@ -234,5 +234,16 @@ return array(
'PrestaShop compatibility with your system environment has been verified!' => 'Die Kompatibilität von PrestaShop mit Ihrem System wurde überprüft!',
'PrestaShop requires at least 32M of memory to run, please check the memory_limit directive in php.ini or contact your host provider' => 'Damit PrestaShop einwandfrei funktionieren kann, werden mindestens 32M Speicher benötigt. Bitte überprüfen Sie die memory_limit directive in php.in oder kontaktieren Sie Ihrem Provider.',
'Your PHP sessions path is not writable - check with your hosting provider:' => 'Der Speicherungsordner ist nicht beschreibbar - bitte kontaktieren Sie Ihren Provider',
'Database is created' => 'Datenbank erstellt',
'Cannot create the database automatically' => 'Datenbank kann nicht automatisch erstellt werden',
'Install modules Addons' => 'Module Addons installieren',
'Files' => 'Dateien',
'All files are not successfuly uploaded on your server' => 'Es wurden nicht alle Dateien erfolgreich auf Ihren Server hochgeladen',
'Attempt to create the database automatically' => 'Versuchen, die Datenbank automatisch zu erstellen.',
'Country:' => 'Land:',
'Must be letters and numbers with at least 8 characters' => 'Zulässig sind Buchstaben und Nummern. Mindestens 8 Zeichen.',
'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'JavaScript muss in Ihrem Browser aktiviert sein, um PrestaShop zu installieren.',
'To enjoy the many features that are offered for free by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.' => 'Um all die Vorteile zu nutzen, die Ihnen Prestashop bietet, lesen sie bitte die folgenden Bedingungen. Der PrestaShop ist unter OSL 3.0 lizensiert, die Module und Themen unter AFL 3.0.',
'For security purposes, you must delete the "install" folder.' => 'For security purposes, you must delete the "install" folder. - Aus Sicherheitsgründen sollten Sie das Verzeichnis “install” unbedingt löschen.',
),
);
+5 -3
View File
@@ -2,8 +2,8 @@
return array(
'informations' => array(
'phone' => '+34 917.872.909',
'support' => 'https://www.prestashop.com/es/support',
'blog' => 'http://www.prestashop.com/blog/es/'
'support' => 'https://www.prestashop.com/es/support',
'blog' => 'http://www.prestashop.com/blog/es/',
),
'translations' => array(
'menu_welcome' => 'Elegir el idioma',
@@ -246,5 +246,7 @@ return array(
'To enjoy the many features that are offered for free by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.' => 'Para disfrutar de las numerosas funcionalidades ofrecidas de forma gratuita por PrestaShop, por favor lea los términos de la licencia a continuación. Core PrestaShop está disponible bajo la licencia OSL 3.0, mientras que los módulos y los temas están licenciados bajo la AFL 3.0.',
'For security purposes, you must delete the "install" folder.' => 'Por razones de seguridad, debe eliminar la carpeta "install".',
'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation',
'Files' => 'Ficheros',
'All files are not successfuly uploaded on your server' => 'Todos los ficheros no se han subido correctamente al servidor',
),
);
);
+2
View File
@@ -248,5 +248,7 @@ return array(
'Must be letters and numbers with at least 8 characters' => 'Lettres et chiffres avec au moins 8 caractères',
'To install PrestaShop, you need to have JavaScript enabled in your browser.' => 'Pour installer PrestaShop, vous devez avoir JavaScript activé dans votre navigateur',
'For security purposes, you must delete the "install" folder.' => 'Pour des raisons de sécurité, vous devez supprimer le dossier "install" manuellement.',
'Files' => 'Fichiers',
'All files are not successfuly uploaded on your server' => 'Tous les fichiers n\'ont pas été correctement téléchargés sur votre serveur',
),
);
+5 -3
View File
@@ -2,8 +2,8 @@
return array(
'informations' => array(
'phone' => '+33 (0)1.40.18.30.04',
'support' => 'https://www.prestashop.com/ru/support',
'blog' => 'http://www.prestashop.com/blog/ru/'
'support' => 'https://www.prestashop.com/ru/support',
'blog' => 'http://www.prestashop.com/blog/ru/',
),
'translations' => array(
'An SQL error occured for entity <i>%1$s</i>: <i>%2$s</i>' => 'В SQL произошла ошибка для значения <i>%1$s</i>: <i>%2$s</i>',
@@ -242,5 +242,7 @@ return array(
'To enjoy the many features that are offered for free by PrestaShop, please read the license terms below. PrestaShop core is licensed under OSL 3.0, while the modules and themes are licensed under AFL 3.0.' => 'Чтобы пользоваться всем функционалом PrestaShop, прочтите лицензионное соглашение. Ядро PrestaShop разработано на OSL 3.0, модули и темы - на AFL 3.0.',
'For security purposes, you must delete the "install" folder.' => 'В целях безопасности, удалите папку "install\'.',
'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation' => 'http://doc.prestashop.com/display/PS15/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation',
'Files' => 'Файлы',
'All files are not successfuly uploaded on your server' => 'Все файлы успешно загружены на ваш сервер',
),
);
);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.