diff --git a/admin-dev/themes/default/template/controllers/orders/form.tpl b/admin-dev/themes/default/template/controllers/orders/form.tpl index e0a57766d..6f3ea7ac4 100755 --- a/admin-dev/themes/default/template/controllers/orders/form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/form.tpl @@ -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 += ''+this.name+'
'+this.attributes_small+''+this.reference+' '; + cart_content += ''+this.name+'
'+this.attributes_small+''+this.reference+''; cart_content += (!this.id_customization ? '

' : ''); cart_content += (!this.id_customization ? '
' : ''); cart_content += (!this.id_customization ? '
' : ''); - cart_content += ''+this.total+' '; + cart_content += '' + formatCurrency(parseFloat(this.total.replace(',', '.')), currency_format, currency_sign, currency_blank) + ''; + 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(''+jsonSummary.summary.total_shipping+''); + if (!changed_shipping_price) + $('#shipping_price').html('' + formatCurrency(parseFloat(jsonSummary.summary.total_shipping), currency_format, currency_sign, currency_blank) + ''); 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+'
'; - }); - $('#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 + '
'; + }); + $('#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 @@

-    +

@@ -1208,12 +1212,12 @@

diff --git a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl index 5e8d4e00d..98e1aeda6 100755 --- a/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl @@ -41,7 +41,7 @@
diff --git a/classes/Cart.php b/classes/Cart.php index 71b9eaee4..4ad99456e 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -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)) diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 022e580ec..9d638ecd3 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -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); diff --git a/classes/Product.php b/classes/Product.php index 8715487ca..b43e19015 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -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(); } } diff --git a/classes/SpecificPrice.php b/classes/SpecificPrice.php index d5fcb2725..ca3795f41 100644 --- a/classes/SpecificPrice.php +++ b/classes/SpecificPrice.php @@ -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]; diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php index e15777173..00ddd5964 100644 --- a/classes/controller/AdminController.php +++ b/classes/controller/AdminController.php @@ -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; diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index b4c5bf35c..32e01834a 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -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() diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index f144a3aaa..4087f8c6c 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -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); diff --git a/controllers/admin/AdminInvoicesController.php b/controllers/admin/AdminInvoicesController.php index b242bde0b..11a285f75 100644 --- a/controllers/admin/AdminInvoicesController.php +++ b/controllers/admin/AdminInvoicesController.php @@ -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' ), diff --git a/install-dev/langs/br/install.php b/install-dev/langs/br/install.php index ab4e5715b..a397797ce 100644 --- a/install-dev/langs/br/install.php +++ b/install-dev/langs/br/install.php @@ -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', ), -); +); \ No newline at end of file diff --git a/install-dev/langs/de/install.php b/install-dev/langs/de/install.php index b39302665..5b56f894d 100644 --- a/install-dev/langs/de/install.php +++ b/install-dev/langs/de/install.php @@ -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.', ), ); \ No newline at end of file diff --git a/install-dev/langs/es/install.php b/install-dev/langs/es/install.php index cb7234192..2375e9b89 100644 --- a/install-dev/langs/es/install.php +++ b/install-dev/langs/es/install.php @@ -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', ), -); +); \ No newline at end of file diff --git a/install-dev/langs/fr/install.php b/install-dev/langs/fr/install.php index c4a31b4f5..068e83d6d 100644 --- a/install-dev/langs/fr/install.php +++ b/install-dev/langs/fr/install.php @@ -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', ), ); \ No newline at end of file diff --git a/install-dev/langs/ru/install.php b/install-dev/langs/ru/install.php index cfa04da4a..395fe5f71 100644 --- a/install-dev/langs/ru/install.php +++ b/install-dev/langs/ru/install.php @@ -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 %1$s: %2$s' => 'В SQL произошла ошибка для значения %1$s: %2$s', @@ -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' => 'Все файлы успешно загружены на ваш сервер', ), -); +); \ No newline at end of file diff --git a/translations/bn.gzip b/translations/bn.gzip new file mode 100644 index 000000000..0d336d16f Binary files /dev/null and b/translations/bn.gzip differ diff --git a/translations/br.gzip b/translations/br.gzip index 8c1772ee4..92c5bb35a 100644 Binary files a/translations/br.gzip and b/translations/br.gzip differ diff --git a/translations/de.gzip b/translations/de.gzip index bafdfd1b9..4bd16991b 100644 Binary files a/translations/de.gzip and b/translations/de.gzip differ diff --git a/translations/en.gzip b/translations/en.gzip index a43fe55a1..e9ba5fcc8 100644 Binary files a/translations/en.gzip and b/translations/en.gzip differ diff --git a/translations/es.gzip b/translations/es.gzip index 1dffffe1c..1ec593a4c 100644 Binary files a/translations/es.gzip and b/translations/es.gzip differ diff --git a/translations/fr.gzip b/translations/fr.gzip index 733390e04..960058ab7 100644 Binary files a/translations/fr.gzip and b/translations/fr.gzip differ diff --git a/translations/id.gzip b/translations/id.gzip new file mode 100644 index 000000000..25d189943 Binary files /dev/null and b/translations/id.gzip differ diff --git a/translations/it.gzip b/translations/it.gzip index 96285a813..e65baa38e 100644 Binary files a/translations/it.gzip and b/translations/it.gzip differ diff --git a/translations/nl.gzip b/translations/nl.gzip index bb17d5865..bc1773e7e 100644 Binary files a/translations/nl.gzip and b/translations/nl.gzip differ diff --git a/translations/pl.gzip b/translations/pl.gzip index f38d6f128..dcda93941 100644 Binary files a/translations/pl.gzip and b/translations/pl.gzip differ diff --git a/translations/ru.gzip b/translations/ru.gzip index 1af1cb113..7746c7683 100644 Binary files a/translations/ru.gzip and b/translations/ru.gzip differ