From dedc59f1db1f3745211f32e57ab07b47bb7bc821 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 23 Sep 2013 15:10:44 +0200 Subject: [PATCH 001/119] [-] IN : FIX #PSCFV-10246 errors in stricts sql-mode, thanks @enumag --- install-dev/upgrade/php/p15012_add_missing_columns.php | 3 +++ install-dev/upgrade/sql/1.5.0.2.sql | 4 ++-- install-dev/upgrade/sql/1.5.0.6.sql | 4 ++-- install-dev/upgrade/sql/1.5.1.0.sql | 2 +- install-dev/upgrade/sql/1.5.3.0.sql | 2 +- install-dev/upgrade/sql/1.5.3.1.sql | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/install-dev/upgrade/php/p15012_add_missing_columns.php b/install-dev/upgrade/php/p15012_add_missing_columns.php index 21dce2f94..66977b3b1 100755 --- a/install-dev/upgrade/php/p15012_add_missing_columns.php +++ b/install-dev/upgrade/php/p15012_add_missing_columns.php @@ -111,6 +111,9 @@ function p15012_add_missing_columns() $q_list['order_invoice']['note']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_invoice` CHANGE `note` note text'; + $q_list['order_payment']['id_order_payment']['mod'] = 'UPDATE `'._DB_PREFIX_.'order_payment` + SET `id_order_invoice` = 0 WHERE `id_order_invoice` LIKE "" OR `id_order_invoice` IS NULL'; + $q_list['order_payment']['id_order_invoice']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_payment` CHANGE `id_order_invoice` id_order_invoice int(10) unsigned DEFAULT NULL'; diff --git a/install-dev/upgrade/sql/1.5.0.2.sql b/install-dev/upgrade/sql/1.5.0.2.sql index e42871126..0d7ec1a63 100755 --- a/install-dev/upgrade/sql/1.5.0.2.sql +++ b/install-dev/upgrade/sql/1.5.0.2.sql @@ -345,11 +345,11 @@ INSERT INTO `PREFIX_order_invoice` (`id_order`, `number`, `total_discount_tax_ex ALTER TABLE `PREFIX_tab` ADD `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1'; UPDATE `PREFIX_order_detail` od -SET od.`id_order_invoice` = ( +SET od.`id_order_invoice` = IFNULL(( SELECT oi.`id_order_invoice` FROM `PREFIX_order_invoice` oi WHERE oi.`id_order` = od.`id_order` -); +), 0); INSERT INTO `PREFIX_order_carrier` (`id_order`, `id_carrier`, `id_order_invoice`, `weight`, `shipping_cost_tax_excl`, `shipping_cost_tax_incl`, `tracking_number`, `date_add`) ( SELECT `id_order`, `id_carrier`, ( diff --git a/install-dev/upgrade/sql/1.5.0.6.sql b/install-dev/upgrade/sql/1.5.0.6.sql index f03bc0be2..29bcb05b7 100644 --- a/install-dev/upgrade/sql/1.5.0.6.sql +++ b/install-dev/upgrade/sql/1.5.0.6.sql @@ -1,11 +1,11 @@ SET NAMES 'utf8'; UPDATE `PREFIX_orders` o -SET o.`current_state` = ( +SET o.`current_state` = IFNULL(( SELECT oh.`id_order_state` FROM `PREFIX_order_history` oh WHERE oh.`id_order` = o.`id_order` ORDER BY oh.`date_add` DESC LIMIT 1 -); +), 0); diff --git a/install-dev/upgrade/sql/1.5.1.0.sql b/install-dev/upgrade/sql/1.5.1.0.sql index b365cf584..035ef027d 100644 --- a/install-dev/upgrade/sql/1.5.1.0.sql +++ b/install-dev/upgrade/sql/1.5.1.0.sql @@ -12,7 +12,7 @@ INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALU ALTER TABLE `PREFIX_product` CHANGE `width` `width` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `height` `height` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `depth` `depth` DECIMAL(20, 6) NOT NULL DEFAULT '0', CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_product_attribute` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_product_attribute_shop` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; -ALTER TABLE `PREFIX_order_carrier` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; +ALTER IGNORE TABLE `PREFIX_order_carrier` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_attribute_impact` CHANGE `weight` `weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_order_detail` CHANGE `product_weight` `product_weight` DECIMAL(20, 6) NOT NULL DEFAULT '0'; ALTER TABLE `PREFIX_stock_available` DROP INDEX `product_sqlstock`; diff --git a/install-dev/upgrade/sql/1.5.3.0.sql b/install-dev/upgrade/sql/1.5.3.0.sql index abc00ff4a..2f8108f90 100644 --- a/install-dev/upgrade/sql/1.5.3.0.sql +++ b/install-dev/upgrade/sql/1.5.3.0.sql @@ -24,7 +24,7 @@ INSERT INTO `PREFIX_configuration`(`name`, `value`, `date_add`, `date_upd`) VALU ALTER TABLE `PREFIX_order_cart_rule` CHANGE `name` `name` VARCHAR(254); -ALTER TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; +ALTER IGNORE TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; ALTER TABLE `PREFIX_currency_shop` ADD `conversion_rate` DECIMAL( 13, 6 ) NOT NULL; UPDATE `PREFIX_currency_shop` a SET `conversion_rate` = (SELECT `conversion_rate` FROM `PREFIX_currency` b WHERE a.id_currency = b.id_currency); diff --git a/install-dev/upgrade/sql/1.5.3.1.sql b/install-dev/upgrade/sql/1.5.3.1.sql index 381567a73..4146e75a1 100644 --- a/install-dev/upgrade/sql/1.5.3.1.sql +++ b/install-dev/upgrade/sql/1.5.3.1.sql @@ -2,4 +2,4 @@ SET NAMES 'utf8'; /* PHP:p1531_redirect_type(); */; -ALTER TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT NOT NULL; +ALTER IGNORE TABLE `PREFIX_cart` CHANGE `delivery_option` `delivery_option` TEXT NOT NULL; From 92382e347c8245532daf1fec983cd6f3b4b72822 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 23 Sep 2013 16:08:44 +0200 Subject: [PATCH 002/119] [-] FO : Fix bug #PSCFV-10478 could not see auto added cart rule voucher on product page --- modules/blockcart/ajax-cart.js | 14 +++--- .../default/modules/blockcart/blockcart.tpl | 46 ++++++++----------- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index 6f1da33a4..a6d2e8272 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -398,8 +398,7 @@ var ajaxCart = { else { $('#vouchers tbody').html(''); - - for (i=0;i 0) { @@ -408,15 +407,14 @@ var ajaxCart = { delete_link = ''+delete_txt+''; $('#vouchers tbody').append($( '' - +' 1x' - +' '+jsonData.discounts[i].name+'' - +' -'+jsonData.discounts[i].price+'' - +' ' + delete_link + '' - +'' + + '1x' + + ''+jsonData.discounts[i].name+'' + + '-'+jsonData.discounts[i].price+'' + + '' + delete_link + '' + + '' )); } } - $('#vouchers').show(); } diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl index 53e3a7c23..119433012 100644 --- a/themes/default/modules/blockcart/blockcart.tpl +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -22,17 +22,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA *} - - -{* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *} - -{if $ajax_allowed} {/if} - - -

