diff --git a/classes/Language.php b/classes/Language.php index 77985d39e..b6be5e827 100644 --- a/classes/Language.php +++ b/classes/Language.php @@ -795,10 +795,9 @@ class LanguageCore extends ObjectModel $lang->iso_code = Tools::strtolower($iso_code); $lang->language_code = $iso_code; // Rewritten afterwards if the language code is available $lang->active = true; - // If the language pack has not been provided, retrieve it from prestashop.com if (!$lang_pack) { - $lang_pack = json_decode(Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code)); + $lang_pack = json_decode(Tools::file_get_contents(_QLO_API_URL_.'/lang_pack/get_lang_pack.php?version='._PS_VERSION_.'&iso_lang='.$iso_code)); } // If a language pack has been found or provided, prefill the language object with the value @@ -831,7 +830,7 @@ class LanguageCore extends ObjectModel Configuration::updateGlobalValue('PS_ALLOW_ACCENTED_CHARS_URL', 1); } - $flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg'); + $flag = Tools::file_get_contents(_QLO_API_URL_.'/download/lang_pack/flags/'.$iso_code.'.jpg'); if ($flag != null && !preg_match('//', $flag)) { $file = fopen(_PS_ROOT_DIR_.'/img/l/'.(int)$lang->id.'.jpg', 'w'); if ($file) { @@ -912,11 +911,11 @@ class LanguageCore extends ObjectModel $errors = array(); $file = _PS_TRANSLATIONS_DIR_.(string)$iso.'.gzip'; - if (!$lang_pack_link = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/get_language_pack.php?version='.$version.'&iso_lang='.Tools::strtolower((string)$iso))) { + if (!$lang_pack_link = Tools::file_get_contents(_QLO_API_URL_.'/lang_pack/get_lang_pack.php?version='.$version.'&iso_lang='.Tools::strtolower((string)$iso))) { $errors[] = Tools::displayError('Archive cannot be downloaded from prestashop.com.'); } elseif (!$lang_pack = json_decode($lang_pack_link)) { $errors[] = Tools::displayError('Error occurred when language was checked according to your Prestashop version.'); - } elseif (empty($lang_pack->error) && ($content = Tools::file_get_contents('http://translations.prestashop.com/download/lang_packs/gzip/'.$lang_pack->version.'/'.Tools::strtolower($lang_pack->iso_code.'.gzip')))) { + } elseif (empty($lang_pack->error) && ($content = Tools::file_get_contents(_QLO_API_URL_.'/download/lang_pack/'.$lang_pack->version.'/'.Tools::strtolower($lang_pack->iso_code.'.gzip')))) { if (!@file_put_contents($file, $content)) { if (is_writable(dirname($file))) { @unlink($file); @@ -934,7 +933,6 @@ class LanguageCore extends ObjectModel $gz = new Archive_Tar($file, true); $files_list = AdminTranslationsController::filterTranslationFiles(Language::getLanguagePackListContent((string)$iso, $gz)); $files_paths = AdminTranslationsController::filesListToPaths($files_list); - $i = 0; $tmp_array = array(); @@ -977,8 +975,6 @@ class LanguageCore extends ObjectModel AdminTranslationsController::checkAndAddMailsFiles((string)$iso, $files_list); AdminTranslationsController::addNewTabs((string)$iso, $files_list); } - //By webkul....Replace our customized mail files in the mail folder..... - Language::replaceCustomizedMailFiles($iso); } return count($errors) ? $errors : true; diff --git a/translations/custom_mails/booking_extra_demands.tpl b/translations/custom_mails/booking_extra_demands.tpl deleted file mode 100644 index 644628c96..000000000 --- a/translations/custom_mails/booking_extra_demands.tpl +++ /dev/null @@ -1,71 +0,0 @@ -{if isset($list)} - - - - - - - - - - - - - {if isset($list)} - {foreach from=$list key=data_k item=data_v} - {foreach from=$data_v['date_diff'] key=rm_k item=rm_v} - {if isset($rm_v['extra_demands']) && $rm_v['extra_demands']} - {assign var=roomCount value=1} - {foreach $rm_v['extra_demands'] as $roomDemand} - {foreach name=demandRow from=$roomDemand['extra_demands'] item=demand} - - {if $smarty.foreach.demandRow.first} - - {/if} - - - - {/foreach} - {assign var=roomCount value=$roomCount+1} - {/foreach} - {/if} - {/foreach} - {/foreach} - {/if} - -
{l s='Extra Demands Details'}
{l s='Room Type'}{l s='Extra demand name'}{l s='Total'}
{l s='(Tax excl.)'}
- - {$data_v['name']}
- {$rm_v['data_form']|date_format:"%d-%m-%Y"} {l s='to'} {$rm_v['data_to']|date_format:"%d-%m-%Y"}
- {l s='Room'} - {$roomCount} -
-
- - {$demand['name']} - - - - {convertPrice price=$demand['total_price_tax_excl']} - -
- -{/if} diff --git a/translations/custom_mails/booking_extra_demands.txt b/translations/custom_mails/booking_extra_demands.txt deleted file mode 100644 index 3139f8ce3..000000000 --- a/translations/custom_mails/booking_extra_demands.txt +++ /dev/null @@ -1,40 +0,0 @@ -{if isset($list)} - {l s='Extra Demands Details'} - {l s='Room Type'} - {l s='Extra demand name'} - {l s='Total'} {l s='(Tax excl.)'} - - {if isset($list)} - {foreach from=$list key=data_k item=data_v} - {foreach from=$data_v['date_diff'] key=rm_k item=rm_v} - {if isset($rm_v['extra_demands']) && $rm_v['extra_demands']} - {assign var=roomCount value=1} - {foreach $rm_v['extra_demands'] as $roomDemand} - {foreach name=demandRow from=$roomDemand['extra_demands'] item=demand} - {if $smarty.foreach.demandRow.first} - - - {$data_v['name']}
- {$rm_v['data_form']|date_format:"%d-%m-%Y"} {l s='to'} {$rm_v['data_to']|date_format:"%d-%m-%Y"}
- {l s='Room'} - {$roomCount} -
- - {/if} - - - {$demand['name']} - - - - - {convertPrice price=$demand['total_price_tax_excl']} - - - - {/foreach} - {assign var=roomCount value=$roomCount+1} - {/foreach} - {/if} - {/foreach} - {/foreach} - {/if} diff --git a/translations/custom_mails/hotel-booking-cart-data.tpl b/translations/custom_mails/hotel-booking-cart-data.tpl deleted file mode 100644 index 9389a895b..000000000 --- a/translations/custom_mails/hotel-booking-cart-data.tpl +++ /dev/null @@ -1,119 +0,0 @@ -{if isset($list)} - {foreach from=$list key=data_k item=data_v} - {foreach from=$data_v['date_diff'] key=rm_k item=rm_v} - - - - - - - - -
  - - - -  
- - - - - - - - -
  - - {$data_v['name']} - -  
- - - - - - - - -
  - - - {$data_v['adult']} {l s='Adults'}, {$data_v['children']} {l s='Children'} - - -  
- - - - - - - - -
  - - {convertPrice price=$data_v['unit_price']} - -  
- - - - - - - - -
  - - {$rm_v['num_rm']} - -  
- - - - - - - - -
  - - {$rm_v['data_form']|date_format:"%d-%b-%G"} - -  
- - - - - - - - -
  - - {$rm_v['data_to']|date_format:"%d-%b-%G"} - -  
- - - - - - - - -
  - - {convertPrice price=$rm_v['amount']} - -  
- - - {/foreach} - {/foreach} -{/if} - diff --git a/translations/custom_mails/hotel-booking-cart-data.txt b/translations/custom_mails/hotel-booking-cart-data.txt deleted file mode 100644 index de17a1632..000000000 --- a/translations/custom_mails/hotel-booking-cart-data.txt +++ /dev/null @@ -1,23 +0,0 @@ -{if isset($list)} - {foreach from=$list key=data_k item=data_v} - {foreach from=$data_v['date_diff'] key=rm_k item=rm_v} - - - - {$data_v['name']} - - {$data_v['adult']} {l s='Adults'}, {$data_v['children']} {l s='Children'} - - {convertPrice price=$data_v['unit_price']} - - {$rm_v['num_rm']} - - {$rm_v['data_form']|date_format:"%d-%b-%G"} - - {$rm_v['data_to']|date_format:"%d-%b-%G"} - - {$rm_v['amount']} - {/foreach} - {/foreach} -{/if} - diff --git a/translations/custom_mails/order_conf.html b/translations/custom_mails/order_conf.html deleted file mode 100755 index 14801d8c8..000000000 --- a/translations/custom_mails/order_conf.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - Message from {shop_name} - - - - - - - - - - - - -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Hi {firstname} {lastname},
- Thank you for selecting our hotel! -
-
- - - - - - -
  - -

- Order details

- - Order: {order_name} Placed on {date}

- Payment: {payment} -
-
-
 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Room ImageRoom DescriptionRoom CapcityUnit PriceRooms QtyCheck-in DateCheck-out DateTotal
-   {cart_booking_data_html} -
- {extra_demands_details_html} -
-   {discounts} -
- - - - - - -
  - - Total Rooms Cost - -  
-
- - - - - - -
  - - {total_products} - -  
-
- - - - - - -
  - - Total Additional Facilities Cost - -  
-
- - - - - - -
  - - {total_extra_demands_te} - -  
-
- - - - - - -
  - - Discounts - -  
-
- - - - - - -
  - - {total_discounts} - -  
-
- - - - - - -
  - - Total Rooms Tax - -  
-
- - - - - - -
  - - {total_tax_paid} - -  
-
- - - - - - -
  - - Additional Facilities Tax - -  
-
- - - - - - -
  - - {extra_demands_tax} - -  