@@ -92,7 +84,6 @@ var generated_date = {$smarty.now|intval};

{$product.attributes_small} {/if} - {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])} {if !isset($product.attributes_small)}
{/if} @@ -110,31 +101,35 @@ var generated_date = {$smarty.now|intval}; {if !isset($product.attributes_small)}
{/if} {/if} - {if isset($product.attributes_small)}{/if} - {/foreach} {/if}

{l s='No products' mod='blockcart'}

- {if $discounts|@count > 0} {foreach from=$discounts item=discount} {if $discount.value_real > 0} - - - - - - + + + + + + + + {/if} + {foreachelse}{* W3C and cart rule vouchers *} + + + + + {/foreach} - {/if}

{$shipping_cost} {l s='Shipping' mod='blockcart'} @@ -172,5 +167,4 @@ var generated_date = {$smarty.now|intval};

- - + \ No newline at end of file From 84dc75f57e49b2e494168ba327b89dfab8d8d4a5 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 23 Sep 2013 16:32:38 +0200 Subject: [PATCH 003/119] [-] CORE : Fix bug #PSCFV-10471 Cart item count problem, unique_id grouping error for id_product and id_product_attribute --- classes/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index d19fb0ab0..83d4b8be0 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -429,7 +429,7 @@ class CartCore extends ObjectModel product_shop.`available_for_order`, product_shop.`price`, product_shop.`active`, product_shop.`unity`, product_shop.`unit_price_ratio`, stock.`quantity` AS quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, p.`weight`, p.`date_add`, p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, - CONCAT(cp.`id_product`, IFNULL(cp.`id_product_attribute`, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, + CONCAT(LPAD(cp.`id_product`, 10, 0), LPAD(IFNULL(cp.`id_product_attribute`, 0), 10, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, product_shop.`wholesale_price`, product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference'); // Build FROM @@ -497,7 +497,7 @@ class CartCore extends ObjectModel p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity' ); $result = Db::getInstance()->executeS($sql); - +d($result); // Reset the cache before the following return, or else an empty cart will add dozens of queries $products_ids = array(); $pa_ids = array(); From 3b075e049bc25b3d069ea00f9a275eff1fb5e3c2 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 23 Sep 2013 16:33:44 +0200 Subject: [PATCH 004/119] // bad commit --- classes/Cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Cart.php b/classes/Cart.php index 83d4b8be0..71b9eaee4 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -497,7 +497,7 @@ class CartCore extends ObjectModel p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity' ); $result = Db::getInstance()->executeS($sql); -d($result); + // Reset the cache before the following return, or else an empty cart will add dozens of queries $products_ids = array(); $pa_ids = array(); From 5c4de83e91661741ac5cef05af145912ea312825 Mon Sep 17 00:00:00 2001 From: djfm Date: Mon, 23 Sep 2013 15:20:26 +0000 Subject: [PATCH 005/119] // no quotes around 1 in js=1 please --- .../default/template/controllers/import/helpers/view/view.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl index a7c20b5d8..97abf07a2 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/view/view.tpl @@ -25,7 +25,7 @@ {extends file="helpers/view/view.tpl"} {block name="override_tpl"}
From 8c1240cb2c940a10140abc277fa2de828d047128 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 26 Sep 2013 15:13:34 +0200 Subject: [PATCH 039/119] [-] BO : Sort import files in select --- controllers/admin/AdminImportController.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 8d8b81c6b..2aefb235c 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -2553,9 +2553,6 @@ class AdminImportControllerCore extends AdminController protected static function usortFiles($a, $b) { - $a = strrev(substr(strrev($a), 0, 14)); - $b = strrev(substr(strrev($b), 0, 14)); - if ($a == $b) return 0; From d3ad12e5362669b2c317522812992a13a08f35ce Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 26 Sep 2013 17:40:33 +0200 Subject: [PATCH 040/119] [*] BO : Add csv file download in AdminImport --- .../controllers/import/helpers/form/form.tpl | 38 +++++++++++------- controllers/admin/AdminImportController.php | 39 +++++++++++++++++-- 2 files changed, 59 insertions(+), 18 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl index c867b6c6d..1b7f2fe2c 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl @@ -67,20 +67,30 @@ Uplaod{l s='Upload'}
- {l s='Click to view our sample import csv files.'} - + +
+ {l s='Click to view your csv files.'} + +
 
diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 2aefb235c..0f06fa577 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -513,7 +513,7 @@ class AdminImportControllerCore extends AdminController $this->context->cookie->entity_selected = (int)Tools::getValue('entity'); - if ($csv_selected = Tools::getValue('csv')) + if (Tools::getValue('csv')) $this->context->cookie->csv_selected = Tools::getValue('csv'); $this->tpl_view_vars = array( @@ -2555,7 +2555,6 @@ class AdminImportControllerCore extends AdminController { if ($a == $b) return 0; - return ($a < $b) ? 1 : -1; } @@ -2700,6 +2699,7 @@ class AdminImportControllerCore extends AdminController if (Tools::isSubmit('submitFileUpload')) { + $path = _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'; if (isset($_FILES['file']) && !empty($_FILES['file']['error'])) { switch ($_FILES['file']['error']) @@ -2726,12 +2726,15 @@ class AdminImportControllerCore extends AdminController } } else if (!file_exists($_FILES['file']['tmp_name']) || - !@move_uploaded_file($_FILES['file']['tmp_name'], _PS_ADMIN_DIR_.'/import/'.date('Ymdhis').'-'.$_FILES['file']['name'])) + !@move_uploaded_file($_FILES['file']['tmp_name'], $path.$_FILES['file']['name'])) $this->errors[] = $this->l('An error occurred while uploading / copying the file.'); else + { + @chmod($path.$_FILES['file']['name'], 0664); Tools::redirectAdmin(self::$currentIndex.'&token='.Tools::getValue('token').'&conf=18'); + } } - else if (Tools::getValue('import')) + elseif (Tools::getValue('import')) { // Check if the CSV file exist if (Tools::getValue('csv')) @@ -2795,7 +2798,35 @@ class AdminImportControllerCore extends AdminController else $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); } + elseif($filename = Tools::getValue('csvfilename')) + { + $filename = base64_decode($filename); + $file = _PS_ADMIN_DIR_.'/import/'.basename($filename); + if (!empty($filename) && file_exists($file)) + { + $bName = basename($filename); + $bName = explode('.', $bName); + $bName = strtolower($bName[count($bName) - 1]); + $mimeTypes = array('csv' => 'text/csv'); + if (isset($mimeTypes[$bName])) + $mimeType = $mimeTypes[$bName]; + else + $mimeType = 'application/octet-stream'; + + if (ob_get_level()) + ob_end_clean(); + + header('Content-Transfer-Encoding: binary'); + header('Content-Type: '.$mimeType); + header('Content-Length: '.filesize($file)); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + $fp = fopen($file, 'rb'); + while (!feof($fp)) + echo fgets($fp, 16384); + } + exit; + } parent::postProcess(); } From 4fc4ee721ee559980c1caf9b8f5d2130f827095b Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 26 Sep 2013 17:50:26 +0200 Subject: [PATCH 041/119] [*] BO : Adminimport, check csv download path --- controllers/admin/AdminImportController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 0f06fa577..95e0ab6bf 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -2802,6 +2802,8 @@ class AdminImportControllerCore extends AdminController { $filename = base64_decode($filename); $file = _PS_ADMIN_DIR_.'/import/'.basename($filename); + if (realpath(dirname($file)) != _PS_ADMIN_DIR_.'/import') + exit(); if (!empty($filename) && file_exists($file)) { $bName = basename($filename); From 98148cfe03ab14a264e2834bc364ef2ee70ff539 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 26 Sep 2013 18:02:28 +0200 Subject: [PATCH 042/119] // Adminimport revert sort order in select --- controllers/admin/AdminImportController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 95e0ab6bf..c2ec23f9e 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -2555,7 +2555,7 @@ class AdminImportControllerCore extends AdminController { if ($a == $b) return 0; - return ($a < $b) ? 1 : -1; + return ($b < $a) ? 1 : -1; } protected function openCsvFile() From 50bd3d613d7a3bd5bf793a6d8302bf1dc416db2a Mon Sep 17 00:00:00 2001 From: djfm Date: Thu, 26 Sep 2013 16:29:40 +0000 Subject: [PATCH 043/119] // fix PSCFV-8260, currency format containing spaces and RTL languages --- classes/Tools.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/classes/Tools.php b/classes/Tools.php index 9a68d7685..343eb070b 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -494,6 +494,20 @@ class ToolsCore if (($is_negative = ($price < 0))) $price *= -1; $price = Tools::ps_round($price, $c_decimals); + + /* + * If the language is RTL and the selected currency format contains spaces as thousands separator + * then the number will be printed in reverse since the space is interpreted as separating words. + * To avoid this we replace the currency format containing a space with the one containing a comma (,) as thousand + * separator when the language is RTL. + * + * TODO: This is not ideal, a currency format should probably be tied to a language, not to a currency. + */ + if(($c_format == 2) && ($context->language->is_rtl == 1)) + { + $c_format = 4; + } + switch ($c_format) { /* X 0,000.00 */ From 126c21d39a9462336acb71aca3460597d5218683 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Thu, 26 Sep 2013 18:34:18 +0200 Subject: [PATCH 044/119] [*] BO : AdminImport, remove csv files --- .../controllers/import/helpers/form/form.tpl | 3 +- controllers/admin/AdminImportController.php | 50 ++++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl index 1b7f2fe2c..8f43ea1d8 100644 --- a/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/import/helpers/form/form.tpl @@ -87,7 +87,8 @@ {l s='Click to view your csv files.'} diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index c2ec23f9e..0c8fe2920 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -2798,36 +2798,40 @@ class AdminImportControllerCore extends AdminController else $this->errors[] = $this->l('You must upload a file in order to proceed to the next step'); } - elseif($filename = Tools::getValue('csvfilename')) + elseif ($filename = Tools::getValue('csvfilename')) { $filename = base64_decode($filename); $file = _PS_ADMIN_DIR_.'/import/'.basename($filename); if (realpath(dirname($file)) != _PS_ADMIN_DIR_.'/import') exit(); - if (!empty($filename) && file_exists($file)) + if (!empty($filename)) { $bName = basename($filename); - $bName = explode('.', $bName); - $bName = strtolower($bName[count($bName) - 1]); - $mimeTypes = array('csv' => 'text/csv'); - - if (isset($mimeTypes[$bName])) - $mimeType = $mimeTypes[$bName]; - else - $mimeType = 'application/octet-stream'; - - if (ob_get_level()) - ob_end_clean(); - - header('Content-Transfer-Encoding: binary'); - header('Content-Type: '.$mimeType); - header('Content-Length: '.filesize($file)); - header('Content-Disposition: attachment; filename="'.$filename.'"'); - $fp = fopen($file, 'rb'); - while (!feof($fp)) - echo fgets($fp, 16384); - } - exit; + if ($delete = Tools::getValue('delete') && file_exists($file)) + @unlink($file); + elseif (file_exists($file)) + { + $bName = explode('.', $bName); + $bName = strtolower($bName[count($bName) - 1]); + $mimeTypes = array('csv' => 'text/csv'); + + if (isset($mimeTypes[$bName])) + $mimeType = $mimeTypes[$bName]; + else + $mimeType = 'application/octet-stream'; + if (ob_get_level()) + ob_end_clean(); + + header('Content-Transfer-Encoding: binary'); + header('Content-Type: '.$mimeType); + header('Content-Length: '.filesize($file)); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + $fp = fopen($file, 'rb'); + while (is_resource($fp) && !feof($fp)) + echo fgets($fp, 16384); + exit; + } + } } parent::postProcess(); } From 4e472fae50e6d56967e55f2bb650c290f11188b7 Mon Sep 17 00:00:00 2001 From: djfm Date: Fri, 27 Sep 2013 07:16:23 +0000 Subject: [PATCH 045/119] // updated Indonesian installer --- install-dev/langs/id/data/carrier.xml | 6 +- install-dev/langs/id/data/category.xml | 10 +- install-dev/langs/id/data/cms.xml | 55 +++--- install-dev/langs/id/data/cms_category.xml | 8 +- install-dev/langs/id/data/configuration.xml | 18 +- install-dev/langs/id/data/contact.xml | 8 +- install-dev/langs/id/data/gender.xml | 8 +- install-dev/langs/id/data/group.xml | 8 +- install-dev/langs/id/data/meta.xml | 156 +++++++++--------- .../langs/id/data/order_return_state.xml | 22 +-- install-dev/langs/id/data/order_state.xml | 48 +++--- install-dev/langs/id/data/profile.xml | 4 +- install-dev/langs/id/data/quick_access.xml | 12 +- install-dev/langs/id/data/risk.xml | 10 +- .../langs/id/data/stock_mvt_reason.xml | 32 ++-- .../langs/id/data/supplier_order_state.xml | 26 +-- .../langs/id/data/supply_order_state.xml | 26 +-- 17 files changed, 227 insertions(+), 230 deletions(-) diff --git a/install-dev/langs/id/data/carrier.xml b/install-dev/langs/id/data/carrier.xml index 343fa6f51..d1ebb0c7e 100644 --- a/install-dev/langs/id/data/carrier.xml +++ b/install-dev/langs/id/data/carrier.xml @@ -1,6 +1,6 @@ - + - - Pick up in-store + + Ambil di toko diff --git a/install-dev/langs/id/data/category.xml b/install-dev/langs/id/data/category.xml index 87b90b95e..d619f5a04 100644 --- a/install-dev/langs/id/data/category.xml +++ b/install-dev/langs/id/data/category.xml @@ -1,6 +1,6 @@ - + - + Root root @@ -8,10 +8,10 @@ - - Home + + Beranda - home + beranda diff --git a/install-dev/langs/id/data/cms.xml b/install-dev/langs/id/data/cms.xml index 80eb45c35..490e8515d 100644 --- a/install-dev/langs/id/data/cms.xml +++ b/install-dev/langs/id/data/cms.xml @@ -1,45 +1,42 @@ - + - + Pengiriman barang - Tata cara pengiriman barang dari toko kami + Tata cara pengiriman barang pengiriman barang <h2>Pengiriman barang</h2><h3>Your pack shipment</h3><p>Packages are generally dispatched within 2 days after receipt of payment and are shipped via UPS with tracking and drop-off without signature. If you prefer delivery by UPS Extra with required signature, an additional cost will be applied, so please contact us before choosing this method. Whichever shipment choice you make, we will provide you with a link to track your package online.</p><p>Shipping fees include handling and packing fees as well as postage costs. Handling fees are fixed, whereas transport fees vary according to total weight of the shipment. We advise you to group your items in one order. We cannot group two distinct orders placed separately, and shipping fees will apply to each of them. Your package will be dispatched at your own risk, but special care is taken to protect fragile objects.<br /><br />Boxes are amply sized and your items are well-protected.</p> - delivery + pengiriman-barang - - Legal Notice - Legal notice + + Kebijakan privasi dan hukum + Kebijakan privasi dan hukum notice, legal, credits - <h2>Legal</h2><h3>Credits</h3><p>Concept and production:</p><p>This Web site was created using <a href="http://www.prestashop.com">PrestaShop</a>&trade; open-source software.</p> - legal-notice + <h2>Kebijakan privasi dan hukum</h2><p>Tentang kebijakan privasi dan hukum bagi pelanggan</p><p>Website ini dibuat menggunakan <a href="http://www.prestashop.com">PrestaShop</a>&trade; open-source software.</p> + kebijakan-privasi-dan-hukum - - Terms and conditions of use - Our terms and conditions of use + + Syarat pemakaian + Syarat pemakaian conditions, terms, use, sell - <h2>Your terms and conditions of use</h2><h3>Rule 1</h3><p>Here is the rule 1 content</p> -<h3>Rule 2</h3><p>Here is the rule 2 content</p> -<h3>Rule 3</h3><p>Here is the rule 3 content</p> - terms-and-conditions-of-use + <h2>Syarat dan ketentuan pemakaian website</h2><p>Tentang syarat dan ketentuan pemakaian website (penggunaan cookies, penggunaan data customer, dsb)</p> + + syarat-pemakaian - + Tentang kami - Learn more about us + Lebih lanjut mengenai kami about us, informations - <h2>About us</h2> -<h3>Our company</h3><p>Our company</p> -<h3>Our team</h3><p>Our team</p> -<h3>Informations</h3><p>Informations</p> - about-us + <h2>Tentang kami</h2> +<p>Informasi tentang toko Anda</p> + + tentang-kami - + Pembayaran - Our secure payment mean + Pembayaran secure payment, ssl, visa, mastercard, paypal - <h2>Secure payment</h2> -<h3>Our secure payment</h3><p>With SSL</p> -<h3>Using Visa/Mastercard/Paypal</h3><p>About this services</p> - secure-payment + <h2>Pembayaran</h2> +<p>Detail tentang pembayaran</p> + pembayaran diff --git a/install-dev/langs/id/data/cms_category.xml b/install-dev/langs/id/data/cms_category.xml index ceb8cf491..e4766e093 100644 --- a/install-dev/langs/id/data/cms_category.xml +++ b/install-dev/langs/id/data/cms_category.xml @@ -1,9 +1,9 @@ - + - - Home + + Beranda - home + beranda diff --git a/install-dev/langs/id/data/configuration.xml b/install-dev/langs/id/data/configuration.xml index d59e6711d..eb0121de4 100644 --- a/install-dev/langs/id/data/configuration.xml +++ b/install-dev/langs/id/data/configuration.xml @@ -1,21 +1,21 @@ - + - + IN - + DE - + a|the|of|on|in|and|to - + 0 - - Halo, - -Salam, + + Halo, + +Salam kami, Customer service diff --git a/install-dev/langs/id/data/contact.xml b/install-dev/langs/id/data/contact.xml index 2c7243da5..beded785c 100644 --- a/install-dev/langs/id/data/contact.xml +++ b/install-dev/langs/id/data/contact.xml @@ -1,9 +1,9 @@ - + - - Jika ada masalah teknis di website kami + + Jika terdapat masalah teknis di website kami - + Untuk pertanyaan seputar produk dan pembelian diff --git a/install-dev/langs/id/data/gender.xml b/install-dev/langs/id/data/gender.xml index 3904f7d97..539f01c64 100644 --- a/install-dev/langs/id/data/gender.xml +++ b/install-dev/langs/id/data/gender.xml @@ -1,6 +1,6 @@ - + - - - + + + diff --git a/install-dev/langs/id/data/group.xml b/install-dev/langs/id/data/group.xml index 2d1b70934..13c5d0bbe 100644 --- a/install-dev/langs/id/data/group.xml +++ b/install-dev/langs/id/data/group.xml @@ -1,6 +1,6 @@ - + - - - + + + diff --git a/install-dev/langs/id/data/meta.xml b/install-dev/langs/id/data/meta.xml index bae593782..ca55aa033 100644 --- a/install-dev/langs/id/data/meta.xml +++ b/install-dev/langs/id/data/meta.xml @@ -1,159 +1,159 @@ - + - - 404 error - This page cannot be found + + Eror 404 + Halaman tidak ditemukan error, 404, not found - page-not-found + halaman-tidak-ditemukan - - Best sales - Our best sales + + Terlaris + Produk terlaris best sales - best-sales + terlaris - - Contact us - Use our form to contact us + + Hubungi kami + Gunakan form ini untuk menghubungi kami contact, form, e-mail - contact-us + hubungi-kami - + - <description>Shop powered by PrestaShop</description> + <description>didukung oleh PrestaShop</description> <keywords>shop, prestashop</keywords> <url_rewrite/> </meta> - <meta id="manufacturer" id_shop="1"> - <title>Manufacturers - Manufacturers list + + Merk + Daftar merk manufacturer - manufacturers + merk - - New products - Our new products + + Produk terbaru + Produk terbaru new, products - new-products + produk-terbaru - - Forgot your password - Enter your e-mail address used to register in goal to get e-mail with your new password + + Lupa password + Isi alamat e-mail dengan alamat e-mail yang Anda gunakan sewaktu mendaftar yang akan digunakan untuk mengirim password baru forgot, password, e-mail, new, reset - password-recovery + lupa-password - - Prices drop - Our special products + + Turun harga + Daftar produk diskon special, prices drop - prices-drop + turun-harga - + Sitemap - Lost ? Find what your are looking for + Tersesat ? Temukan yang anda cari sitemap sitemap - - Suppliers - Suppliers list + + Supplier + Daftar supplier supplier supplier - - Address + + Alamat - address + alamat - - Addresses + + Daftar Alamat - addresses + daftar-alamat - - Authentication + + Login - authentication + login - - Cart + + Keranjang belanja - cart + keranjang-belanja - - Discount + + Diskon - discount + diskon - - Order history + + Riwayat pembelian - order-history + riwayat-pembelian - - Identity + + Identitas - identity + identitas - - My account + + Akun saya - my-account + akun-saya - - Order follow + + Pantau order - order-follow + pantau-order - - Order slip + + Slip order - order-slip + slip-order - + Order order - - Search + + Cari - search + cari - - Stores + + Toko - stores + toko - + Order quick-order - + Guest tracking guest-tracking - - Order confirmation + + Konfirmasi pembelian - order-confirmation + konfirmasi-pembelian diff --git a/install-dev/langs/id/data/order_return_state.xml b/install-dev/langs/id/data/order_return_state.xml index 37ad31de9..a6c67e83d 100644 --- a/install-dev/langs/id/data/order_return_state.xml +++ b/install-dev/langs/id/data/order_return_state.xml @@ -1,18 +1,18 @@ - + - - Waiting for confirmation + + Menunggu konfirmasi - - Waiting for package + + Menunggu paket - - Package received + + Paket diterima - - Return denied + + Retur ditolak - - Return completed + + Retur berhasil diff --git a/install-dev/langs/id/data/order_state.xml b/install-dev/langs/id/data/order_state.xml index c44dc3358..59cde53ff 100644 --- a/install-dev/langs/id/data/order_state.xml +++ b/install-dev/langs/id/data/order_state.xml @@ -1,51 +1,51 @@ - + - - Awaiting cheque payment + + Menunggu cek pembayaran - - Payment accepted + + Pembayaran diterima - - Preparation in progress + + Barang tengah disiapkan - - Shipped + + Proses pengiriman - - Delivered + + Barang telah diterima