-
- - - - - - -
  - - Final Booking Amount - -  
-
- - - - - - -
  - - {total_paid} - -  
-
-
-
- - - - - -
  - - - - - - -
  - -

- Customer address

- - {invoice_block_html} - - -
-
 
-
-
- - - You can review your order and download your invoice from the "Order history" section of your customer account by clicking "My account" on our shop. - -
- - - If you have a guest account, you can follow your order via the "Guest Tracking" section on our shop. - -
-
 
- - \ No newline at end of file diff --git a/translations/custom_mails/order_conf.txt b/translations/custom_mails/order_conf.txt deleted file mode 100644 index e5ed48ab5..000000000 --- a/translations/custom_mails/order_conf.txt +++ /dev/null @@ -1,53 +0,0 @@ -Message from {shop_name} -Hi {firstname} {lastname}, -Thank you for selecting our hotel! -Order details -Order: {order_name} Placed on {date} -Room Image< -Room Description< -Room Capcity -Unit Price -Rooms Qty -Check-in Date -Check-out Date -Total - -{cart_booking_data_html} - -{extra_demands_details_html} - -{discounts} - -Total Rooms Cost -{total_products} - -Total Additional Facilities Cost -{total_extra_demands_te} - -Discounts -{total_discounts} - -Total Rooms Tax -{total_tax_paid} - -Additional Facilities Tax -{extra_demands_tax} - -Final Booking Amount -{total_paid} - -Customer address -{invoice_block_html} - -You can review your order and download your invoice from the -"Order history" [{history_url}] section of your -customer account by clicking "My account" -[{my_account_url}] on our shop. - -If you have a guest account, you can follow your order via the -"Guest Tracking" -[{guest_tracking_url}?id_order={order_name}] section -on our shop. - -{shop_name} [{shop_url}] powered by -Webkul(tm) [https://webkul.com] \ No newline at end of file diff --git a/translations/custom_mails/order_conf_admin.html b/translations/custom_mails/order_conf_admin.html deleted file mode 100755 index 83bc1f399..000000000 --- a/translations/custom_mails/order_conf_admin.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - - - Message from {shop_name} - - - - - - - - - - - - -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Hi {firstname} {lastname},
- New Bookings created on {shop_name}! -
-
- - - - - - -
  - -

- Customer details

- - Name: {customer_name}

- Email: {customer_email} -
-
-
 
-
- - - - - - -
  - -

- Order details

- - Order: {order_name} Placed on {date}

- Payment: {payment} -
-
-
 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Room ImageRoom DescriptionRoom CapcityUnit PriceRooms QtyCheck-in DateCheck-out DateTotal
-   {cart_booking_data_html} -
- {extra_demands_details_html} -
-   {discounts} -
- - - - - - -
  - - Total Rooms Cost - -  
-
- - - - - - -
  - - {total_products} - -  
-
- - - - - - -
  - - Total Additional Facilities Cost - -  
-
- - - - - - -
  - - {total_extra_demands_te} - -  
-
- - - - - - -
  - - Discounts - -  
-
- - - - - - -
  - - {total_discounts} - -  
-
- - - - - - -
  - - Total Rooms Tax - -  
-
- - - - - - -
  - - {total_tax_paid} - -  
-
- - - - - - -
  - - Additional Facilities Tax - -  
-
- - - - - - -
  - - {extra_demands_tax} - -  
-
- - - - - - -
  - - Final Booking Amount - -  
-
- - - - - - -
  - - {total_paid} - -  
-
-
-
-
 
- - \ No newline at end of file diff --git a/translations/custom_mails/order_conf_admin.txt b/translations/custom_mails/order_conf_admin.txt deleted file mode 100644 index 57f2f8e75..000000000 --- a/translations/custom_mails/order_conf_admin.txt +++ /dev/null @@ -1,46 +0,0 @@ -Message from {shop_name} -Hi {firstname} {lastname}, - -New Bookings created on {shop_name}! - -Customer details -Name: {customer_name} -Email: {customer_email} - -Order details -Order: {order_name} Placed on {date} -Payment: {payment} -Room Image -Room Description -Room Capcity -Unit Price -Rooms Qty -Check-in Date -Check-out Date - -Total -{cart_booking_data_html} - -{extra_demands_details_html} - -{discounts} - -Total Rooms Cost -{total_products} - -Total Additional Facilities Cost -{total_extra_demands_te} - -Discounts -{total_discounts} - -Total Rooms Tax -{total_tax_paid} - -Additional Facilities Tax -{extra_demands_tax} - -Final Booking Amount -{total_paid} - -{shop_name} powered by Webkul™ \ No newline at end of file diff --git a/translations/en.gzip b/translations/en.gzip index 855b7c8e1..bbaedf31e 100644 Binary files a/translations/en.gzip and b/translations/en.gzip differ diff --git a/translations/fr.gzip b/translations/fr.gzip deleted file mode 100644 index ad02c464b..000000000 Binary files a/translations/fr.gzip and /dev/null differ