// merge 1.4 (5397)

This commit is contained in:
fBrignoli
2011-04-22 16:00:58 +00:00
parent 0cd5856fe5
commit ff49083fb6
126 changed files with 3390 additions and 1430 deletions
+255
View File
@@ -23,6 +23,261 @@ International Registred Trademark & Property of PrestaShop SA
Release Notes for PrestaShop 1.4
--------------------------------
####################################
# v1.4.1.0 - 6030 (2011-04-21) #
####################################
Added Features:
[+] Installer : Adding address format table
[+] Installer : Thanks to Michael Bangiev for german installer translation \!
[+] Installer : When upgrading, you can now automatically desactivate non-native modules
[+] Installer : added link to the online theme validator
[+] FO : Adding address formating for stores
[+] BO : Adding address formating
[+] BO : Adding address formating
[+] BO : Adding address formating
[+] BO : Adding address formating
[+] BO : Adding address formating
[+] BO : Adding address formating
[+] BO : added methods to enable/disable one or more module by name
[+] BO : added static method to get non native module list in ModuleCore class
[+] CORE : allow to load interface with the autoload
[+] WS : add column in the PREFIX_webservice_account table
[+] TR : translation wording
Improved/changed features:
[*] Project : added new tinyMCE version
[*] Project : remove old tinyMC version
[*] INSTALLER : Can manage HTML in preactivation text
[*] Installer : added readme_it, readme_de, and CHANGELOG to the file-to-delete list
[*] FO : #PSCFI-1537 corrects address block error
[*] FO : Cached queries
[*] FO : Display label can desactivated + Tax & Shipping simulator
[*] FO : Fixed link to delete customer product picture when friendly url + canonical are activated
[*] FO : Using geocoding for itinerary
[*] FO : corrects smarty2 compliance
[*] FO : in category view, products for which the default combination is out of stock but other combinations are still available no longer display an 'Out of stock' message.
[*] FO : in product view, accessories now display a message if they are out of stock or out of the default combination.
[*] FO : setMedia called now only in init()
[*] BO : Adding store infos templatization
[*] BO : Adding store infos templatization
[*] BO : keeping cart status on refresh
[*] BO : #8341 Wording: changing depth and package spelling
[*] BO : #8345 Deleting unused vars
[*] BO : #8406 Adding method to get protocol
[*] BO : #8406 removing hard coded http
[*] BO : #8419 Adding attachment name check
[*] BO : #8438 corrects use of uninstanciated value
[*] BO : #8440 restores quantity display
[*] BO : #8459 filtering arrow keys
[*] BO : #8486 changing getProtocol
[*] BO : #8486 changing getProtocol
[*] BO : #8569 removing bad redirect & cookie path for ajaxfilemanager
[*] BO : #8693 Adding back to category link on add doc attachment
[*] BO : #PSCFI-1294 wording: corrects Pproduct
[*] BO : Adding market place group to AdminModules
[*] BO : Adding missing else case
[*] BO : Adding store infos templatization
[*] BO : Adding translate for contact, Bug tracker, forum
[*] BO : Corrects die error is state is used
[*] BO : cleaning
[*] BO : improve loading of home page of Back office
[*] BO : now admin tabs defined in module use now translation in their module directory
[*] BO : orders don t disappear anymore if authorized localhost client
[*] BO : revert: Adding missing else case
[*] BO : reverting
[*] BO : reverting wording
[*] BO : setting re-ordeing regexp to 99 max
[*] BO : unsetting var after use
[*] BO : updating iso state code according to ISO_3166-2
[*] BO : wording
[*] MO : Bug fixed #PSCFI-1370 - Adding possibility to choose calcul mode for shipping cost in USPS module
[*] MO : Display option for eKomi module
[*] MO : added weight filter - removing the restriction on cache table
[*] MO : improvements on carriercompare (Shipping estimation) module
[*] MO : themeinstallator - exported themes archives now have a random md5 filename
Fixed bugs:
[-] Project : Fixed bug #PSCFI-1208 - MODULE_DIR (relative path) should be replaced with PS_MODULE_DIR (full path)
[-] Project : fixed json_encode and json_decode calls
[-] INSTALLER : Bug fixed on checkbox preactivation system
[-] INSTALLER : Preactivation prechecked bug has been fixed
[-] Installer : Bug Fixed #8585 - Wrong currency for reduction inserted to ps_specific_price
[-] Installer : Bug Fixed #PSCFI-1266 - 1.3 price reductions not applied to all groups on 1.4 upgrade
[-] Installer : Fixed #PSCFI-1466 - undefined constant _PS_VERSION_ was used instead of $oldversion
[-] Installer : Fixed #PSCFI-1496 - var name corrected in desactivatecustommodule.php
[-] Installer : Fixed #PSCFI-1500 - PREFIX_ / ps_ in installer
[-] Installer : Fixed about-us german url rewrite
[-] Installer : fixed bug #8477 - German friendly URLs have uppercase letters
[-] Installer : fixed bug #PSCFI-1381 - svn5784 upgrade sql error and cannot complete upgrade - Cannot redeclare alter_cms_block() previously declared
[-] Installer : fixed bug #PSCFI-1500
[-] Installer : fixed bug if CMS module is not installed
[-] FO : #PSCFI-1374 Fixed a bug concerning the cart without taxes
[-] FO : Bug Fixed #8315 - Incorrect tax for counties
[-] FO : Bug Fixed #PSCFI-1459 - Problem in tax summary (tax excl + ecotax)
[-] FO : Bug Fixed #PSCFI-1460 - Combination + overriden EcoTax
[-] FO : Bug Fixed #PSCFI-1516 - Incorrect cache key in price calculation
[-] FO : Bug fixed #8293 - Wrong price round for product
[-] FO : Bug fixed default picture missing in product comparison
[-] FO : CSS and JS files not available (404) are now empty, haven't code html of 404 page of Prestashop
[-] FO : Fixed #7752 - now customer image will be deleted if they remove product they attached to a product
[-] FO : Fixed #8418 HTTPS issue with _SERVER['HTTPS']
[-] FO : Fixed #PSCFI-1118 add to cart with customization
[-] FO : Fixed #PSCFI-1215 blockbestsellers now correctly constructs links to best-sale page
[-] FO : Fixed #PSCFI-1220 wrong call to setMedia()
[-] FO : Fixed #PSCFI-1269 undefined variable
[-] FO : Fixed #PSCFI-733 - fatal error when disabling shop
[-] FO : Fixed bug #PSCFI-1201 - Product quantities were not displayed when they should be.
[-] FO : Fixed bug #PSCFI-1373 - Bug with the update function when an id_lang was passed to the construct function.
[-] FO : Fixed bug on ssl pages
[-] FO : Fixed login issue when special ssl configuration
[-] FO : Hours can now be translated for the store locator
[-] FO : Remove debug comment
[-] FO : Smarty 2 compatibility
[-] FO : Use default country for default taxes
[-] FO : deleted the string "!" which didn't make sense in the sentence "Assign an address title for future reference".
[-] FO : fixed a bug when a customer have on his cookie a disabled currency
[-] FO : fixed bug #7991 - fixed a bug where the 'add to cart' button was still active for accessories on product pages when they are out of stock, and fixed a bug where out of stock message for products was not displayed.
[-] FO : fixed bug #8042 - logo and favicon were not cached properly
[-] FO : fixed bug #8363 - Availability in cart (green dot) wrong for products with stock 0
[-] FO : fixed bug #8389 - Category page not work
[-] FO : fixed bug #8436 - State select is invalid HTML
[-] FO : fixed bug #8479 - Smarty error on lines 147 and 168 of themes/prestashop/address.tpl
[-] FO : fixed bug #8492 - Error in cms.php?id_cms_category=1
[-] FO : fixed bug #8536 - Incompleted end tag
[-] FO : fixed bug #8555 - 1.4.0.17 h1 overlaps a background bar
[-] FO : fixed bug #8577 - shipping bug order OPC
[-] FO : fixed bug #8631 - CMS page links to other languages ignores URL rewrite (always unfriendly URL)
[-] FO : fixed bug #PSCFI-1290 - One Page Checkout calculates gift_price in two different ways - one right, one wrong
[-] FO : fixed bug #PSCFI-1296 - cart_summary is not updated after deleting items
[-] FO : fixed bug #PSCFI-1303 - Tag pagination with specific characters
[-] FO : fixed bug #PSCFI-1315 - Bug authentication and not installed newsletter module
[-] FO : fixed bug #PSCFI-1317 - 5 step checkout is missing address information in checkout window
[-] FO : fixed bug #PSCFI-1369 - svn5760 typo ("mob") in ajax.php
[-] FO : fixed bug #PSCFI-1395 - PackCore static function "IsInStock" doesn't work for packs
[-] FO : fixed bug #PSCFI-1400 - no css for search pages
[-] FO : fixed bug #PSCFI-1475 - An error occured because of an undefined variable $tag. The variable has been renamed as $search_tag to fix it.
[-] FO : fixed bug #PSCFI-1489 - Clicking on "Add to cart" - Button disables all "Add to cart"
[-] FO : fixed bug #PSCFI-151 - Full category list displays then shrinks
[-] FO : fixed bug #PSCFI-1543 - theme: "out of stock" condition may not be EXACTLY zero
[-] FO : fixed bug #PSCFI-1548 - Error in getPacksTable sql query
[-] FO : fixed bug PSCFI-1455 - Class "warning-inline" doesn't exist. Changed to "warning_inline"
[-] FO : fixed bug live edit now display correctly
[-] FO : fixed many call to unexisting css and js file after an update
[-] FO : fixed stylesheet bug and CCC feature
[-] FO :fixed a translation bug in French
[-] BO : Bug Fixed #PSCFI-1481 - IncludeTab and active action
[-] BO : Fix on preactivation process
[-] BO : Fixed #1205 error on updating product
[-] BO : Fixed #8513, #7932, #8040 about mail translation loss, thanks to sorsand rodt
[-] BO : Fixed #PSCFI-1191 - url rewrite for home page
[-] BO : Fixed #PSCFI-1222 - product order
[-] BO : Fixed #PSCFI-1394 bug while cleaning connection pages
[-] BO : Fixed #PSCFI-1485 - strict standard
[-] BO : Fixed #PSCFI-1512 - thanks to Melinda for fixing the filtering module system :)
[-] BO : Fixed #PSCFI-1517 - colorpicker.js issue on firefox 4
[-] BO : Fixed #PSCFI-1518 - now you can translate modules in a custom theme using the AdminTranslations tools
[-] BO : Fixed #PSCFI-858 upload flag for a language
[-] BO : Fixed #PSCFI-999 - generate a correct htaccess for cms and category cms
[-] BO : Fixed 8452 - mysql_close is not called if invalid link ressource
[-] BO : Fixed bug #PSCFI-1254 - Filtering manufacturers by activity would generate an incorrect sql query
[-] BO : Fixed bug - sql error when duplicate product
[-] BO : Fixed login issue when special ssl configuration
[-] BO : Localization pack can now be imported locally if no internet connection is available
[-] BO : Now .tpl are translate in root theme folder
[-] BO : Now when a language is added, the translation in the default language is automatically copied to the new language.
[-] BO : Rouding issues with float 149.42 - 149.42 = -0.0000000000012
[-] BO : added array_change_key_case for module translation compatibility
[-] BO : fixed #PSCFI-1207 - language pack import not possible with safari 5 on osx 10.6.6 and 10.6.7
[-] BO : fixed bad redirection
[-] BO : fixed bug #8391 - Currency symbol not shown in admin/products
[-] BO : fixed bug #8393 - Pagination was broken.
[-] BO : fixed bug #8414 - meta-keywords saving error
[-] BO : fixed bug #8563 - BO: change country to one without states
[-] BO : fixed bug #8576 - Illegal offset type in admin modules page
[-] BO : fixed bug #8636 - Fatal error during address importation
[-] BO : fixed bug #8649 - Suppliers Description validates wrong
[-] BO : fixed bug #PSCFI-1356 - Unknown object in AdminProduct due to typo
[-] BO : fixed bug #PSCFI-1372 - svn5757 tinymce.inc.js misses some plugins
[-] BO : fixed bug #PSCFI-1380 - sorting sub-categories by name in the table make back to parent category
[-] BO : fixed bug #PSCFI-1429 - Deleting products does not remove image files
[-] BO : fixed bug #PSCFI-1431 - Import error if html tag in CSV
[-] BO : fixed bug #PSCFI-1461 - Product updateDefaultAttribute function - small typo
[-] BO : fixed bug #PSCFI-1468 - Unable to delete Tax
[-] BO : fixed bug #PSCFI-1469 - BO Modules UI wrong collapse icon
[-] BO : fixed bug #PSCFI-1471 - UK localization xml was missing
[-] BO : fixed bug #PSCFI-1523 - Bug in saving mail subjects between translations
[-] BO : fixed bug #PSCFI-1560 - Carrier filter in AdminCarts Tab
[-] BO : fixed bug PSCFI-1557 - If a product's name include a comma, it cannot be added to a "pack" product
[-] BO : fixed bug in stock movements where clicking 'reset' would display an error.
[-] BO : fixed bug interface in AdminCountries tab
[-] BO : fixed bug on modules autocomplete search
[-] BO : fixed bug on modules filters
[-] BO : fixed bug scollTo bug when install new module
[-] BO : fixed mail subject translation (utf8, htmlentities, quotes)
[-] BO : fixed notice errors on product comaprison feature
[-] BO : install fix (now works)
[-] BO : liveEdit when open_basedir restriction
[-] BO : module can't be now transplanted anywhere, just where it can
[-] BO :fixed a translation bug, name files are translated with the content
[-] Classes : fixed bug #8599
[-] Classes : fixed bug #PSCFI-1358 - Undefined index in Tools::displayasdeprecated
[-] Classes : fixed bug #PSCFI-1358 - Undefined index in Tools::displayasdeprecated (another one)
[-] Classes : fixed bug #PSCFI-1384 - error in Class configuration
[-] Classes : fixed bug #PSCFI-1391 - "Reset" link on "Categories block v2.0" causes "Max depth" to be lost
[-] Classes : you can define encoding to strlen() method of Tools class
[-] Core : fixed bug #PSCFI-1397 - .htaccess in /download is missing
[-] Core : fixed little bug on validation method for iso code of state
[-] MO : Bug fixed #PSCFI-1370 - Fix on USPS module for FirstClassMailType
[-] MO : Translations fixed on module Twenga
[-] MO : TrustedShops - Integration certificate enable features
[-] MO : TrustedShops - Missing {literal} tags
[-] MO : TrustedShops, Fix a notice when a certificat doesn't exist for a language, add new translations and fix a image display
[-] MO : add a sentence in module producttooltip in order to indicate that statdata module must be active (PSCFI-1206)
[-] MO : change the way to save the serialize array, use Tools::htmlentitiesUTF8 for save in database.
[-] MO : fixed bug #8374 - Featured Products block issue
[-] MO : fixed bug #8544 - Mail alert bug
[-] MO : fixed bug #8567 - Search Stats not working on 1.4.0.17
[-] MO : fixed bug #8581 - BlockLink - SQL Error
[-] MO : fixed bug #PSCFI-1321 - _clearCache error in blockcategories
[-] MO : fixed bug #PSCFI-1378 - Socolissimo validate.php collect wrong data
[-] MO : fixed bug in template for productcomment module
[-] MO : fixed bug on DejaLa module
[-] MO : incorrect index array in followup.php for email
[-] MO : rename field id_block_cms to id_cms_block
[-] WS : Fixing PHP 5.3 compatibility bug
[-] WS : add the error number when a webservice error is set
[-] TR : Fixed german translation
[-] TR : fix german translation, thanks to the community
[-] TR : fixed fr mispelling at first login (please delete install dir and move admin)
[-] LO : Currency format
Deprecated methods:
[~] FO : Link->getUrlWith is deprecated
####################################
# v1.4.0.17 - 5552 (2011-03-16) #
####################################
+4 -2
View File
@@ -610,7 +610,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
$isoCountry = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'));
$context = stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 5)));
$content = @file_get_contents('https://www.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$cookie->id_lang.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $context);
$content = @file_get_contents('https://www.prestashop.com/partner/preactivation/preactivation-block.php?version=1.0&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'&protocol='.$protocol.'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$cookie->id_lang.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&date_creation='._PS_CREATION_DATE_.'&v='._PS_VERSION_.'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $context);
if (!$content)
die('NOK');
$content = explode('|', $content);
@@ -629,6 +629,8 @@ if (Tools::isSubmit('getAdminHomeElement'))
}
}
}
else
$result['partner_preactivation'] = '';
// DISCOVER PRESTASHOP
$content = @file_get_contents('https://www.prestashop.com/partner/prestashop/prestashop-link.php?iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$cookie->id_lang, false, $context);
@@ -648,4 +650,4 @@ if (Tools::isSubmit('getAdminHomeElement'))
die(Tools::jsonEncode($result));
}
}
+191 -111
View File
@@ -62,7 +62,7 @@ class AdminAddresses extends AdminTab
'address1' => array('title' => $this->l('Address'), 'width' => 200),
'postcode' => array('title' => $this->l('Postcode/ Zip Code'), 'align' => 'right', 'width' => 50),
'city' => array('title' => $this->l('City'), 'width' => 150),
'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'select' => $this->countriesArray, 'filter_key' => 'cl!id_country'));
'country' => array('title' => $this->l('Country'), 'width' => 100, 'type' => 'select', 'select' => $this->countriesArray, 'filter_key' => 'id_country'));
parent::__construct();
}
@@ -275,6 +275,13 @@ class AdminAddresses extends AdminTab
<input type="text" size="33" name="email" value="'.htmlentities(Tools::getValue('email'), ENT_COMPAT, 'UTF-8').'" style="text-transform: lowercase;" /> <sup>*</sup>
</div>';
}
echo '
<label for="dni">'.$this->l('Identification Number').'</label>
<div class="margin-form">
<input type="text" name="dni" id="dni" value="'.htmlentities($this->getFieldValue($obj, 'dni'), ENT_COMPAT, 'UTF-8').'" />
<p>'.$this->l('DNI / NIF / NIE').'</p>
</div>';
echo '<label>'.$this->l('Alias').'</label>
<div class="margin-form">
<input type="text" size="33" name="alias" value="'.htmlentities($this->getFieldValue($obj, 'alias'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
@@ -282,143 +289,216 @@ class AdminAddresses extends AdminTab
</div>';
break;
}
if ($this->addressType != 'manufacturer')
{
echo '<label>'.$this->l('Company').'</label>
<div class="margin-form">
<input type="text" size="33" name="company" value="'.htmlentities($this->getFieldValue($obj, 'company'), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
$addresses_fields = $this->processAddressFormat();
$addresses_fields = $addresses_fields["dlv_all_fields"]; // we use delivery address
if ((Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php')) && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT')))
echo '<div id="vat_area" style="display: visible">';
else if(Configuration::get('VATNUMBER_MANAGEMENT'))
echo '<div id="vat_area" style="display: hidden">';
else
echo'<div style="display: none;">';
foreach($addresses_fields as $addr_field_item)
{
if ($addr_field_item == 'company')
{
if ($this->addressType != 'manufacturer')
{
echo '<label>'.$this->l('Company').'</label>
<div class="margin-form">
<input type="text" size="33" name="company" value="'.htmlentities($this->getFieldValue($obj, 'company'), ENT_COMPAT, 'UTF-8').'" />
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>';
if ((Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php')) && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT')))
echo '<div id="vat_area" style="display: visible">';
else if(Configuration::get('VATNUMBER_MANAGEMENT'))
echo '<div id="vat_area" style="display: hidden">';
else
echo'<div style="display: none;">';
echo '<label>'.$this->l('VAT number').'</label>
<div class="margin-form">
<div class="margin-form">
<input type="text" size="33" name="vat_number" value="'.htmlentities($this->getFieldValue($obj, 'vat_number'), ENT_COMPAT, 'UTF-8').'" />
</div>
</div>';
}
</div>
</div>';
}
}
elseif ($addr_field_item == 'lastname')
{
echo '
<label>'.$this->l('Last name').'</label>
<div class="margin-form">
<label>'.$this->l('Last name').'</label>
<div class="margin-form">
<input type="text" size="33" name="lastname" value="'.htmlentities($this->getFieldValue($obj, 'lastname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>
<label>'.$this->l('First name').'</label>
<div class="margin-form">
</div>';
}
elseif ($addr_field_item == 'firstname')
{
echo '
<label>'.$this->l('First name').'</label>
<div class="margin-form">
<input type="text" size="33" name="firstname" value="'.htmlentities($this->getFieldValue($obj, 'firstname'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
<span class="hint" name="help_box">'.$this->l('Invalid characters:').' 0-9!<>,;?=+()@#"{}_$%:<span class="hint-pointer">&nbsp;</span></span>
</div>
<label for="dni">'.$this->l('Identification Number').'</label>
<div class="margin-form">
<input type="text" name="dni" id="dni" value="'.htmlentities($this->getFieldValue($obj, 'dni'), ENT_COMPAT, 'UTF-8').'" />
<p>'.$this->l('DNI / NIF / NIE').'</p>
</div>
<label>'.$this->l('Address').'</label>
<div class="margin-form">
<input type="text" size="33" name="address1" value="'.htmlentities($this->getFieldValue($obj, 'address1'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>
<label>'.$this->l('Address').' (2):</label>
<div class="margin-form">
<input type="text" size="33" name="address2" value="'.htmlentities($this->getFieldValue($obj, 'address2'), ENT_COMPAT, 'UTF-8').'" />
</div>
<label>'.$this->l('Postcode/ Zip Code').'</label>
<div class="margin-form">
<input type="text" size="33" name="postcode" value="'.htmlentities($this->getFieldValue($obj, 'postcode'), ENT_COMPAT, 'UTF-8').'" />
</div>
<label>'.$this->l('City').'</label>
<div class="margin-form">
<input type="text" size="33" name="city" value="'.htmlentities($this->getFieldValue($obj, 'city'), ENT_COMPAT, 'UTF-8').'" style="text-transform: uppercase;" /> <sup>*</sup>
</div>
<label>'.$this->l('Country').'</label>
<div class="margin-form">
<select name="id_country" id="id_country" />';
$selectedCountry = $this->getFieldValue($obj, 'id_country');
foreach ($this->countriesArray AS $id_country => $name)
echo ' <option value="'.$id_country.'"'.((!$selectedCountry AND Configuration::get('PS_COUNTRY_DEFAULT') == $id_country) ? ' selected="selected"' : ($selectedCountry == $id_country ? ' selected="selected"' : '')).'>'.$name.'</option>';
echo ' </select> <sup>*</sup>
</div>';
$id_country_ajax = (int)$this->getFieldValue($obj, 'id_country');
echo '
<script type="text/javascript">
$(document).ready(function(){
ajaxStates ();
$(\'#id_country\').change(function() {
ajaxStates ();
});
function ajaxStates ()
{
$.ajax({
url: "ajax.php",
cache: false,
data: "ajaxStates=1&id_country="+$(\'#id_country\').val()+"&id_state="+$(\'#id_state\').val(),
success: function(html)
{
if (html == \'false\')
{
$("#contains_states").fadeOut();
$(\'#id_state option[value=0]\').attr("selected", "selected");
}
else
{
$("#id_state").html(html);
$("#contains_states").fadeIn();
$(\'#id_state option[value='.(int)$obj->id_state.']\').attr("selected", "selected");
}
}
});
';
if (file_exists(_MODULE_DIR_.'vatnumber/ajax.php'))
echo ' $.ajax({
type: "GET",
url: "'._MODULE_DIR_.'vatnumber/ajax.php?id_country="+$(\'#id_country\').val(),
success: function(isApplicable)
{
if(isApplicable == 1)
$(\'#vat_area\').show();
else
$(\'#vat_area\').hide();
}
});';
echo ' };
});
</script>
<div id="contains_states" '.(!Country::containsStates((int)$selectedCountry) ? 'style="display:none;"' : '').'>
<label>'.$this->l('State').'</label>
</div>';
}
elseif ($addr_field_item == 'address1')
{
echo '
<label>'.$this->l('Address').'</label>
<div class="margin-form">
<select name="id_state" id="id_state">
</select>
</div>
<input type="text" size="33" name="address1" value="'.htmlentities($this->getFieldValue($obj, 'address1'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div>';
}
elseif ($addr_field_item == 'address2')
{
echo '
<label>'.$this->l('Address').' (2):</label>
<div class="margin-form">
<input type="text" size="33" name="address2" value="'.htmlentities($this->getFieldValue($obj, 'address2'), ENT_COMPAT, 'UTF-8').'" />
</div>';
}
elseif ($addr_field_item == 'postcode')
{
echo '
<label>'.$this->l('Postcode/ Zip Code').'</label>
<div class="margin-form">
<input type="text" size="33" name="postcode" value="'.htmlentities($this->getFieldValue($obj, 'postcode'), ENT_COMPAT, 'UTF-8').'" />
</div>';
}
elseif ($addr_field_item == 'city')
{
echo '
<label>'.$this->l('City').'</label>
<div class="margin-form">
<input type="text" size="33" name="city" value="'.htmlentities($this->getFieldValue($obj, 'city'), ENT_COMPAT, 'UTF-8').'" style="text-transform: uppercase;" /> <sup>*</sup>
</div>';
}
elseif ($addr_field_item == 'country')
{
echo '
<label>'.$this->l('Country').'</label>
<div class="margin-form">
<select name="id_country" id="id_country" />';
$selectedCountry = $this->getFieldValue($obj, 'id_country');
foreach ($this->countriesArray AS $id_country => $name)
echo ' <option value="'.$id_country.'"'.((!$selectedCountry AND Configuration::get('PS_COUNTRY_DEFAULT') == $id_country) ? ' selected="selected"' : ($selectedCountry == $id_country ? ' selected="selected"' : '')).'>'.$name.'</option>';
echo ' </select> <sup>*</sup>
</div>';
echo '
<div id="contains_states" '.(!Country::containsStates((int)$selectedCountry) ? 'style="display:none;"' : '').'>
<label>'.$this->l('State').'</label>
<div class="margin-form">
<select name="id_state" id="id_state">
</select>
</div>
</div>';
$id_country_ajax = (int)$this->getFieldValue($obj, 'id_country');
echo '
<script type="text/javascript">
$(document).ready(function(){
ajaxStates ();
$(\'#id_country\').change(function() {
ajaxStates ();
});
function ajaxStates ()
{
$.ajax({
url: "ajax.php",
cache: false,
data: "ajaxStates=1&id_country="+$(\'#id_country\').val()+"&id_state="+$(\'#id_state\').val(),
success: function(html)
{
if (html == \'false\')
{
$("#contains_states").fadeOut();
$(\'#id_state option[value=0]\').attr("selected", "selected");
}
else
{
$("#id_state").html(html);
$("#contains_states").fadeIn();
$(\'#id_state option[value='.(int)$obj->id_state.']\').attr("selected", "selected");
}
}
}); ';
if (file_exists(_MODULE_DIR_.'vatnumber/ajax.php'))
echo ' $.ajax({
type: "GET",
url: "'._MODULE_DIR_.'vatnumber/ajax.php?id_country="+$(\'#id_country\').val(),
success: function(isApplicable)
{
if(isApplicable == 1)
$(\'#vat_area\').show();
else
$(\'#vat_area\').hide();
}
});';
echo ' }; }); </script>';
}
} // End foreach
echo '
<label>'.$this->l('Home phone').'</label>
<div class="margin-form">
<input type="text" size="33" name="phone" value="'.htmlentities($this->getFieldValue($obj, 'phone'), ENT_COMPAT, 'UTF-8').'" />
</div>
</div>';
echo '
<label>'.$this->l('Mobile phone').'</label>
<div class="margin-form">
<input type="text" size="33" name="phone_mobile" value="'.htmlentities($this->getFieldValue($obj, 'phone_mobile'), ENT_COMPAT, 'UTF-8').'" />
</div>
</div>';
echo '
<label>'.$this->l('Other').'</label>
<div class="margin-form">
<textarea name="other" cols="36" rows="4">'.htmlentities($this->getFieldValue($obj, 'other'), ENT_COMPAT, 'UTF-8').'</textarea>
<span class="hint" name="help_box">'.$this->l('Forbidden characters:').' <>;=#{}<span class="hint-pointer">&nbsp;</span></span>
</div>
</div>';
echo '
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
<div class="small"><sup>*</sup> '.$this->l('Required field').'</div>
</fieldset>
</fieldset>';
echo '
</form>';
}
protected function processAddressFormat()
{
$tmp_addr = new Address((int)Tools::getValue("id_address"));
$selectedCountry = (!is_null($tmp_addr)) ? $tmp_addr->id_country : (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$inv_all_fields = array();
$dlv_all_fields = array();
$out = array();
foreach (array('inv','dlv') as $adr_type)
{
foreach (${$adr_type.'_adr_fields'} as $fields_line)
foreach(explode(' ',$fields_line) as $field_item)
${$adr_type.'_all_fields'}[] = trim($field_item);
$out[$adr_type.'_adr_fields'] = ${$adr_type.'_adr_fields'};
$out[$adr_type.'_all_fields'] = ${$adr_type.'_all_fields'};
}
return $out;
}
}
+1
View File
@@ -59,6 +59,7 @@ class AdminContact extends AdminPreferences
'PS_SHOP_FAX' => array('title' => $this->l('Fax:'), 'validation' => 'isGenericName', 'size' => 30, 'type' => 'text'),
);
parent::__construct();
}
public function postProcess()
+43
View File
@@ -59,7 +59,35 @@ class AdminCountries extends AdminTab
if (isset($_GET['delete'.$this->table]) OR Tools::getValue('submitDel'.$this->table))
$this->_errors[] = Tools::displayError('You cannot delete a country. If you do not want it available for customers, please disable it.');
else
{
if (Tools::getValue('submitAdd'.$this->table))
{
$id_country = Tools::getValue('id_country');
$tmp_addr_format = new AddressFormat($id_country);
$save_status = false;
$is_new = is_null($tmp_addr_format->id_country);
if ($is_new)
{
$tmp_addr_format = new AddressFormat();
$tmp_addr_format->id_country = $id_country;
}
$tmp_addr_format->format = Tools::getValue('address_layout');
if (strlen($tmp_addr_format->format) > 0)
{
if ($tmp_addr_format->checkFormatFields())
$save_status = ($is_new) ? $tmp_addr_format->save(): $tmp_addr_format->update();
if (!$save_status)
$this->_errors[] = Tools::displayError('Invalid address layout'.Db::getInstance()->getMsgError());
}
unset($tmp_addr_format);
}
return parent::postProcess();
}
}
public function displayForm($isMainTab = true)
@@ -113,6 +141,7 @@ class AdminCountries extends AdminTab
$zones = Zone::getZones();
foreach ($zones AS $zone)
echo ' <option value="'.(int)($zone['id_zone']).'"'.(($this->getFieldValue($obj, 'id_zone') == $zone['id_zone']) ? ' selected="selected"' : '').'>'.$zone['name'].'</option>';
$address_layout = AddressFormat::getAddressCountryFormat($obj->id);
echo ' </select>
<p>'.$this->l('Geographical zone where country is located').'</p>
</div>
@@ -128,6 +157,12 @@ class AdminCountries extends AdminTab
<input type="text" name="zip_code_format" id="zip_code_format" value="'.$this->getFieldValue($obj, 'zip_code_format').'" onkeyup="$(\'#zip_code_format\').val($(\'#zip_code_format\').val().toUpperCase());" /> <sup>*</sup>
<p>'.$this->l('National zip code (L for a letter, N for a number and C for the Iso code), e.g., NNNNN for France. No verification if undefined').'.</p>
</div>
<label class="address_layout">'.$this->l('Address layout:').' </label>
<div class="margin-form" style="vertical-align: top;">
<p style="float: left;"><textarea id="ordered_fields" name="address_layout" style="width: 300px;height: 120px;">'.$address_layout.'</textarea></p>
<p style="float: left;margin-left: 10px;"><a href="#" onClick="$(\'textarea#ordered_fields\').val(unescape(\''.urlencode($address_layout).'\'.replace(/\+/g, \' \')));return false;" class="button">'.$this->l('Reset address layout').'</a></p>
<p class="clear">'.$this->l('Possible fields :').' '.implode(', ', (Address::getDispFieldsValidate())).'</p>
</div>
<label>'.$this->l('Status:').' </label>
<div class="margin-form">
<input type="radio" name="active" id="active_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'active')) ? 'checked="checked" ' : '').'/>
@@ -150,6 +185,14 @@ class AdminCountries extends AdminTab
<input type="radio" name="need_identification_number" id="need_identification_number_off" value="0" '.((!$this->getFieldValue($obj, 'need_identification_number') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="need_identification_number_off"> <img src="../img/admin/disabled.gif" alt="" title="" />'.$this->l('No').'</label>
</div>
<div class="clear"></div>
<label>'.$this->l('Display tax label:').' </label>
<div class="margin-form">
<input type="radio" name="display_tax_label" id="display_tax_label_on" value="1" '.((!$obj->id OR $this->getFieldValue($obj, 'display_tax_label')) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_tax_label_on"> <img src="../img/admin/enabled.gif" alt="" title="" />'.$this->l('Yes').'</label>
<input type="radio" name="display_tax_label" id="display_tax_label_off" value="0" '.((!$this->getFieldValue($obj, 'display_tax_label') AND $obj->id) ? 'checked="checked" ' : '').'/>
<label class="t" for="display_tax_label_off"> <img src="../img/admin/disabled.gif" alt="" title="" />'.$this->l('No').'</label>
</div>
<div class="margin-form">
<input type="submit" value="'.$this->l(' Save ').'" name="submitAdd'.$this->table.'" class="button" />
</div>
+4 -3
View File
@@ -90,7 +90,7 @@ class AdminEmployees extends AdminTab
return;
$profiles = Profile::getProfiles((int)($cookie->id_lang));
echo '<script type="text/javascript" src="../js/jquery/jquery-colorpicker.js"></script>
echo '<script type="text/javascript" src="'._PS_JS_DIR_.'/jquery/jquery-colorpicker.js"></script>
<script type="text/javascript">
var employeePage = true;
</script>
@@ -118,8 +118,9 @@ class AdminEmployees extends AdminTab
<input type="text" size="33" name="email" value="'.htmlentities($this->getFieldValue($obj, 'email'), ENT_COMPAT, 'UTF-8').'" /> <sup>*</sup>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Back office color:').' </label>
<div class="margin-form">
<input type="color" data-hex="true" class="color mColorPickerInput" name="bo_color" value="'.htmlentities($this->getFieldValue($obj, 'bo_color'), ENT_COMPAT, 'UTF-8').'" />
<div class="margin-form">';
// Note : width= fix Firefox 4 display bug related to colorpicker librarie
echo '<input type="color" width="50px" data-hex="true" class="color mColorPickerInput" name="bo_color" value="'.htmlentities($this->getFieldValue($obj, 'bo_color'), ENT_COMPAT, 'UTF-8').'" />
<p>'.$this->l('Back office background will be displayed in this color. HTML colors only (e.g.,').' "lightblue", "#CC6600")</p>
</div><div class="clear">&nbsp;</div>
<label>'.$this->l('Language:').' </label>
+1 -1
View File
@@ -1291,7 +1291,7 @@ class AdminImport extends AdminTab
return sizeof($tmp);
}
private function _usortFiles($a, $b)
private static function _usortFiles($a, $b)
{
$a = strrev(substr(strrev($a), 0, 14));
$b = strrev(substr(strrev($b), 0, 14));
+1 -1
View File
@@ -531,7 +531,7 @@ class AdminModules extends AdminTab
}
if ($showCountryModules)
if (isset($module->limited_countries) AND ((is_array($module->limited_countries) AND !in_array(strtolower($isoCountryDefault), $module->limited_countries)) OR (!is_array($module->limited_countries) AND strtolower($isoCountryDefault) != strval($module->limited_countries))))
if (isset($module->limited_countries) AND ((is_array($module->limited_countries) AND sizeof($module->limited_countries) AND !in_array(strtolower($isoCountryDefault), $module->limited_countries)) OR (!is_array($module->limited_countries) AND strtolower($isoCountryDefault) != strval($module->limited_countries))))
unset($modules[$key]);
if (!empty($filterName))
+65 -16
View File
@@ -685,27 +685,22 @@ class AdminOrders extends AdminTab
<a href="?tab=AdminAddresses&id_address='.$addressDelivery->id.'&addaddress&realedit=1&id_order='.$order->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=1' : '').'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'&back='.urlencode($_SERVER['REQUEST_URI']).'"><img src="../img/admin/edit.gif" /></a>
<a href="http://maps.google.com/maps?f=q&hl='.$currentLanguage->iso_code.'&geocode=&q='.$addressDelivery->address1.' '.$addressDelivery->postcode.' '.$addressDelivery->city.($addressDelivery->id_state ? ' '.$deliveryState->name: '').'" target="_blank"><img src="../img/admin/google.gif" alt="" class="middle" /></a>
</div>
'. (!empty($addressDelivery->company) ? $addressDelivery->company.'<br />' : '') .$addressDelivery->firstname.' '.$addressDelivery->lastname.'<br />
'.$addressDelivery->address1.'<br />'. (!empty($addressDelivery->address2) ? $addressDelivery->address2.'<br />' : '') .'
'.$addressDelivery->postcode.' '.$addressDelivery->city.'<br />
'.$addressDelivery->country.($addressDelivery->id_state ? ' - '.$deliveryState->name : '').'<br />
'.(!empty($addressDelivery->phone) ? $addressDelivery->phone.'<br />' : '').'
'.(!empty($addressDelivery->phone_mobile) ? $addressDelivery->phone_mobile.'<br />' : '').'
'.(!empty($addressDelivery->other) ? '<hr />'.$addressDelivery->other.'<br />' : '').'
</fieldset>
'.$this->displayAddressDetail($addressDelivery)
// . (!empty($addressDelivery->company) ? $addressDelivery->company.'<br />' : '') .$addressDelivery->firstname.' '.$addressDelivery->lastname.'<br />
// '.$addressDelivery->address1.'<br />'. (!empty($addressDelivery->address2) ? $addressDelivery->address2.'<br />' : '') .'
// '.$addressDelivery->postcode.' '.$addressDelivery->city.'<br />
// '.$addressDelivery->country.($addressDelivery->id_state ? ' - '.$deliveryState->name : '').'<br />
// '.(!empty($addressDelivery->phone) ? $addressDelivery->phone.'<br />' : '').'
// '.(!empty($addressDelivery->phone_mobile) ? $addressDelivery->phone_mobile.'<br />' : '').'
// '.(!empty($addressDelivery->other) ? '<hr />'.$addressDelivery->other.'<br />' : '').'
.'</fieldset>
</div>
<div style="float: left; margin-left: 40px">
<fieldset style="width: 400px;">
<legend><img src="../img/admin/invoice.gif" alt="'.$this->l('Invoice address').'" />'.$this->l('Invoice address').'</legend>
<div style="float: right"><a href="?tab=AdminAddresses&id_address='.$addressInvoice->id.'&addaddress&realedit=1&id_order='.$order->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=2' : '').'&back='.urlencode($_SERVER['REQUEST_URI']).'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'"><img src="../img/admin/edit.gif" /></a></div>
'. (!empty($addressInvoice->company) ? $addressInvoice->company.'<br />' : '').(!empty($addressInvoice->vat_number) ? $addressInvoice->vat_number.'<br />' : '').$addressInvoice->firstname.' '.$addressInvoice->lastname.'<br />
'.$addressInvoice->address1.'<br />'. (!empty($addressInvoice->address2) ? $addressInvoice->address2.'<br />' : '') .'
'.$addressInvoice->postcode.' '.$addressInvoice->city.'<br />
'.$addressInvoice->country.($addressInvoice->id_state ? ' - '.$invoiceState->name : '').'<br />
'.(!empty($addressInvoice->phone) ? $addressInvoice->phone.'<br />' : '').'
'.(!empty($addressInvoice->phone_mobile) ? $addressInvoice->phone_mobile.'<br />' : '').'
'.(!empty($addressInvoice->other) ? '<hr />'.$addressInvoice->other.'<br />' : '').'
</fieldset>
'.$this->displayAddressDetail($addressInvoice)
.'</fieldset>
</div>
<div class="clear">&nbsp;</div>';
@@ -935,6 +930,60 @@ class AdminOrders extends AdminTab
echo '<br /><br /><a href="'.$currentIndex.'&token='.$this->token.'"><img src="../img/admin/arrow2.gif" /> '.$this->l('Back to list').'</a><br />';
}
public function displayAddressDetail($address)
{
$optional_fields = array(
'company' => 1
, 'phone' => 1
, 'phone_mobile' => 1
, 'address2' => 1
);
$out = '';
$address_datas = AddressFormat::getAddressCountryFormat($address->id_country);
$field_other = $address->other;
$lines_out = $address->getOrderedValues(array(
'spacer' => ' '
, 'optional' => $optional_fields
)
, $address_datas);
$out = implode("<br />", $lines_out) .((!(is_null($field_other) || $field_other == '') )? '<hr />'.$field_other: '');
return $out;
}
/**
* returns String array values according to the given string pattern
*
*/
public function getOrderedValues($address, $pattern, array $given_values = null)
{
$out = array();
if (!empty($fields) && $fields != '' && !is_null($address))
{
$sep = "\n";
$line_sep = ' ';
$lines = explode($sep, $pattern);
foreach ($lines as $one_line)
{
if(!empty($one_line) && $one_line!= '')
{
$tmp_values = array();
$words = explode($line_sep, trim($one_line));
$tmp_words = array();
// String append instead of Array append
foreach ($words as $one_word)
$tmp_values[$one_word] = (is_null($given_values)) ? $address->{$one_word} : $given_values[$one_word];
$out[] = array($tmp_values, implode(' ', $tmp_values));
}
}
}
return $out;
}
public function display()
{
global $cookie;
+4 -1
View File
@@ -270,6 +270,7 @@ class AdminPreferences extends AdminTab
$val[$language['id_lang']] = isset($values['cast']) ? $values['cast'](Tools::getValue($field.'_'.$language['id_lang'])) : Tools::getValue($field.'_'.$language['id_lang']);
else
$val = isset($values['cast']) ? $values['cast'](Tools::getValue($field)) : Tools::getValue($field);
Configuration::updateValue($field, $val);
}
Tools::redirectAdmin($currentIndex.'&conf=6'.'&token='.$this->token);
@@ -303,10 +304,11 @@ class AdminPreferences extends AdminTab
$tab['db_prefix'] = _DB_PREFIX_;
$tab['db_user'] = _DB_USER_;
$tab['db_passwd'] = '';
return $tab;
}
private function getDivLang($fields)
private function getDivLang($fields)
{
$tab = array();
foreach ($fields AS $key => $field)
@@ -347,6 +349,7 @@ class AdminPreferences extends AdminTab
if (isset($field['required']) AND $field['required'])
$required = true;
$val = $this->getVal($confValues, $key);
if (!in_array($field['type'], array('image', 'radio', 'container', 'container_end')) OR isset($field['show']))
echo '<div style="clear: both; padding-top:15px;">'.($field['title'] ? '<label >'.$field['title'].'</label>' : '').'<div class="margin-form" style="padding-top:5px;">';
+15 -31
View File
@@ -420,12 +420,13 @@ class AdminTranslations extends AdminTab
foreach ($matches[1] AS $key)
{
$module_key = ($is_default ? self::DEFAULT_THEME_NAME : '').'<{'.Tools::strtolower($module_name).'}'.($is_default ? 'prestashop' : $theme_name).'>'.Tools::strtolower($template_name).'_'.md5($key);
$module_key = ($is_default ? self::DEFAULT_THEME_NAME : '').'<{'.Tools::strtolower($module_name).'}'.strtolower($is_default ? 'prestashop' : $theme_name).'>'.Tools::strtolower($template_name).'_'.md5($key);
// to avoid duplicate entry
if (!in_array($module_key, $array_check_duplicate))
{
$array_check_duplicate[] = $module_key;
$this->modules_translations[($is_default ? self::DEFAULT_THEME_NAME : $theme_name)][$module_name][$template_name][$key] = key_exists($module_key, $_MODULES) ? html_entity_decode($_MODULES[$module_key], ENT_COMPAT, 'UTF-8') : '';
$this->modules_translations[strtolower($is_default ? self::DEFAULT_THEME_NAME : $theme_name)][$module_name][$template_name][$key]
= key_exists($module_key, $_MODULES) ? html_entity_decode($_MODULES[$module_key], ENT_COMPAT, 'UTF-8') : '';
$this->total_expression++;
}
}
@@ -1486,39 +1487,22 @@ class AdminTranslations extends AdminTab
}
protected function getTinyMCEForMails($iso_lang)
{
// TinyMCE
$isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso_lang.'.js') ? $iso_lang : 'en');
$ad = dirname($_SERVER["PHP_SELF"]);
return '
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
var iso = \''.$isoTinyMCE.'\' ;
var pathCSS = \''._THEME_CSS_DIR_.'\' ;
var ad = \''.$ad.'\' ;
</script>
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "specific_textareas",
editor_deselector : "noEditor",
theme : "advanced",
plugins : "safari,pagebreak,style,layer,table,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,fullscreen",
// Theme options
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : false,
content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css",
document_base_url : "'.__PS_BASE_URI__.'",
width: "600",
height: "600",
font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",
elements : "nourlconvert",
entity_encoding: "raw",
convert_urls : false,
language : "'.(file_exists(_PS_ROOT_DIR_.'/js/tinymce/jscripts/tiny_mce/langs/'.$iso_lang.'.js') ? $iso_lang : 'en').'"
});
function displayTiny(obj) {
function displayTiny(obj) {
tinyMCE.get(obj.attr(\'name\')).show();
}
</script>
';
</script>';
}
public function displayFormMails($lang, $noDisplay = false)
{
+141 -2
View File
@@ -168,6 +168,145 @@ class AddressCore extends ObjectModel
}
}
/**
* Returns fields required for an address in an array hash
* @return array hash values
*/
public static function getFieldsValidate()
{
$tmp_addr = new Address();
$out = ($tmp_addr->fieldsValidate);
unset($tmp_addr);
return $out;
}
/**
* Returns selected fields required for an address in an array according to a selection hash
* @return array String values
*/
public static function getDispFieldsValidate()
{
$out = array();
$remove_fields = array(
'id_customer' => 1
,'id_manufacturer' => 1
,'id_supplier' => 1
,'deleted'=> 1
,'dni' => 1
,'vat_number' => 1
,'other' => 1
);
$fields_hash = self::getFieldsValidate();
foreach (array_keys($fields_hash) as $field_item)
{
if (!isset($remove_fields[$field_item]))
{
if ($field_item == 'id_country')
$field_item = 'country';
elseif($field_item == 'id_state')
$field_item = 'state';
$out[] = $field_item;
}
}
return $out;
}
/**
* Returns values ordered in an array according to given fields
* @param array $config set options for the method formated as
$config = array(
'spacer' => ' '
, 'optional' => array(
'company' => 1
,'phone' => 1
)
, 'ignore' => array(
'phone_mobile' => 1
)
, 'return_set' => true (true: hash return, false: String array)
)
* @param String $pattern lines of each needed fields \n splitted
* @param array $values optionnal given values
* @return array field values or hash values
*/
public static function getOrderedValuesFromArray($config, $pattern, array $values = null)
{
$tmp_address = new Address();
$out = $tmp_address->getOrderedValues($config, $pattern, $values);
unset($tmp_address);
return $out;
}
/**
* Returns values ordered in an array according to given fields
* @param array $config set options for the method formated as
$config = array(
'spacer' => ' '
, 'optional' => array(
'company' => 1
,'phone' => 1
,'phone_mobile' => 1
)
, 'return_set' => true
)
* @param String $address_datas lines of each needed fields \n splitted
* @param array $given_values optionnal given values
* @return array field values or values in a hash
*/
public function getOrderedValues(array $config, $address_datas, array $given_values = null)
{
$spacer = $config["spacer"]; // String used for joining lines_out
$optional_fields = (isset($config["optional"]))? $config["optional"] : array(); // array hash tells which fields are optional
$ignore = (isset($config["ignore"]))? $config["ignore"] : array(); // array hash tells which fields are ignored
$return_set = (!empty($config["return_set"])) ? $config["return_set"] : false;
$line_breaker = "\n"; // used in address_datas format
$lines_out = array();
$fields_lines = explode($line_breaker, $address_datas);
foreach ($fields_lines as $one_line)
if(!empty($one_line) && $one_line!= '')
{
$tmp_values = array();
$val_added = false;
$words = explode(' ', trim($one_line));
$tmp_words = array();
foreach ($words as $one_word)
{
if (!isset($ignore[$one_word]))
{
$one_word = trim($one_word);
$val = (is_null($given_values)) ? $this->{$one_word} : $given_values[$one_word];
if ((!empty($val) && $val != '') || ((empty($val) || $val == '') && (isset($optional_fields[$one_word]) != 1)))
{
$tmp_values[$one_word] = $val;
$val_added = true;
}
}
}
if ($val_added)
$lines_out[] = ($return_set) ? $tmp_values : implode($spacer, $tmp_values);
}
return $lines_out;
}
public function getFields()
{
parent::validateFields();
@@ -197,9 +336,9 @@ class AddressCore extends ObjectModel
return $fields;
}
public function validateControler($htmlentities = true)
public function validateController($htmlentities = true)
{
$errors = parent::validateControler($htmlentities);
$errors = parent::validateController($htmlentities);
if (!Configuration::get('VATNUMBER_CHECKING'))
return $errors;
include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
+137
View File
@@ -0,0 +1,137 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class AddressFormatCore extends ObjectModel
{
/** @var integer */
public $id_address_format;
/** @var integer */
public $id_country;
/** @var string */
public $format;
protected $fieldsRequired = array ('format');
protected $fieldsValidate = array ('format' => 'isGenericName');
/* MySQL does not allow 'order detail' for a table name */
protected $table = 'address_format';
protected $identifier = 'id_country';
public function getFields()
{
parent::validateFields();
$fields['id_country'] = (int)($this->id_country);
$fields['format'] = pSQL($this->format);
return $fields;
}
public function checkFormatFields()
{
$out = true;
$addr_f_validate = Address::getFieldsValidate();
$fields_format = explode("\n", $this->format);
foreach($fields_format as $field_line)
{
$fields = explode(' ', trim($field_line));
foreach($fields as $field_item)
{
$field_item = trim($field_item);
if (!isset($addr_f_validate[$field_item]) && !isset($addr_f_validate['id_'.$field_item]))
$out = false;
}
}
return $out;
}
/**
* Returns address format fields in array by country
*
* @param Integer PS_COUNTRY.id
* @return Array String field address format
*/
public static function getOrderedAddressFields($id_country)
{
$out = array();
$field_set = explode("\n", self::getAddressCountryFormat($id_country));
foreach ($field_set as $field_item)
{
$out[] = trim($field_item);
}
return $out;
}
/**
* Returns address format by country if not defined using default country
*
* @param Integer PS_COUNTRY.id
* @return String field address format
*/
public static function getAddressCountryFormat($id_country)
{
$out = '';
$tmp_obj = new AddressFormat();
$tmp_obj->id_country = $id_country;
$out = $tmp_obj->getFormat($tmp_obj->id_country);
unset($tmp_obj);
return $out;
}
/**
* Returns address format by country
*
* @param Integer PS_COUNTRY.id
* @return String field address format
*/
public function getFormat($id_country)
{
global $defaultCountry;
$out = $this->_getFormatDB($id_country);
if (strlen(trim($out)) == 0)
{
$out = $this->_getFormatDB($defaultCountry->id);
}
return $out;
}
private function _getFormatDB($id_country)
{
$result = Db::getInstance()->getRow('
SELECT format
FROM `'._DB_PREFIX_.$this->table.'`
WHERE `id_country` = '.(int)($id_country));
return isset($result['format']) ? $result['format'] : false;
}
}
+10 -8
View File
@@ -185,14 +185,15 @@ abstract class AdminTabCore
if ($className == 'AdminCategories' OR $className == 'AdminProducts')
$className = 'AdminCatalog';
$this->token = Tools::getAdminToken($className.(int)($this->id).(int)($cookie->id_employee));
}
/**
* use translations files to replace english expression.
*
*
* @param mixed $string term or expression in english
* @param string $class
* @param string $class
* @param boolan $addslashes if set to true, the return value will pass through addslashes(). Otherwise, stripslashes().
* @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8')
* @return string the translation if available, or the english default text.
@@ -297,6 +298,7 @@ abstract class AdminTabCore
foreach ($res AS $row)
$required_fields[(int)$row['id_required_field']] = $row['field_name'];
$table_fields = Db::getInstance()->ExecuteS('SHOW COLUMNS FROM '.pSQL(_DB_PREFIX_.$this->table));
$irow = 0;
foreach ($table_fields AS $field)
@@ -1094,7 +1096,7 @@ abstract class AdminTabCore
LIMIT '.(int)($start).','.(int)($limit);
$this->_list = Db::getInstance()->ExecuteS($sql);
$this->_listTotal = count(Db::getInstance()->ExecuteS('SELECT
$this->_listTotal = count(Db::getInstance()->ExecuteS('SELECT
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').'
'.($this->lang ? 'b.*, ' : '').'a.*'.(isset($this->_select) ? ', '.$this->_select.' ' : '').'
FROM `'._DB_PREFIX_.$sqlTable.'` a
@@ -1105,8 +1107,8 @@ abstract class AdminTabCore
'.((isset($this->_filterHaving) || isset($this->_having)) ? 'HAVING ' : '').(isset($this->_filterHaving) ? ltrim($this->_filterHaving, ' AND ') : '').(isset($this->_having) ? $this->_having.' ' : '').'
ORDER BY '.(($orderBy == $this->identifier) ? 'a.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).
($this->_tmpTableFilter ? ') tmpTable WHERE 1'.$this->_tmpTableFilter : '')));
}
/**
@@ -1145,9 +1147,9 @@ abstract class AdminTabCore
global $currentIndex, $cookie;
$isCms = false;
if (preg_match('/cms/Ui', $this->identifier))
$isCms = true;
$isCms = true;
$id_cat = Tools::getValue('id_'.($isCms ? 'cms_' : '').'category');
if (!isset($token) OR empty($token))
$token = $this->token;
@@ -1469,7 +1471,7 @@ abstract class AdminTabCore
{
global $currentIndex;
echo '<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&'.$active.
echo '<a href="'.$currentIndex.'&'.$this->identifier.'='.$id.'&'.$active.$this->table.
((int)$id_category AND (int)$id_product ? '&id_category='.$id_category : '').'&token='.($token!=NULL ? $token : $this->token).'">
<img src="../img/admin/'.($value ? 'enabled.gif' : 'disabled.gif').'"
alt="'.($value ? $this->l('Enabled') : $this->l('Disabled')).'" title="'.($value ? $this->l('Enabled') : $this->l('Disabled')).'" /></a>';
+48 -25
View File
@@ -684,13 +684,13 @@ class CartCore extends ObjectModel
self::$_nbProducts = NULL;
if ((int)($id_customization))
{
$productTotalQuantity = (int)(Db::getInstance()->getValue('SELECT `quantity`
FROM `'._DB_PREFIX_.'cart_product`
$productTotalQuantity = (int)(Db::getInstance()->getValue('SELECT `quantity`
FROM `'._DB_PREFIX_.'cart_product`
WHERE `id_product` = '.(int)($id_product).' AND `id_product_attribute` = '.(int)($id_product_attribute)));
$customizationQuantity = (int)(Db::getInstance()->getValue('SELECT `quantity`
FROM `'._DB_PREFIX_.'customization`
WHERE `id_cart` = '.(int)($this->id).'
AND `id_product` = '.(int)($id_product).'
$customizationQuantity = (int)(Db::getInstance()->getValue('SELECT `quantity`
FROM `'._DB_PREFIX_.'customization`
WHERE `id_cart` = '.(int)($this->id).'
AND `id_product` = '.(int)($id_product).'
AND `id_product_attribute` = '.(int)($id_product_attribute)));
if (!$this->_deleteCustomization((int)($id_customization), (int)($id_product), (int)($id_product_attribute)))
return false;
@@ -719,7 +719,7 @@ class CartCore extends ObjectModel
}
/**
* Delete a customization from the cart. If customization is a Picture (type=2),
* Delete a customization from the cart. If customization is a Picture (type=2),
* then the image is also deleted
*
* @param integer $id_customization
@@ -729,7 +729,7 @@ class CartCore extends ObjectModel
{
$result = true;
$customization = Db::getInstance()->getRow('SELECT *
FROM `'._DB_PREFIX_.'customization`
FROM `'._DB_PREFIX_.'customization`
WHERE `id_customization` = '.(int)($id_customization));
if ($customization and sizeof($customization))
@@ -737,7 +737,7 @@ class CartCore extends ObjectModel
$custData = Db::getInstance()->getRow('SELECT *
FROM `'._DB_PREFIX_.'customized_data`
WHERE `id_customization` = '.(int)($id_customization));
if (isset($custData['type']) and $custData['type'] == 0)
$result &= $this->deletePictureToProduct($id_product,$custData['value']);
@@ -748,15 +748,15 @@ class CartCore extends ObjectModel
if($result)
$result &= Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'cart_product`
SET `quantity` = `quantity` - '.(int)($customization['quantity']).'
WHERE `id_cart` = '.(int)($this->id).'
AND `id_product` = '.(int)($id_product).((int)($id_product_attribute) ? '
WHERE `id_cart` = '.(int)($this->id).'
AND `id_product` = '.(int)($id_product).((int)($id_product_attribute) ? '
AND `id_product_attribute` = '.(int)($id_product_attribute) : ''));
if (!$result)
return false;
return Db::getInstance()->Execute('DELETE
FROM `'._DB_PREFIX_.'customization`
return Db::getInstance()->Execute('DELETE
FROM `'._DB_PREFIX_.'customization`
WHERE `id_customization` = '.(int)($id_customization));
}
@@ -829,8 +829,10 @@ class CartCore extends ObjectModel
if ($withTaxes)
{
$total_price = ($total_price - $total_ecotax) * (1 + (float)(Tax::getProductTaxRate((int)$product['id_product'], (int)$this->{Configuration::get('PS_TAX_ADDRESS_TYPE')})) / 100);
$total_price = Tools::ps_round($total_price - $total_ecotax, 2);
$total_price = ($total_price - $total_ecotax) * (1 + (float)(Tax::getProductTaxRate((int)$product['id_product'], (int)$this->{Configuration::get('PS_TAX_ADDRESS_TYPE')})) / 100);
$total_ecotax = $total_ecotax * (1 + Tax::getProductEcotaxRate((int)$this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}) / 100);
$total_price = Tools::ps_round($total_price + $total_ecotax, 2);
}
}
else
@@ -971,18 +973,12 @@ class CartCore extends ObjectModel
// If no carrier, select default one
if (!$id_carrier)
$id_carrier = $this->id_carrier;
if (empty($id_carrier))
{
$carrier = new Carrier((int)(Configuration::get('PS_CARRIER_DEFAULT')), Configuration::get('PS_LANG_DEFAULT'));
if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT AND (Carrier::checkDeliveryPriceByWeight((int)(Configuration::get('PS_CARRIER_DEFAULT')), $this->getTotalWeight(), $id_zone)))
OR ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE AND (Carrier::checkDeliveryPriceByPrice((int)(Configuration::get('PS_CARRIER_DEFAULT')), $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, (int)($this->id_currency)))))
{
if ($id_carrier && !$this->isCarrierInRange($id_carrier, $id_zone))
$id_carrier = '';
if (empty($id_carrier) && $this->isCarrierInRange(Configuration::get('PS_CARRIER_DEFAULT'), $id_zone))
$id_carrier = (int)(Configuration::get('PS_CARRIER_DEFAULT'));
}
unset($carrier);
}
if (empty($id_carrier))
{
@@ -1255,6 +1251,7 @@ class CartCore extends ObjectModel
$invoice = new Address((int)($this->id_address_invoice));
$total_tax = $this->getOrderTotal() - $this->getOrderTotal(false);
if ($total_tax < 0)
$total_tax = 0;
@@ -1540,5 +1537,31 @@ class CartCore extends ObjectModel
LEFT JOIN `'._DB_PREFIX_.'cart` ca ON (ca.`id_customer` = cu.`id_customer`)
WHERE ca.`id_cart` = '.(int)$id_cart);
}
/**
* isCarrierInRange
*
* Check if the specified carrier is in range
*
* @id_carrier int
* @id_zone int
*/
public function isCarrierInRange($id_carrier, $id_zone)
{
$carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
$is_in_zone = false;
$order_total = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);
if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT
AND (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone)))
OR ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE
AND (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $order_total, $id_zone, (int)($this->id_currency)))))
{
$is_in_zone = true;
}
unset($carrier);
return $is_in_zone;
}
}
+12 -8
View File
@@ -56,6 +56,9 @@ class CountryCore extends ObjectModel
/** @var string Zip Code Format */
public $zip_code_format;
/** @var boolean Display or not the tax incl./tax excl. mention in the front office */
public $display_tax_label = true;
/** @var boolean Status for delivery */
public $active = true;
@@ -63,9 +66,9 @@ class CountryCore extends ObjectModel
protected $tables = array ('country', 'country_lang');
protected $fieldsRequired = array('id_zone', 'id_currency', 'iso_code', 'contains_states', 'need_identification_number');
protected $fieldsRequired = array('id_zone', 'id_currency', 'iso_code', 'contains_states', 'need_identification_number', 'display_tax_label');
protected $fieldsSize = array('iso_code' => 3);
protected $fieldsValidate = array('id_zone' => 'isUnsignedId', 'id_currency' => 'isUnsignedId', 'call_prefix' => 'isInt', 'iso_code' => 'isLanguageIsoCode', 'active' => 'isBool', 'contains_states' => 'isBool', 'need_identification_number' => 'isBool', 'need_zip_code' => 'isBool', 'zip_code_format' => 'isZipCodeFormat');
protected $fieldsValidate = array('id_zone' => 'isUnsignedId', 'id_currency' => 'isUnsignedId', 'call_prefix' => 'isInt', 'iso_code' => 'isLanguageIsoCode', 'active' => 'isBool', 'contains_states' => 'isBool', 'need_identification_number' => 'isBool', 'need_zip_code' => 'isBool', 'zip_code_format' => 'isZipCodeFormat', 'display_tax_label' => 'isBool');
protected $fieldsRequiredLang = array('name');
protected $fieldsSizeLang = array('name' => 64);
protected $fieldsValidateLang = array('name' => 'isGenericName');
@@ -93,6 +96,7 @@ class CountryCore extends ObjectModel
$fields['need_identification_number'] = (int)($this->need_identification_number);
$fields['need_zip_code'] = (int)($this->need_zip_code);
$fields['zip_code_format'] = $this->zip_code_format;
$fields['display_tax_label'] = $this->display_tax_label;
return $fields;
}
@@ -291,27 +295,27 @@ class CountryCore extends ObjectModel
AND `id_lang` = '.(int)$id_lang
);
}
public function isNeedDni()
{
return (bool)self::isNeedDniByCountryId($this->id);
}
static public function isNeedDniByCountryId($id_country)
{
return (bool)Db::getInstance()->getValue('
SELECT `need_identification_number`
SELECT `need_identification_number`
FROM `'._DB_PREFIX_.'country`
WHERE `id_country` = '.(int)$id_country);
}
static public function containsStates($id_country)
{
return (bool)Db::getInstance()->getValue('
SELECT `contains_states`
SELECT `contains_states`
FROM `'._DB_PREFIX_.'country`
WHERE `id_country` = '.(int)$id_country);
}
}
+22 -9
View File
@@ -71,7 +71,7 @@ class FrontControllerCore
public function init()
{
global $cookie, $smarty, $cart, $iso, $defaultCountry, $protocol_link, $protocol_content, $link, $css_files, $js_files;
$css_files = array();
$js_files = array();
@@ -135,7 +135,10 @@ class FrontControllerCore
if ($cart->OrderExists())
unset($cookie->id_cart, $cart);
/* Delete product of cart, if user can't make an order from his country */
elseif (intval(Configuration::get('PS_GEOLOCATION_ENABLED')) AND !in_array(strtoupper($cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) AND $cart->nbProducts() AND intval(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR')) != -1)
elseif (intval(Configuration::get('PS_GEOLOCATION_ENABLED')) AND
!in_array(strtoupper($cookie->iso_code_country), explode(';', Configuration::get('PS_ALLOWED_COUNTRIES'))) AND
$cart->nbProducts() AND intval(Configuration::get('PS_GEOLOCATION_NA_BEHAVIOR')) != -1 AND
!self::isInWhitelistForGeolocation())
unset($cookie->id_cart, $cart);
elseif ($cookie->id_customer != $cart->id_customer OR $cookie->id_lang != $cart->id_lang OR $cookie->id_currency != $cart->id_currency)
{
@@ -203,6 +206,15 @@ class FrontControllerCore
Product::initPricesComputation();
$display_tax_label = $defaultCountry->display_tax_label;
if ($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})
{
$infos = Address::getCountryAndState((int)($cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}));
$country = new Country((int)$infos['id_country']);
if (Validate::isLoadedObject($country))
$display_tax_label = $country->display_tax_label;
}
$smarty->assign(array(
'link' => $link,
'cart' => $cart,
@@ -225,6 +237,7 @@ class FrontControllerCore
'shop_name' => Configuration::get('PS_SHOP_NAME'),
'roundMode' => (int)Configuration::get('PS_PRICE_ROUND_MODE'),
'use_taxes' => (int)Configuration::get('PS_TAX'),
'display_tax_label' => (bool)$display_tax_label,
'vat_management' => (int)Configuration::get('VATNUMBER_MANAGEMENT'),
'opc' => (bool)Configuration::get('PS_ORDER_PROCESS_TYPE'),
'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')
@@ -275,7 +288,7 @@ class FrontControllerCore
if (Tools::isSubmit('live_edit') AND $ad = Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))
if (!is_dir(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$ad))
die(Tools::displayError());
$this->iso = $iso;
$this->setMedia();
@@ -284,7 +297,7 @@ class FrontControllerCore
/* Display a maintenance page if shop is closed */
protected function displayMaintenancePage()
{
if (!in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP'))))
{
header('HTTP/1.1 503 temporarily overloaded');
@@ -297,7 +310,7 @@ class FrontControllerCore
protected function displayRestrictedCountryPage()
{
global $smarty;
header('HTTP/1.1 503 temporarily overloaded');
$smarty->display(_PS_THEME_DIR_.'restricted-country.tpl');
exit;
@@ -306,7 +319,7 @@ class FrontControllerCore
protected function canonicalRedirection()
{
global $link, $cookie;
if (Configuration::get('PS_CANONICAL_REDIRECT'))
{
// Automatically redirect to the canonical URL if needed
@@ -392,13 +405,13 @@ class FrontControllerCore
public function setMedia()
{
global $cookie;
Tools::addCSS(_THEME_CSS_DIR_.'global.css', 'all');
Tools::addJS(array(_PS_JS_DIR_.'tools.js', _PS_JS_DIR_.'jquery/jquery-1.4.4.min.js', _PS_JS_DIR_.'jquery/jquery.easing.1.3.js'));
if (Tools::isSubmit('live_edit') AND $ad = Tools::getValue('ad') AND (Tools::getValue('liveToken') == sha1(Tools::getValue('ad')._COOKIE_KEY_)))
{
Tools::addJS(array(
_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js',
_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js',
_PS_JS_DIR_.'jquery/jquery.fancybox-1.3.4.js',
_PS_JS_DIR_.'hookLiveEdit.js')
);
@@ -453,7 +466,7 @@ class FrontControllerCore
if (Configuration::get('PS_JS_THEME_CACHE'))
Tools::cccJs();
}
self::$smarty->assign('css_files', $css_files);
self::$smarty->assign('js_files', array_unique($js_files));
self::$smarty->display(_PS_THEME_DIR_.'header.tpl');
+3 -1
View File
@@ -277,6 +277,7 @@ class LanguageCore extends ObjectModel
$langTables[] = $t;
Db::getInstance()->Execute('SET @id_lang_default = (SELECT c.`value` FROM `'._DB_PREFIX_.'configuration` c WHERE c.`name` = \'PS_LANG_DEFAULT\' LIMIT 1)');
$return = true;
foreach($langTables as $name)
{
$fields = '';
@@ -293,8 +294,9 @@ class LanguageCore extends ObjectModel
$sql .= '(SELECT `'.$column['Field'].'` FROM `'.$name.'` tl WHERE tl.`id_lang` = @id_lang_default AND tl.`'.$identifier.'` = `'.str_replace('_lang', '', $name).'`.`'.$identifier.'`), ';
$sql = rtrim($sql, ', ');
$sql .= ' FROM `'._DB_PREFIX_.'lang` CROSS JOIN `'.str_replace('_lang', '', $name).'`) ;';
Db::getInstance()->Execute(pSQL($sql));
$return &= Db::getInstance()->Execute(pSQL($sql));
}
return $return;
}
public static function recurseDeleteDir($dir)
+2 -1
View File
@@ -539,6 +539,7 @@ abstract class ModuleCore
*/
public static function getNonNativeModuleList()
{
$db = Db::getInstance();
$modulesDirOnDisk = Module::getModulesDirOnDisk();
$module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml';
@@ -552,7 +553,7 @@ abstract class ModuleCore
$arrNativeModules[] = '"'.pSQL($module['name']).'"';
}
return Db::getInstance()->ExecuteS('
return $db->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'module` m
WHERE name NOT IN ('.implode(',',$arrNativeModules).') ');
+8
View File
@@ -452,7 +452,15 @@ abstract class ObjectModelCore
return ((is_array($_FIELDS) AND array_key_exists($key, $_FIELDS)) ? ($htmlentities ? htmlentities($_FIELDS[$key], ENT_QUOTES, 'utf-8') : $_FIELDS[$key]) : $field);
}
/**
* TODO: refactor rename all calls to this to validateController
*/
public function validateControler($htmlentities = true)
{
return $this->validateController($htmlentities);
}
public function validateController($htmlentities = true)
{
$errors = array();
+8
View File
@@ -288,17 +288,25 @@ class OrderCore extends ObjectModel
$this->total_products -= $productPriceWithoutTax;
$this->total_products_wt -= $productPrice;
$this->total_shipping = $cart->getOrderShippingCost();
/* It's temporary fix for 1.3 version... */
if ($orderDetail->product_quantity_discount != '0.000000')
$this->total_paid -= ($productPrice + $shippingDiff);
else
$this->total_paid = $cart->getOrderTotal();
$this->total_paid_real -= ($productPrice + $shippingDiff);
/* Prevent from floating precision issues (total_products has only 2 decimals) */
if ($this->total_products < 0)
$this->total_products = 0;
if ($this->total_paid < 0)
$this->total_paid = 0;
if ($this->total_paid_real < 0)
$this->total_paid_real = 0;
/* Prevent from floating precision issues */
$this->total_paid = number_format($this->total_paid, 2, '.', '');
$this->total_paid_real = number_format($this->total_paid_real, 2, '.', '');
+99 -37
View File
@@ -278,23 +278,51 @@ class PDFCore extends PDF_PageGroupCore
$pdf->SetY(25);
$pdf->SetFont(self::fontname(), '', 9);
if (!empty($delivery_address->company))
$ordered_adr_fields = AddressFormat::getOrderedAddressFields($invoice_address->id_country);
$optional_fields = array(
'address2' => 1
, 'company' => 1
);
$ignore_fields = array(
'phone' => 1
, 'mobile_phone' =>1
);
foreach ($ordered_adr_fields as $adr_line)
{
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->company), 0, 'L');
$pdf->Ln(5);
$line_fields = explode(" ", trim($adr_line));
$tmp_dlv_vals = array();
foreach($line_fields as $field_name)
{
// if not skip
if (!isset($ignore_fields[$field_name]))
{
$tmp_dlv = $delivery_address->{$field_name};
if (!((empty($tmp_dlv) || $tmp_dlv == '') && isset($optional_fields[$field_name])))
{
$tmp_dlv = ($field_name == "country") ? $tmp_dlv.($deliveryState ? ' - '.$deliveryState->name : ''): $tmp_dlv;
$tmp_dlv_vals[] = Tools::iconv('utf-8', self::encoding(), $tmp_dlv);
}
}
}
$str_dlv_vals = implode(" ", $tmp_dlv_vals);
$need_nl = false;
if (!empty($str_dlv_vals) && $str_dlv_vals != '' && $str_dlv_vals != ' ')
{
$need_nl = true;
$pdf->Cell($width, 10, $str_dlv_vals, 0, 'L');
}
if ($need_nl)
$pdf->Ln(5);
}
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname), 0, 'L');
$pdf->Ln(5);
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1), 0, 'L');
$pdf->Ln(5);
if (!empty($delivery_address->address2))
{
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address2), 0, 'L');
$pdf->Ln(5);
}
$pdf->Cell($width, 10, $delivery_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L');
$pdf->Ln(5);
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->country.($deliveryState ? ' - '.$deliveryState->name : '')), 0, 'L');
/*
* display order information
@@ -403,6 +431,17 @@ class PDFCore extends PDF_PageGroupCore
$delivery_address = new Address((int)($order->id_address_delivery));
$deliveryState = $delivery_address->id_state ? new State($delivery_address->id_state) : false;
$ordered_adr_fields = AddressFormat::getOrderedAddressFields($invoice_address->id_country);
$optional_fields = array(
'address2' => 1
, 'company' => 1
);
$ignore_fields = array(
'phone' => 1
, 'mobile_phone' =>1
);
$width = 100;
$pdf->SetX(10);
@@ -413,30 +452,53 @@ class PDFCore extends PDF_PageGroupCore
$pdf->Ln(5);
$pdf->SetFont(self::fontname(), '', 9);
if (!empty($delivery_address->company) OR !empty($invoice_address->company))
foreach ($ordered_adr_fields as $adr_line)
{
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->company), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->company), 0, 'L');
$pdf->Ln(5);
$line_fields = explode(" ", trim($adr_line));
$tmp_inv_vals = array();
$tmp_dlv_vals = array();
foreach($line_fields as $field_name)
{
// if not skip
if (!isset($ignore_fields[$field_name]))
{
$tmp_inv = $invoice_address->{$field_name};
$tmp_dlv = $delivery_address->{$field_name};
if (!((empty($tmp_inv) || $tmp_inv == '') && isset($optional_fields[$field_name])))
{
$tmp_inv = ($field_name == "country") ? $tmp_inv.($deliveryState ? ' - '.$deliveryState->name : ''): $tmp_inv;
$tmp_inv_vals[] = Tools::iconv('utf-8', self::encoding(), $tmp_inv);
}
if (!((empty($tmp_dlv) || $tmp_dlv == '') && isset($optional_fields[$field_name])))
{
$tmp_dlv = ($field_name == "country") ? $tmp_dlv.($deliveryState ? ' - '.$deliveryState->name : ''): $tmp_dlv;
$tmp_dlv_vals[] = Tools::iconv('utf-8', self::encoding(), $tmp_dlv);
}
}
}
$str_inv_vals = implode(" ", $tmp_inv_vals);
$str_dlv_vals = implode(" ", $tmp_dlv_vals);
$need_nl = false;
if (!empty($str_dlv_vals) && $str_dlv_vals != '' && $str_dlv_vals != ' ')
{
$need_nl = true;
$pdf->Cell($width, 10, $str_dlv_vals, 0, 'L');
}
if (!empty($str_inv_vals) && $str_inv_vals != '' && $str_inv_vals != ' ')
{
$need_nl = true;
$pdf->Cell($width, 10, $str_inv_vals, 0, 'L');
}
if ($need_nl)
$pdf->Ln(5);
}
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->lastname), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->firstname).' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->lastname), 0, 'L');
$pdf->Ln(5);
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address1), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address1), 0, 'L');
$pdf->Ln(5);
if (!empty($invoice_address->address2) OR !empty($delivery_address->address2))
{
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->address2), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->address2), 0, 'L');
$pdf->Ln(5);
}
$pdf->Cell($width, 10, $delivery_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L');
$pdf->Cell($width, 10, $invoice_address->postcode.' '.Tools::iconv('utf-8', self::encoding(), $invoice_address->city), 0, 'L');
$pdf->Ln(5);
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->country.($deliveryState ? ' - '.$deliveryState->name : '')), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->country.($invoiceState ? ' - '.$invoiceState->name : '')), 0, 'L');
$pdf->Ln(5);
if (Configuration::get('VATNUMBER_MANAGEMENT') AND !empty($invoice_address->vat_number))
{
+64
View File
@@ -367,6 +367,19 @@ abstract class PaymentModuleCore extends Module
'{firstname}' => $customer->firstname,
'{lastname}' => $customer->lastname,
'{email}' => $customer->email,
'{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"),
'{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"),
'{delivery_block_html}' => $this->_getFormatedAddress($delivery, "<br />", array(
'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>'
, 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>'
)),
'{invoice_block_html}' => $this->_getFormatedAddress($invoice, "<br />", array(
'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>'
, 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>'
)),
'{delivery_company}' => $delivery->company,
'{delivery_firstname}' => $delivery->firstname,
'{delivery_lastname}' => $delivery->lastname,
@@ -436,6 +449,57 @@ abstract class PaymentModuleCore extends Module
}
}
/**
* @param Object Address $the_address that needs to be txt formated
* @return String the txt formated address block
*/
private function _getTxtFormatedAddress($the_address)
{
$out = '';
$adr_fields = AddressFormat::getOrderedAddressFields($the_address->id_country);
$r_values = array();
foreach($adr_fields as $fields_line)
{
$tmp_values = array();
foreach (explode(' ', $fields_line) as $field_item)
{
$field_item = trim($field_item);
$tmp_values[] = $the_address->{$field_item};
}
$r_values[] = implode(' ', $tmp_values);
}
$out = implode("\n", $r_values);
return $out;
}
/**
* @param Object Address $the_address that needs to be txt formated
* @return String the txt formated address block
*/
private function _getFormatedAddress(Address $the_address, $line_sep, $fields_style = array())
{
$out = '';
$adr_fields = AddressFormat::getOrderedAddressFields($the_address->id_country);
$r_values = array();
foreach($adr_fields as $fields_line)
{
$tmp_values = array();
foreach (explode(' ', $fields_line) as $field_item)
{
$field_item = trim($field_item);
$tmp_values[] = (isset($fields_style[$field_item]))? sprintf($fields_style[$field_item], $the_address->{$field_item}) : $the_address->{$field_item};
}
$r_values[] = implode(' ', $tmp_values);
}
$out = implode($line_sep, $r_values);
return $out;
}
/**
* @param int $id_currency : this parameter is optionnal but on 1.5 version of Prestashop, it will be REQUIRED
+31 -17
View File
@@ -1593,27 +1593,41 @@ class ProductCore extends ObjectModel
}
$quantity = ($id_cart AND $cart_quantity) ? $cart_quantity : $quantity;
$id_currency = (int)(Validate::isLoadedObject($cur_cart) ? $cur_cart->id_currency : ((isset($cookie->id_currency) AND (int)($cookie->id_currency)) ? $cookie->id_currency : Configuration::get('PS_CURRENCY_DEFAULT')));
if (!$id_address)
$id_address = $cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')};
if (Tax::excludeTaxeOption())
$usetax = false;
// retrieve address informations
$id_country = (int)Country::getDefaultCountryId();
$id_state = 0;
$id_county = 0;
$id_state = 0;
$address_infos = Address::getCountryAndState($id_address);
if ($address_infos['id_country'])
if (!$id_address)
{
$id_country = (int)($address_infos['id_country']);
$id_state = (int)($address_infos['id_state']);
$id_county = (int)County::getIdCountyByZipCode($address_infos['id_state'], $address_infos['postcode']);
if ($id_address = $cur_cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')})
{
$address_infos = Address::getCountryAndState($id_address);
if ($address_infos['id_country'])
{
$id_country = (int)($address_infos['id_country']);
$id_state = (int)($address_infos['id_state']);
$postcode = (int)$address_infos['postcode'];
$id_county = (int)County::getIdCountyByZipCode($id_state, $postcode);
}
} else if (isset($cookie->id_country)) {
// fetch address from cookie
$id_country = (int)$cookie->id_country;
$id_state = (int)$cookie->id_state;
$postcode = (int)$cookie->postcode;
$id_county = (int)County::getIdCountyByZipCode($id_state, $postcode);
}
}
if (Tax::excludeTaxeOption())
$usetax = false;
if ($usetax != false AND !empty($address_infos['vat_number']) AND $address_infos['id_country'] != Configuration::get('VATNUMBER_COUNTRY') AND Configuration::get('VATNUMBER_MANAGEMENT'))
$usetax = false;
@@ -1649,7 +1663,7 @@ class ProductCore extends ObjectModel
$product_attribute_label = 'NULL';
else
$product_attribute_label = ($id_product_attribute === false ? 'false' : $id_product_attribute);
$cacheId = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_group.'-'.$quantity.'-'.$product_attribute_label.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').'-'.($use_reduc?'1':'0');
$cacheId = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_state.'-'.$id_county.'-'.$id_group.'-'.$quantity.'-'.$product_attribute_label.'-'.($use_tax?'1':'0').'-'.$decimals.'-'.($only_reduc?'1':'0').'-'.($use_reduc?'1':'0').'-'.$with_ecotax;
if (isset(self::$_prices[$cacheId]))
return self::$_prices[$cacheId];
@@ -1658,14 +1672,14 @@ class ProductCore extends ObjectModel
$cacheId2 = $id_product.'-'.$id_product_attribute;
if (!isset(self::$_pricesLevel2[$cacheId2]))
self::$_pricesLevel2[$cacheId2] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT p.`price`, p.`ecotax`,
'.($id_product_attribute ? 'pa.`price`' : 'IFNULL((SELECT pa.price FROM `'._DB_PREFIX_.'product_attribute` pa WHERE id_product = '.(int)($id_product).' AND default_on = 1), 0)').' AS attribute_price
SELECT p.`price`,
'.($id_product_attribute ? 'pa.`price`' : 'IFNULL((SELECT pa.price FROM `'._DB_PREFIX_.'product_attribute` pa WHERE id_product = '.(int)($id_product).' AND default_on = 1), 0)').' AS attribute_price,
'.($id_product_attribute ? 'pa.`ecotax`' : 'p.`ecotax`').'
FROM `'._DB_PREFIX_.'product` p
'.($id_product_attribute ? 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON pa.`id_product_attribute` = '.(int)($id_product_attribute) : '').'
WHERE p.`id_product` = '.(int)($id_product));
$result = self::$_pricesLevel2[$cacheId2];
// Cache for specific prices
$cacheId3 = $id_product.'-'.$id_shop.'-'.$id_currency.'-'.$id_country.'-'.$id_group.'-'.$quantity;
@@ -2310,12 +2324,12 @@ class ProductCore extends ObjectModel
public static function duplicateTags($id_product_old, $id_product_new)
{
$resource = Db::getInstance()->ExecuteS('SELECT `id_tag` FROM `'._DB_PREFIX_.'product_tag` WHERE `id_product` = '.(int)($id_product_old));
$tags = Db::getInstance()->ExecuteS('SELECT `id_tag` FROM `'._DB_PREFIX_.'product_tag` WHERE `id_product` = '.(int)($id_product_old));
if (!Db::getInstance()->NumRows())
return true;
$query = 'INSERT INTO `'._DB_PREFIX_.'product_tag` (`id_product`, `id_tag`) VALUES';
while ($row = Db::getInstance()->nextRow($resource))
$query .= ' ('.(int)($id_product_new).', '.(int)($row['id_tag']).'),';
foreach($tags as $tag)
$query .= ' ('.(int)($id_product_new).', '.(int)($tag['id_tag']).'),';
$query = rtrim($query, ',');
return Db::getInstance()->Execute($query);
}
+15 -4
View File
@@ -185,9 +185,20 @@ class StateCore extends ObjectModel
);
}
public static function hasCounties($id_state)
{
return sizeof(County::getCounties((int)$id_state));
}
public static function hasCounties($id_state)
{
return sizeof(County::getCounties((int)$id_state));
}
public static function getIdZone($id_state)
{
if (!Validate::isUnsignedId($id_state))
die(Tools::displayError());
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT `id_zone`
FROM `'._DB_PREFIX_.'state`
WHERE `id_state` = '.(int)($id_state));
}
}
+1 -1
View File
@@ -251,7 +251,7 @@ class ValidateCore
static public function isStateIsoCode($isoCode)
{
return preg_match('/^[a-z0-9]{2}((-)[a-z0-9]{1,3})?$/ui', $isoCode);
return preg_match('/^[a-z0-9]{2,3}((-)[a-z0-9]{1,3})?$/ui', $isoCode);
}
static public function isNumericIsoCode($isoCode)
+9 -6
View File
@@ -42,8 +42,9 @@ ini_set('upload_max_filesize', '100M');
ini_set('default_charset', 'utf-8');
ini_set('magic_quotes_runtime', 0);
/* Correct Apache charset */
header('Content-Type: text/html; charset=utf-8');
// correct Apache charset (except if it's too late
if(!headers_sent())
header('Content-Type: text/html; charset=utf-8');
/* No settings file? goto installer...*/
if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
@@ -58,10 +59,12 @@ require_once(dirname(__FILE__).'/settings.inc.php');
/* Include all defines */
require_once(dirname(__FILE__).'/defines.inc.php');
/* Defines are not in defines.inc.php file for no conflicts in installer */
define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
if (!defined('_PS_MAGIC_QUOTES_GPC_'))
define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_'))
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
/* Autoload */
require_once(dirname(__FILE__).'/autoload.php');
+6
View File
@@ -74,6 +74,8 @@ define('_PS_MAIL_DIR_', _PS_ROOT_DIR_.'/mails/');
define('_PS_ALL_THEMES_DIR_', _PS_ROOT_DIR_.'/themes/');
define('_PS_THEME_DIR_', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/');
define('_PS_IMG_DIR_', _PS_ROOT_DIR_.'/img/');
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
define('_PS_CAT_IMG_DIR_', _PS_IMG_DIR_.'c/');
define('_PS_STORE_IMG_DIR_', _PS_IMG_DIR_.'st/');
define('_PS_PROD_IMG_DIR_', _PS_IMG_DIR_.'p/');
@@ -95,6 +97,10 @@ define('_PS_PEAR_XML_PARSER_PATH_', _PS_TOOL_DIR_.'pear_xml_parser/');
/* settings php */
define('_PS_TRANS_PATTERN_', '(.*[^\\\\])');
define('_PS_MIN_TIME_GENERATE_PASSWD_', '360');
if (!defined('_PS_MAGIC_QUOTES_GPC_'))
define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_'))
define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string'));
define('_CAN_LOAD_FILES_', 1);
+21
View File
@@ -51,6 +51,27 @@ class AddressesControllerCore extends FrontController
if (!Validate::isLoadedObject($customer))
die(Tools::displayError('Customer not found'));
self::$smarty->assign('addresses', $customer->getAddresses((int)(self::$cookie->id_lang)));
$values = array();
$customer_address = $customer->getAddresses((int)(self::$cookie->id_lang));
foreach($customer_address as $addr_item)
$ordered_fields = AddressFormat::getOrderedAddressFields($addr_item['id_country']);
self::$smarty->assign('addresses_style', array(
'company' => 'address_company'
,'vat_number' => 'address_company'
,'firstname' => 'address_name'
,'lastname' => 'address_name'
,'address1' => 'address_address1'
,'address2' => 'address_address2'
,'city' => 'address_city'
,'country' => 'address_country'
,'phone' => 'address_phone'
,'phone_mobile' => 'address_phone_mobile'
,'alias' => 'address_title'
));
self::$smarty->assign('ordered_fields', $ordered_fields);
}
public function displayContent()
+46 -21
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -31,17 +31,17 @@ class AuthControllerCore extends FrontController
{
$this->ssl = true;
$this->php_self = 'authentication.php';
parent::__construct();
}
public function preProcess()
{
parent::preProcess();
if (self::$cookie->isLogged() AND !Tools::isSubmit('ajax'))
Tools::redirect('my-account.php');
if (Tools::getValue('create_account'))
{
$create_account = 1;
@@ -54,7 +54,7 @@ class AuthControllerCore extends FrontController
$this->errors[] = Tools::displayError('Invalid e-mail address');
elseif (Customer::customerExists($email))
{
$this->errors[] = Tools::displayError('An account is already registered with this e-mail, please fill in the password or request a new one.');
$this->errors[] = Tools::displayError('An account is already registered with this e-mail, please fill in the password or request a new one.');
$_POST['email'] = $_POST['email_create'];
unset($_POST['email_create']);
}
@@ -63,6 +63,7 @@ class AuthControllerCore extends FrontController
$create_account = 1;
self::$smarty->assign('email_create', Tools::safeOutput($email));
$_POST['email'] = $email;
}
}
@@ -70,7 +71,7 @@ class AuthControllerCore extends FrontController
{
$create_account = 1;
if (Tools::isSubmit('submitAccount'))
self::$smarty->assign('email_create', 1);
self::$smarty->assign('email_create', 1);
/* New Guest customer */
if (!Tools::getValue('is_new_customer') AND !Configuration::get('PS_GUEST_CHECKOUT_ENABLED'))
$this->errors[] = Tools::displayError('You cannot create a guest account.');
@@ -190,7 +191,7 @@ class AuthControllerCore extends FrontController
if (Tools::isSubmit('ajax'))
{
$return = array(
'hasError' => !empty($this->errors),
'hasError' => !empty($this->errors),
'errors' => $this->errors,
'isSaved' => true,
'id_customer' => (int)self::$cookie->id_customer,
@@ -215,7 +216,7 @@ class AuthControllerCore extends FrontController
if (Tools::isSubmit('ajax'))
{
$return = array(
'hasError' => !empty($this->errors),
'hasError' => !empty($this->errors),
'errors' => $this->errors,
'isSaved' => false,
'id_customer' => 0
@@ -224,7 +225,7 @@ class AuthControllerCore extends FrontController
}
}
}
if (Tools::isSubmit('SubmitLogin'))
{
Module::hookExec('beforeAuthentication');
@@ -262,6 +263,7 @@ class AuthControllerCore extends FrontController
if (Configuration::get('PS_CART_FOLLOWING') AND (empty(self::$cookie->id_cart) OR Cart::getNbProducts(self::$cookie->id_cart) == 0))
self::$cookie->id_cart = (int)(Cart::lastNoneOrderedCart((int)($customer->id)));
/* Update cart address */
self::$cart->id_carrier = 0;
self::$cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
self::$cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
self::$cart->update();
@@ -277,7 +279,7 @@ class AuthControllerCore extends FrontController
if (Tools::isSubmit('ajax'))
{
$return = array(
'hasError' => !empty($this->errors),
'hasError' => !empty($this->errors),
'errors' => $this->errors,
'token' => Tools::getToken(false)
);
@@ -290,10 +292,10 @@ class AuthControllerCore extends FrontController
/* Select the most appropriate country */
if (isset($_POST['id_country']) AND is_numeric($_POST['id_country']))
$selectedCountry = (int)($_POST['id_country']);
/* FIXME : language iso and country iso are not similar,
/* FIXME : language iso and country iso are not similar,
* maybe an associative table with country an language can resolve it,
* But for now it's a bug !
* @see : bug #6968
* @see : bug #6968
* @link:http://www.prestashop.com/bug_tracker/view/6968/
elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
@@ -321,7 +323,7 @@ class AuthControllerCore extends FrontController
'HOOK_CREATE_ACCOUNT_TOP' => Module::hookExec('createAccountTop')
));
}
/* Generate years, months and days */
if (isset($_POST['years']) AND is_numeric($_POST['years']))
$selectedYears = (int)($_POST['years']);
@@ -333,7 +335,7 @@ class AuthControllerCore extends FrontController
if (isset($_POST['days']) AND is_numeric($_POST['days']))
$selectedDays = (int)($_POST['days']);
$days = Tools::dateDays();
self::$smarty->assign(array(
'years' => $years,
'sl_year' => (isset($selectedYears) ? $selectedYears : 0),
@@ -344,18 +346,18 @@ class AuthControllerCore extends FrontController
));
self::$smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active);
}
public function setMedia()
{
parent::setMedia();
Tools::addCSS(_THEME_CSS_DIR_.'authentication.css');
Tools::addJS(array(_THEME_JS_DIR_.'tools/statesManagement.js', _PS_JS_DIR_.'jquery/jquery-typewatch.pack.js'));
}
public function process()
{
parent::process();
$back = Tools::getValue('back');
$key = Tools::safeOutput(Tools::getValue('key'));
if (!empty($key))
@@ -367,7 +369,7 @@ class AuthControllerCore extends FrontController
{
$countries = Country::getCountries((int)(self::$cookie->id_lang), true);
self::$smarty->assign(array(
'inOrderProcess' => true,
'inOrderProcess' => true,
'PS_GUEST_CHECKOUT_ENABLED' => Configuration::get('PS_GUEST_CHECKOUT_ENABLED'),
'sl_country' => (int)Tools::getValue('id_country', Configuration::get('PS_COUNTRY_DEFAULT')),
'countries' => $countries
@@ -375,12 +377,35 @@ class AuthControllerCore extends FrontController
}
}
}
public function displayContent()
{
$this->processAddressFormat();
parent::displayContent();
self::$smarty->display(_PS_THEME_DIR_.'authentication.tpl');
}
protected function processAddressFormat()
{
$selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$inv_all_fields = array();
$dlv_all_fields = array();
foreach (array('inv','dlv') as $adr_type)
{
foreach (${$adr_type.'_adr_fields'} as $fields_line)
foreach(explode(' ',$fields_line) as $field_item)
${$adr_type.'_all_fields'}[] = trim($field_item);
self::$smarty->assign($adr_type.'_adr_fields', ${$adr_type.'_adr_fields'});
self::$smarty->assign($adr_type.'_all_fields', ${$adr_type.'_all_fields'});
}
}
}
+13 -1
View File
@@ -58,7 +58,8 @@ class GuestTrackingControllerCore extends FrontController
$products = $order->getProducts();
$customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart));
Product::addCustomizationPrice($products, $customizedDatas);
$this->processAddressFormat($addressDelivery, $addressInvoice);
self::$smarty->assign(array(
'shop_name' => Configuration::get('PS_SHOP_NAME'),
'order' => $order,
@@ -124,4 +125,15 @@ class GuestTrackingControllerCore extends FrontController
self::$smarty->display(_PS_THEME_DIR_.'guest-tracking.tpl');
}
private function processAddressFormat(Address $delivery, Address $invoice)
{
$inv_adr_fields = AddressFormat::getOrderedAddressFields($invoice->id_country);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($delivery->id_country);
self::$smarty->assign('inv_adr_fields', $inv_adr_fields);
self::$smarty->assign('dlv_adr_fields', $dlv_adr_fields);
}
}
+15
View File
@@ -122,6 +122,19 @@ class OrderControllerCore extends ParentOrderController
}
}
private function processAddressFormat()
{
$delivery = new Address((int)(self::$cart->id_address_delivery));
$invoice = new Address((int)(self::$cart->id_address_invoice));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($invoice->id_country);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($delivery->id_country);
self::$smarty->assign('inv_adr_fields', $inv_adr_fields);
self::$smarty->assign('dlv_adr_fields', $dlv_adr_fields);
}
public function displayContent()
{
parent::displayContent();
@@ -132,6 +145,7 @@ class OrderControllerCore extends ParentOrderController
self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl');
break;
case 1:
$this->processAddressFormat();
self::$smarty->display(_PS_THEME_DIR_.'order-address.tpl');
break;
case 2:
@@ -161,6 +175,7 @@ class OrderControllerCore extends ParentOrderController
Tools::redirect('order.php?step=1');
$delivery = new Address((int)(self::$cart->id_address_delivery));
$invoice = new Address((int)(self::$cart->id_address_invoice));
if ($delivery->deleted OR $invoice->deleted)
{
if ($delivery->deleted)
+7
View File
@@ -104,6 +104,11 @@ class OrderDetailControllerCore extends FrontController
$carrier = new Carrier((int)($order->id_carrier), (int)($order->id_lang));
$addressInvoice = new Address((int)($order->id_address_invoice));
$addressDelivery = new Address((int)($order->id_address_delivery));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country);
if ($order->total_discounts > 0)
self::$smarty->assign('total_old', (float)($order->total_paid - $order->total_discounts));
$products = $order->getProducts();
@@ -128,6 +133,8 @@ class OrderDetailControllerCore extends FrontController
'address_invoice' => $addressInvoice,
'invoiceState' => (Validate::isLoadedObject($addressInvoice) AND $addressInvoice->id_state) ? new State((int)($addressInvoice->id_state)) : false,
'address_delivery' => $addressDelivery,
'inv_adr_fields' => $inv_adr_fields,
'dlv_adr_fields' => $dlv_adr_fields,
'deliveryState' => (Validate::isLoadedObject($addressDelivery) AND $addressDelivery->id_state) ? new State((int)($addressDelivery->id_state)) : false,
'is_guest' => false,
'messages' => Message::getMessagesByOrderId((int)($order->id)),
+28 -1
View File
@@ -120,6 +120,7 @@ class OrderOpcControllerCore extends ParentOrderController
$blockUserInfo = new BlockUserInfo();
}
self::$smarty->assign('isVirtualCart', self::$cart->isVirtualCart());
$this->processAddressFormat();
$this->_assignAddress();
// Wrapping fees
$wrapping_fees = (float)(Configuration::get('PS_GIFT_WRAPPING_PRICE'));
@@ -265,7 +266,9 @@ class OrderOpcControllerCore extends ParentOrderController
public function displayContent()
{
parent::displayContent();
$this->processAddressFormat();
self::$smarty->display(_PS_THEME_DIR_.'errors.tpl');
self::$smarty->display(_PS_THEME_DIR_.'order-opc.tpl');
}
@@ -446,6 +449,30 @@ class OrderOpcControllerCore extends ParentOrderController
return self::$cart->id_carrier;
return 0;
}
protected function processAddressFormat()
{
$selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
$inv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$dlv_adr_fields = AddressFormat::getOrderedAddressFields($selectedCountry);
$inv_all_fields = array();
$dlv_all_fields = array();
foreach (array('inv','dlv') as $adr_type)
{
foreach (${$adr_type.'_adr_fields'} as $fields_line)
foreach(explode(' ',$fields_line) as $field_item)
${$adr_type.'_all_fields'}[] = trim($field_item);
// DEBUG echo('<br />processAddressFormat: inv_all_fields: ' . var_export($inv_all_fields, true)
// DEBUG .'<br />processAddressFormat: inv_all_fields: ' . var_export($dlv_all_fields, true));
self::$smarty->assign($adr_type.'_adr_fields', ${$adr_type.'_adr_fields'});
self::$smarty->assign($adr_type.'_all_fields', ${$adr_type.'_all_fields'});
}
}
}
+1 -1
View File
@@ -134,7 +134,7 @@ class SearchControllerCore extends FrontController
parent::setMedia();
if (!$this->instantSearch AND !$this->ajaxSearch)
Tools::addCSS(_THEME_CSS_DIR_.'product-list.css');
Tools::addCSS(_THEME_CSS_DIR_.'product_list.css');
}
}
+41 -2
View File
@@ -73,7 +73,7 @@ class StoresControllerCore extends FrontController
$stores = Db::getInstance()->ExecuteS('
SELECT s.*, cl.name country, st.iso_code state,
('.(int)($multiplicator).' * acos(cos(radians('.(float)(Tools::getValue('latitude')).')) * cos(radians(latitude)) * cos(radians(longitude) - radians('.(float)(Tools::getValue('longitude')).')) + sin(radians('.(float)(Tools::getValue('latitude')).')) * sin(radians(latitude)))) distance
('.(int)($multiplicator).' * acos(cos(radians('.(float)(Tools::getValue('latitude')).')) * cos(radians(latitude)) * cos(radians(longitude) - radians('.(float)(Tools::getValue('longitude')).')) + sin(radians('.(float)(Tools::getValue('latitude')).')) * sin(radians(latitude)))) distance, cl.id_country id_country
FROM '._DB_PREFIX_.'store s
LEFT JOIN '._DB_PREFIX_.'country_lang cl ON (cl.id_country = s.id_country)
LEFT JOIN '._DB_PREFIX_.'state st ON (st.id_state = s.id_state)
@@ -103,7 +103,8 @@ class StoresControllerCore extends FrontController
$node = $dom->createElement('marker');
$newnode = $parnode->appendChild($node);
$newnode->setAttribute('name', $store['name']);
$address = $store['address1'].(!empty($store['address2']) ? '<br />'.$store['address2'] : '').'<br />'.$store['postcode'].' '.$store['city'].', '.$store['state'].'<br />'.$store['country'];
$address = $this->_processStoreAddress($store);
$other = '';
if (!empty($store['hours']))
{
@@ -117,6 +118,8 @@ class StoresControllerCore extends FrontController
$days_datas[] = $hours_datas;
}
$smarty->assign('days_datas', $days_datas);
$smarty->assign('id_country', $store['id_country']);
$other .= self::$smarty->fetch(_PS_THEME_DIR_.'store_infos.tpl');
}
@@ -143,6 +146,42 @@ class StoresControllerCore extends FrontController
$smarty->assign(array('distance_unit' => $distanceUnit, 'simplifiedStoresDiplay' => $simplifiedStoreLocator, 'stores' => $stores, 'mediumSize' => Image::getSize('medium')));
}
private function _processStoreAddress($store)
{
$ignore_field = array(
'firstname' =>1
, 'lastname' =>1
);
$out = '';
$out_datas = array();
$address_datas = AddressFormat::getOrderedAddressFields($store['id_country']);
foreach ($address_datas as $data_line)
{
$data_fields = explode(' ', $data_line);
$adr_out = array();
$data_fields_mod = false;
foreach ($data_fields as $field_item)
{
$field_item = trim($field_item);
if (!isset($ignore_field[$field_item]) && !empty($store[$field_item]) && $store[$field_item] != '')
{
$adr_out[] = $store[$field_item];
$data_fields_mod = true;
}
}
if ($data_fields_mod)
$out_datas[] = implode(' ', $adr_out);
}
$out = implode('<br />', $out_datas);
return $out;
}
public function process()
{
parent::process();
+573
View File
@@ -0,0 +1,573 @@
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and ../img/jquery-ui */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/*
* jQuery UI CSS Framework 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Theming/API
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
*/
/* Component containers
----------------------------------*/
.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(../img/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
.ui-widget-content a { color: #333333; }
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(../img/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #ffffff; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(../img/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(../img/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(../img/jquery-ui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
.ui-widget :active { outline: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(../img/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(../img/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
/* Icons
----------------------------------*/
/* states and ../img/jquery-ui */
.ui-icon { width: 16px; height: 16px; background-image: url(../img/jquery-ui/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(../img/jquery-ui/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(../img/jquery-ui/ui-icons_ffffff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(../img/jquery-ui/ui-icons_ef8c08_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../img/jquery-ui/ui-icons_ef8c08_256x240.png); }
.ui-state-active .ui-icon {background-image: url(../img/jquery-ui/ui-icons_ef8c08_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(../img/jquery-ui/ui-icons_228ef1_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../img/jquery-ui/ui-icons_ffd27a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
/* Overlays */
.ui-widget-overlay { background: #666666 url(../img/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(../img/jquery-ui/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
* jQuery UI Resizable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Resizable#theming
*/
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
* jQuery UI Selectable 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Selectable#theming
*/
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
/*
* jQuery UI Accordion 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Accordion#theming
*/
/* IE/Win - Fix animation bug - #4615 */
.ui-accordion { width: 100%; }
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
.ui-accordion .ui-accordion-li-fix { display: inline; }
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
.ui-accordion .ui-accordion-content-active { display: block; }
/*
* jQuery UI Autocomplete 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Autocomplete#theming
*/
.ui-autocomplete { position: absolute; cursor: default; }
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
/*
* jQuery UI Menu 1.8.10
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu#theming
*/
.ui-menu {
list-style:none;
padding: 2px;
margin: 0;
display:block;
float: left;
}
.ui-menu .ui-menu {
margin-top: -3px;
}
.ui-menu .ui-menu-item {
margin:0;
padding: 0;
zoom: 1;
float: left;
clear: left;
width: 100%;
}
.ui-menu .ui-menu-item a {
text-decoration:none;
display:block;
padding:.2em .4em;
line-height:1.5;
zoom:1;
}
.ui-menu .ui-menu-item a.ui-state-hover,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
/*
* jQuery UI Button 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Button#theming
*/
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
/*
* jQuery UI Dialog 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
/*
* jQuery UI Slider 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Slider#theming
*/
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
* jQuery UI Tabs 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Tabs#theming
*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
/*
* jQuery UI Datepicker 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Datepicker#theming
*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
display: none; /*sorry for IE5*/
display/**/: block; /*sorry for IE5*/
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}/*
* jQuery UI Progressbar 1.8.10
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Progressbar#theming
*/
.ui-progressbar { height:2em; text-align: left; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

+3 -1
View File
@@ -911,10 +911,12 @@ $(document).ready(
}
);
$("#loader").ajaxComplete(
function()
function(e, xhr, settings)
{
$(this).fadeOut();
$(".lockedForAjax").removeAttr("disabled").removeClass("disabled").removeClass("lockedForAjax");
if (settings.url.substr(0, 17) == 'preactivation.php' && step == 1)
$("#btNext[disabled!=1], #btBack[disabled!=1]").attr("disabled", "disabled").addClass("disabled").addClass("lockedForAjax");
}
);
//set actions on clicks
+5 -10
View File
@@ -784,7 +784,7 @@ if ($lm->getIncludeTradFilename())
<td id="endEmail" class="resultEnd">&nbsp;</td>
</tr>
</table>
<h3><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'); ?></h3>
<h3><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?></h3>
<a href="../admin" id="access" class="BO" target="_blank">
<span class="title"><?php echo lang('Back Office'); ?></span>
@@ -826,10 +826,10 @@ if ($lm->getIncludeTradFilename())
{
return strnatcmp($a['version'], $b['version']);
}
$countNonNative = 0;
if ($oldversion !== false)
$countNonNative = 0;
if ($oldversion !== false AND !$sameVersions)
{
include_once(realpath(INSTALL_PATH.'/../config').'/config.inc.php');
include_once(realpath(INSTALL_PATH.'/../config').'/defines.inc.php');
$moduleList = Module::getNonNativeModuleList();
$moduleNonNativeLi = '<ul>';
foreach($moduleList as $module)
@@ -1059,17 +1059,12 @@ if ($lm->getIncludeTradFilename())
?>
<h3 style="margin-top: 15px;"><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'); ?></h3>
<h3 style="margin-top: 15px;"><?php echo lang('WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'); ?></h3>
<a href="../" id="access_update" target="_blank">
<span class="title"><?php echo lang('Front Office'); ?></span>
<span class="description"><?php echo lang('Find your store as your future customers will see!'); ?></span>
<span class="message"><?php echo lang('Discover your store'); ?></span>
</a>
<span href="#" id="access" class="BO" target="_blank">
<span class="title"><?php echo lang('Back Office'); ?></span>
<span class="description"><?php echo lang('Manage your store with your back office. Manage your orders and customers, add modules, change your theme, etc...'); ?></span>
<span class="message"><?php echo lang('Manage your store'); ?></span>
</span>
</div>
<?php
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3)): ?>
+2 -2
View File
@@ -140,7 +140,7 @@ $_LANG['Update is complete!'] = 'Aktualisierung beendet!';
$_LANG['Upgrade: get the latest stable version!'] = 'Aktualisierung: Installieren Sie die neueste Version von PrestaShop';
$_LANG['Verify now!'] = 'Testen der SQL-Verbindung';
$_LANG['Verify system compatibility'] = 'Systemkompatibilität';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'] = 'VORSICHT: Aus Sicherheitsgründen löschen Sie bitte den Ordner \'/install\' und die readme-Dateien (readme_fr.txt, readme_en.txt, readme_es.txt).';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'] = 'VORSICHT: Aus Sicherheitsgründen löschen Sie bitte den Ordner \'/install\' und die readme-Dateien (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).';
$_LANG['Warning: a manual backup is HIGHLY recommended before continuing!'] = 'Vorsicht: eine manuelle Sicherung ist UNERLÄSSLICH, bevor mit der Aktualisierung der PrestaShop-Anwendung begonnen wird, um jeglichen versehentlichen Datenverlust zu verhindern';
$_LANG['Welcome'] = 'Willkommen';
$_LANG['Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.'] = 'Bienvenue dans l\'installation de PrestaShop '.INSTALL_VERSION;
@@ -279,7 +279,7 @@ $_LANG['Link to the validator'] = 'Link zum Validator';
$_LANG['Online Theme Validator'] = 'Online Themenvalidator';
$_LANG['If your theme is not valid, you may experience some problems in your front-office aspect, but don\'t panic ! To solve this, you can make it compatible by correcting the validators errors or by using a theme compatible with '] = 'Sollte Ihr Thema nicht kompatibel sein, könnten einige Probleme im Front-End auftreten. Sie können die Kompatibilität wieder einstellen, indem Sie im Backend Unter Einstellungen die entsprechende Einstellung treffen';
$_LANG['version'] = 'Version';
$_LANG['In this aim, use our'] = 'Verwenden Sie dazu unseren';
+13 -2
View File
@@ -138,7 +138,7 @@ $_LANG['Update is complete!'] = '¡Actualización completa!';
$_LANG['Upgrade: get the latest stable version!'] = 'Actualización: instale la última versión de PrestShop';
$_LANG['Verify now!'] = '¡Pruebe ahora!';
$_LANG['Verify system compatibility'] = 'Compatibilidad sistema';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'] = 'ATENCION : para más seguridad, por favor suprima la carpeta \'/install\' y los archivos readme (readme_fr.txt, readme_en.txt, readme_es.txt)..';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'] = 'ATENCION : para más seguridad, por favor suprima la carpeta \'/install\' y los archivos readme (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG)..';
$_LANG['Warning: a manual backup is HIGHLY recommended before continuing!'] = '¡Atención: se recomienda hacer una copia de seguridad manual antes de continuar!';
$_LANG['Welcome'] = 'Bienvenido';
$_LANG['Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.'] = 'Bienvenido a la instalación de PrestaShop '.INSTALL_VERSION;
@@ -268,4 +268,15 @@ $_LANG['do not close the window and be patient.'] = 'no cierre la ventana y espe
$_LANG['Your update is completed!'] = 'La actualización ha concluido con éxito';
$_LANG['Your shop version is now'] = 'La versión de su tienda ya está';
$_LANG['New features in PrestaShop v'] = 'Nuevas aplicaciones en dans PrestaShop v';
$_LANG['Module compatibility'] = 'Compatibilidad Módulos';
$_LANG['It\'s dangerous to keep non-native modules activated during the update. If you really want to take this risk, uncheck the following box.'] = 'Se desaconseja dejar los módulos no nativos activos durante la actualización. Si realmente desea correr ese riesgo, desactive la siguiente casilla.';
$_LANG['You will be able to manually reactivate them in your back-office, once the update process has succeeded.'] = 'Después podrá reactivarlos manualmente en el back-office, una vez la actualización haya terminado.';
$_LANG['Ok, please desactivate the following modules, I will reactivate them later.'] = 'De acuerdo, desactive automáticamente los siguientes módulos, los activaré yo mismo más tarde.';
$_LANG['Theme compatibility'] = 'Compatibilidad del tema';
$_LANG['Before updating, you need to check that your theme is compatible with version'] = 'Antes de la actualización, debe comprobar que su tema es compatible con la versión';
$_LANG['of PrestaShop.'] = 'de PrestaShop';
$_LANG['Link to the validator'] = 'Link hacia el validador';
$_LANG['Online Theme Validator'] = 'Validador del tema en línea';
$_LANG['If your theme is not valid, you may experience some problems in your front-office aspect, but don\'t panic ! To solve this, you can make it compatible by correcting the validators errors or by using a theme compatible with '] = 'Si su tema no es válido, podría tener problemas en la página de su sitio Web, pero no se preocupe, ¡puede hacerlo compatible corrigiendo los errores señalados por el validador o utilizando un tema compatible con la versión!' ;
$_LANG['version'] = 'versión';
$_LANG['In this aim, use our'] = 'En este objetivo, utilice nuestro';
+4 -3
View File
@@ -140,7 +140,7 @@ $_LANG['Update is complete!'] = 'Mise à jour terminée !';
$_LANG['Upgrade: get the latest stable version!'] = 'Mise à jour : installez la dernière version de PrestaShop';
$_LANG['Verify now!'] = 'Tester la connexion';
$_LANG['Verify system compatibility'] = 'Compatibilité système';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'] = 'ATTENTION : pour plus de sécurité, merci de supprimer le dossier \'/install\' et les fichiers readme (readme_fr.txt, readme_en.txt, readme_es.txt).';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'] = 'ATTENTION : pour plus de sécurité, merci de supprimer le dossier \'/install\' et les fichiers readme (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).';
$_LANG['Warning: a manual backup is HIGHLY recommended before continuing!'] = 'Attention : une sauvegarde manuelle est INDISPENSABLE avant de procéder à la mise à jour de l\'application PrestaShop, cela afin de prévenir toute perte de données accidentelle';
$_LANG['Welcome'] = 'Bienvenue';
$_LANG['Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.'] = 'Bienvenue dans l\'installation de PrestaShop '.INSTALL_VERSION;
@@ -241,7 +241,7 @@ $_LANG['Upgrade file'] = 'Fichier de mise à jour';
$_LANG['Modifications to process'] = 'Modifications à prendre en compte';
$_LANG['(major)'] = '(majeure)';
$_LANG['TOTAL'] = 'TOTAL';
$_LANG['Estimated time to complete the'] = 'Temps estimé pour réaliser la';
$_LANG['Estimated time to complete the'] = 'Temps estimé pour réaliser les';
$_LANG['modifications:'] = 'modifications :';
$_LANG['minutes'] = 'minutes';
$_LANG['minute'] = 'minute';
@@ -278,7 +278,8 @@ $_LANG['of PrestaShop.'] = 'de PrestaShop';
$_LANG['Link to the validator'] = 'Lien vers le validateur';
$_LANG['Online Theme Validator'] = 'Validateur de Theme en ligne';
$_LANG['If your theme is not valid, you may experience some problems in your front-office aspect, but don\'t panic ! To solve this, you can make it compatible by correcting the validators errors or by using a theme compatible with '] = 'Si votre thème n\'est pas valide, vous pourrez rencontrer quelques problèmes d\'affichage de votre site, mais inutile de paniquer ! Vous pouvez le rendre compatible en corrigeant les erreurs signalées par le validateur ou en utilisant un thème compatible avec la version' ;
$_LANG['version'] = '';
$_LANG['version'] = 'version';
$_LANG['In this aim, use our'] = 'Dans ce but, utilisez notre';
+2 -2
View File
@@ -140,7 +140,7 @@ $_LANG['Update is complete!'] = 'Aggiornamento terminato!';
$_LANG['Upgrade: get the latest stable version!'] = 'Aggiornamento installa l\'ultima versione di PrestaShop';
$_LANG['Verify now!'] = 'Prova la connessione SQL';
$_LANG['Verify system compatibility'] = 'Compatibilità sistema';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt).'] = 'ATTENZIONE: per motivi di sicurezza, adesso devi cancellare la cartella \'install\' e i file readme (readme_fr.txt, readme_en.txt, readme_es.txt).';
$_LANG['WARNING: For more security, you must delete the \'install\' folder and readme files (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).'] = 'ATTENZIONE: per motivi di sicurezza, adesso devi cancellare la cartella \'install\' e i file readme (readme_fr.txt, readme_en.txt, readme_es.txt, readme_de.txt, readme_it.txt, CHANGELOG).';
$_LANG['Warning: a manual backup is HIGHLY recommended before continuing!'] = 'Attenzione: E\' FONDAMENTALE un backup manuale prima di continuare l\'aggiornamento dell\'applicazione Prestashop, al fine di evitare la perdita accidentale di dati.';
$_LANG['Welcome'] = 'Benvenuto';
$_LANG['Welcome to the PrestaShop '.INSTALL_VERSION.' Installer.'] = 'Benvenuto nell\'installazione di PrestaShop '.INSTALL_VERSION;
@@ -266,4 +266,4 @@ $_LANG['do not close the window and be patient.'] = 'non chiudere la finestra e
$_LANG['Your update is completed!'] = 'L\'aggiornamento è completo!';
$_LANG['Your shop version is now'] = 'La tua versione adesso è';
$_LANG['New features in PrestaShop v'] = 'Nuove caratteristiche in PrestaShop v';
$_LANG['In this aim, use our'] = 'A questo scopo, utilizzare il nostro';
+4 -4
View File
@@ -28,13 +28,13 @@
function alter_cms_block()
{
// No one will know if the table does not exist :] Thanks Damien for your solution ;)
DB::getInstance()->Execute('ALTER TABLE `PREFIX_cms_block_lang` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_lang` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `PREFIX_cms_block` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `PREFIX_cms_block_page` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL');
DB::getInstance()->Execute('ALTER TABLE `ps_cms_block_page` CHANGE `id_block_cms_page` `id_cms_block_page` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT');
DB::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms_page` `id_cms_block_page` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT');
}
+9 -8
View File
@@ -361,6 +361,7 @@ CREATE TABLE `PREFIX_country` (
`need_identification_number` tinyint(1) NOT NULL default '0',
`need_zip_code` tinyint(1) NOT NULL default '1',
`zip_code_format` varchar(12) NOT NULL default '',
`display_tax_label` BOOLEAN NOT NULL,
PRIMARY KEY (`id_country`),
KEY `country_iso_code` (`iso_code`),
KEY `country_` (`id_zone`)
@@ -373,13 +374,6 @@ CREATE TABLE `PREFIX_country_lang` (
UNIQUE KEY `country_lang_index` (`id_country`,`id_lang`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_country_tax` (
`id_country_tax` int(11) NOT NULL AUTO_INCREMENT,
`id_country` int(11) NOT NULL,
`id_tax_rules_group` int(11) NOT NULL,
PRIMARY KEY (`id_country_tax`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_currency` (
`id_currency` int(10) unsigned NOT NULL auto_increment,
`name` varchar(32) NOT NULL,
@@ -1409,8 +1403,8 @@ CREATE TABLE `PREFIX_tab` (
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_tab_lang` (
`id_lang` int(10) unsigned NOT NULL,
`id_tab` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned NOT NULL,
`name` varchar(32) default NULL,
PRIMARY KEY (`id_tab`,`id_lang`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
@@ -1637,3 +1631,10 @@ CREATE TABLE `PREFIX_county_zip_code` (
PRIMARY KEY ( `id_county` , `from_zip_code` , `to_zip_code` )
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_address_format` (
`id_country` int(10) unsigned NOT NULL,
`format` varchar(255) NOT NULL DEFAULT '',
KEY `country` (`id_country`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
+62 -52
View File
@@ -173,7 +173,7 @@ INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_a
(102, 'PS_DIMENSION_UNIT', 'cm', NOW(), NOW()),
(103, 'PS_FORCE_SMARTY_2', '0', NOW(), NOW()),
(104, 'PS_GUEST_CHECKOUT_ENABLED', '0', NOW(), NOW()),
(105, 'PS_DISPLAY_SUPPLIERS', '0', NOW(), NOW()),
(105, 'PS_DISPLAY_SUPPLIERS', '1', NOW(), NOW()),
(106, 'PS_CATALOG_MODE', '0', NOW(), NOW()),
(107, 'PS_GEOLOCATION_WHITELIST', '209.185.108;209.185.253;209.85.238;209.85.238.11;209.85.238.4;216.239.33.96;216.239.33.97;216.239.33.98;216.239.33.99;216.239.37.98;216.239.37.99;216.239.39.98;216.239.39.99;216.239.41.96;216.239.41.97;216.239.41.98;216.239.41.99;216.239.45.4;216.239.46;216.239.51.96;216.239.51.97;216.239.51.98;216.239.51.99;216.239.53.98;216.239.53.99;216.239.57.96;216.239.57.97;216.239.57.98;216.239.57.99;216.239.59.98;216.239.59.99;216.33.229.163;64.233.173.193;64.233.173.194;64.233.173.195;64.233.173.196;64.233.173.197;64.233.173.198;64.233.173.199;64.233.173.200;64.233.173.201;64.233.173.202;64.233.173.203;64.233.173.204;64.233.173.205;64.233.173.206;64.233.173.207;64.233.173.208;64.233.173.209;64.233.173.210;64.233.173.211;64.233.173.212;64.233.173.213;64.233.173.214;64.233.173.215;64.233.173.216;64.233.173.217;64.233.173.218;64.233.173.219;64.233.173.220;64.233.173.221;64.233.173.222;64.233.173.223;64.233.173.224;64.233.173.225;64.233.173.226;64.233.173.227;64.233.173.228;64.233.173.229;64.233.173.230;64.233.173.231;64.233.173.232;64.233.173.233;64.233.173.234;64.233.173.235;64.233.173.236;64.233.173.237;64.233.173.238;64.233.173.239;64.233.173.240;64.233.173.241;64.233.173.242;64.233.173.243;64.233.173.244;64.233.173.245;64.233.173.246;64.233.173.247;64.233.173.248;64.233.173.249;64.233.173.250;64.233.173.251;64.233.173.252;64.233.173.253;64.233.173.254;64.233.173.255;64.68.80;64.68.81;64.68.82;64.68.83;64.68.84;64.68.85;64.68.86;64.68.87;64.68.88;64.68.89;64.68.90.1;64.68.90.10;64.68.90.11;64.68.90.12;64.68.90.129;64.68.90.13;64.68.90.130;64.68.90.131;64.68.90.132;64.68.90.133;64.68.90.134;64.68.90.135;64.68.90.136;64.68.90.137;64.68.90.138;64.68.90.139;64.68.90.14;64.68.90.140;64.68.90.141;64.68.90.142;64.68.90.143;64.68.90.144;64.68.90.145;64.68.90.146;64.68.90.147;64.68.90.148;64.68.90.149;64.68.90.15;64.68.90.150;64.68.90.151;64.68.90.152;64.68.90.153;64.68.90.154;64.68.90.155;64.68.90.156;64.68.90.157;64.68.90.158;64.68.90.159;64.68.90.16;64.68.90.160;64.68.90.161;64.68.90.162;64.68.90.163;64.68.90.164;64.68.90.165;64.68.90.166;64.68.90.167;64.68.90.168;64.68.90.169;64.68.90.17;64.68.90.170;64.68.90.171;64.68.90.172;64.68.90.173;64.68.90.174;64.68.90.175;64.68.90.176;64.68.90.177;64.68.90.178;64.68.90.179;64.68.90.18;64.68.90.180;64.68.90.181;64.68.90.182;64.68.90.183;64.68.90.184;64.68.90.185;64.68.90.186;64.68.90.187;64.68.90.188;64.68.90.189;64.68.90.19;64.68.90.190;64.68.90.191;64.68.90.192;64.68.90.193;64.68.90.194;64.68.90.195;64.68.90.196;64.68.90.197;64.68.90.198;64.68.90.199;64.68.90.2;64.68.90.20;64.68.90.200;64.68.90.201;64.68.90.202;64.68.90.203;64.68.90.204;64.68.90.205;64.68.90.206;64.68.90.207;64.68.90.208;64.68.90.21;64.68.90.22;64.68.90.23;64.68.90.24;64.68.90.25;64.68.90.26;64.68.90.27;64.68.90.28;64.68.90.29;64.68.90.3;64.68.90.30;64.68.90.31;64.68.90.32;64.68.90.33;64.68.90.34;64.68.90.35;64.68.90.36;64.68.90.37;64.68.90.38;64.68.90.39;64.68.90.4;64.68.90.40;64.68.90.41;64.68.90.42;64.68.90.43;64.68.90.44;64.68.90.45;64.68.90.46;64.68.90.47;64.68.90.48;64.68.90.49;64.68.90.5;64.68.90.50;64.68.90.51;64.68.90.52;64.68.90.53;64.68.90.54;64.68.90.55;64.68.90.56;64.68.90.57;64.68.90.58;64.68.90.59;64.68.90.6;64.68.90.60;64.68.90.61;64.68.90.62;64.68.90.63;64.68.90.64;64.68.90.65;64.68.90.66;64.68.90.67;64.68.90.68;64.68.90.69;64.68.90.7;64.68.90.70;64.68.90.71;64.68.90.72;64.68.90.73;64.68.90.74;64.68.90.75;64.68.90.76;64.68.90.77;64.68.90.78;64.68.90.79;64.68.90.8;64.68.90.80;64.68.90.9;64.68.91;64.68.92;66.249.64;66.249.65;66.249.66;66.249.67;66.249.68;66.249.69;66.249.70;66.249.71;66.249.72;66.249.73;66.249.78;66.249.79;72.14.199;8.6.48', NOW(), NOW()),
(108, 'PS_LOGS_BY_EMAIL', '5', NOW(), NOW()),
@@ -270,57 +270,57 @@ INSERT INTO `PREFIX_zone` (`id_zone`, `name`, `active`) VALUES
(1, 'Europe', 1),(2, 'North America', 1),(3, 'Asia', 1),(4, 'Africa', 1),
(5, 'Oceania', 1),(6, 'South America', 1),(7, 'Europe (out E.U)', 1),(8, 'Centrale America/Antilla', 1);
INSERT INTO `PREFIX_country` (`id_country`, `id_zone`, `iso_code`, `call_prefix`, `active`, `contains_states`, `need_identification_number`, `need_zip_code`, `zip_code_format`) VALUES
(1, 1, 'DE', 49, 1, 0, 0, 1, 'NNNNN'),(2, 1, 'AT', 43, 1, 0, 0, 1, 'NNNN'),(3, 1, 'BE', 32, 1, 0, 0, 1, 'NNNN'),(4, 2, 'CA', 1, 1, 1, 0, 1, 'LNL NLN'),(5, 3, 'CN', 86, 1, 0, 0, 1, 'NNNNNN'),
(6, 1, 'ES', 34, 1, 0, 1, 1, 'NNNNN'),(7, 1, 'FI', 358, 1, 0, 0, 1, 'NNNNN'),(8, 1, 'FR', 33, 1, 0, 0, 1, 'NNNNN'),(9, 1, 'GR', 30, 1, 0, 0, 1, 'NNNNN'),(10, 1, 'IT', 39, 1, 0, 0, 1, 'NNNNN'),
(11, 3, 'JP', 81, 1, 0, 0, 1, 'NNN-NNNN'),(12, 1, 'LU', 352, 1, 0, 0, 1, 'NNNN'),(13, 1, 'NL', 31, 1, 0, 0, 1, 'NNNN LL'),(14, 1, 'PL', 48, 1, 0, 0, 1, 'NN-NNN'),
(15, 1, 'PT', 351, 1, 0, 0, 1, 'NNNN NNN'),(16, 1, 'CZ', 420, 1, 0, 0, 1, 'NNN NN'),(17, 1, 'GB', 44, 1, 0, 0, 1, ''),(18, 1, 'SE', 46, 1, 0, 0, 1, 'NNN NN'),
(19, 7, 'CH', 41, 1, 0, 0, 1, 'NNNN'),(20, 1, 'DK', 45, 1, 0, 0, 1, 'NNNN'),(21, 2, 'US', 1, 1, 1, 0, 1, 'NNNNN'),(22, 3, 'HK', 852, 1, 0, 0, 0, ''),(23, 1, 'NO', 47, 1, 0, 0, 1, 'NNNN'),
(24, 5, 'AU', 61, 1, 0, 0, 1, 'NNNN'),(25, 3, 'SG', 65, 1, 0, 0, 1, 'NNNNNN'),(26, 1, 'IE', 353, 1, 0, 0, 1, ''),(27, 5, 'NZ', 64, 1, 0, 0, 1, 'NNNN'),(28, 3, 'KR', 82, 1, 0, 0, 1, 'NNN-NNN'),
(29, 3, 'IL', 972, 1, 0, 0, 1, 'NNNNN'),(30, 4, 'ZA', 27, 1, 0, 0, 1, 'NNNN'),(31, 4, 'NG', 234, 1, 0, 0, 1, ''),(32, 4, 'CI', 225, 1, 0, 0, 1, ''),(33, 4, 'TG', 228, 1, 0, 0, 1, ''),
(34, 6, 'BO', 591, 1, 0, 0, 1, ''),(35, 4, 'MU', 230, 1, 0, 0, 1, ''),(36, 1, 'RO', 40, 1, 0, 0, 1, 'NNNNNN'),(37, 1, 'SK', 421, 1, 0, 0, 1, 'NNN NN'),(38, 4, 'DZ', 213, 1, 0, 0, 1, 'NNNNN'),
(39, 2, 'AS', 0, 1, 0, 0, 1, ''),(40, 7, 'AD', 376, 1, 0, 0, 1, 'CNNN'),(41, 4, 'AO', 244, 1, 0, 0, 0, ''),(42, 8, 'AI', 0, 1, 0, 0, 1, ''),(43, 2, 'AG', 0, 1, 0, 0, 1, ''),
(44, 6, 'AR', 54, 1, 1, 0, 1, 'LNNNN'),(45, 3, 'AM', 374, 1, 0, 0, 1, 'NNNN'),(46, 8, 'AW', 297, 1, 0, 0, 1, ''),(47, 3, 'AZ', 994, 1, 0, 0, 1, 'CNNNN'),(48, 2, 'BS', 0, 1, 0, 0, 1, ''),
(49, 3, 'BH', 973, 1, 0, 0, 1, ''),(50, 3, 'BD', 880, 1, 0, 0, 1, 'NNNN'),(51, 2, 'BB', 0, 1, 0, 0, 1, 'CNNNNN'),(52, 7, 'BY', 0, 1, 0, 0, 1, 'NNNNNN'),(53, 8, 'BZ', 501, 1, 0, 0, 0, ''),
(54, 4, 'BJ', 229, 1, 0, 0, 0, ''),(55, 2, 'BM', 0, 1, 0, 0, 1, ''),(56, 3, 'BT', 975, 1, 0, 0, 1, ''),(57, 4, 'BW', 267, 1, 0, 0, 1, ''),(58, 6, 'BR', 55, 1, 0, 0, 1, 'NNNNN-NNN'),
(59, 3, 'BN', 673, 1, 0, 0, 1, 'LLNNNN'),(60, 4, 'BF', 226, 1, 0, 0, 1, ''),(61, 3, 'MM', 95, 1, 0, 0, 1, ''),(62, 4, 'BI', 257, 1, 0, 0, 1, ''),(63, 3, 'KH', 855, 1, 0, 0, 1, 'NNNNN'),
(64, 4, 'CM', 237, 1, 0, 0, 1, ''),(65, 4, 'CV', 238, 1, 0, 0, 1, 'NNNN'),(66, 4, 'CF', 236, 1, 0, 0, 1, ''),(67, 4, 'TD', 235, 1, 0, 0, 1, ''),(68, 6, 'CL', 56, 1, 0, 0, 1, 'NNN-NNNN'),
(69, 6, 'CO', 57, 1, 0, 0, 1, 'NNNNNN'),(70, 4, 'KM', 269, 1, 0, 0, 1, ''),(71, 4, 'CD', 242, 1, 0, 0, 1, ''),(72, 4, 'CG', 243, 1, 0, 0, 1, ''),(73, 8, 'CR', 506, 1, 0, 0, 1, 'NNNNN'),
(74, 7, 'HR', 385, 1, 0, 0, 1, 'NNNNN'),(75, 8, 'CU', 53, 1, 0, 0, 1, ''),(76, 1, 'CY', 357, 1, 0, 0, 1, 'NNNN'),(77, 4, 'DJ', 253, 1, 0, 0, 1, ''),(78, 8, 'DM', 0, 1, 0, 0, 1, ''),
(79, 8, 'DO', 0, 1, 0, 0, 1, ''),(80, 3, 'TL', 670, 1, 0, 0, 1, ''),(81, 6, 'EC', 593, 1, 0, 0, 1, 'CNNNNNN'),(82, 4, 'EG', 20, 1, 0, 0, 0, ''),(83, 8, 'SV', 503, 1, 0, 0, 1, ''),
(84, 4, 'GQ', 240, 1, 0, 0, 1, ''),(85, 4, 'ER', 291, 1, 0, 0, 1, ''),(86, 1, 'EE', 372, 1, 0, 0, 1, 'NNNNN'),(87, 4, 'ET', 251, 1, 0, 0, 1, ''),(88, 8, 'FK', 0, 1, 0, 0, 1, 'LLLL NLL'),
(89, 7, 'FO', 298, 1, 0, 0, 1, ''),(90, 5, 'FJ', 679, 1, 0, 0, 1, ''),(91, 4, 'GA', 241, 1, 0, 0, 1, ''),(92, 4, 'GM', 220, 1, 0, 0, 1, ''),(93, 3, 'GE', 995, 1, 0, 0, 1, 'NNNN'),
(94, 4, 'GH', 233, 1, 0, 0, 1, ''),(95, 8, 'GD', 0, 1, 0, 0, 1, ''),(96, 7, 'GL', 299, 1, 0, 0, 1, ''),(97, 7, 'GI', 350, 1, 0, 0, 1, ''),(98, 8, 'GP', 590, 1, 0, 0, 1, ''),
(99, 8, 'GU', 0, 1, 0, 0, 1, ''),(100, 8, 'GT', 502, 1, 0, 0, 1, ''),(101, 7, 'GG', 0, 1, 0, 0, 1, 'LLN NLL'),(102, 4, 'GN', 224, 1, 0, 0, 1, ''),(103, 4, 'GW', 245, 1, 0, 0, 1, ''),
(104, 6, 'GY', 592, 1, 0, 0, 1, ''),(105, 8, 'HT', 509, 1, 0, 0, 1, ''),(106, 5, 'HM', 0, 1, 0, 0, 1, ''),(107, 7, 'VA', 379, 1, 0, 0, 1, 'NNNNN'),(108, 8, 'HN', 504, 1, 0, 0, 1, ''),
(109, 7, 'IS', 354, 1, 0, 0, 1, 'NNN'),(110, 3, 'IN', 91, 1, 0, 0, 1, 'NNN NNN'),(111, 3, 'ID', 62, 1, 0, 0, 1, 'NNNNN'),(112, 3, 'IR', 98, 1, 0, 0, 1, 'NNNNN-NNNNN'),
(113, 3, 'IQ', 964, 1, 0, 0, 1, 'NNNNN'),(114, 7, 'IM', 0, 1, 0, 0, 1, 'CN NLL'),(115, 8, 'JM', 0, 1, 0, 0, 1, ''),(116, 7, 'JE', 0, 1, 0, 0, 1, 'CN NLL'),(117, 3, 'JO', 962, 1, 0, 0, 1, ''),
(118, 3, 'KZ', 7, 1, 0, 0, 1, 'NNNNNN'),(119, 4, 'KE', 254, 1, 0, 0, 1, ''),(120, 7, 'KI', 686, 1, 0, 0, 1, ''),(121, 3, 'KP', 850, 1, 0, 0, 1, ''),(122, 3, 'KW', 965, 1, 0, 0, 1, ''),
(123, 3, 'KG', 996, 1, 0, 0, 1, ''),(124, 3, 'LA', 856, 1, 0, 0, 1, ''),(125, 1, 'LV', 371, 1, 0, 0, 1, 'C-NNNN'),(126, 3, 'LB', 961, 1, 0, 0, 1, ''),(127, 4, 'LS', 266, 1, 0, 0, 1, ''),
(128, 4, 'LR', 231, 1, 0, 0, 1, ''),(129, 4, 'LY', 218, 1, 0, 0, 1, ''),(130, 1, 'LI', 423, 1, 0, 0, 1, 'NNNN'),(131, 1, 'LT', 370, 1, 0, 0, 1, 'NNNNN'),(132, 3, 'MO', 853, 1, 0, 0, 0, ''),
(133, 7, 'MK', 389, 1, 0, 0, 1, ''),(134, 4, 'MG', 261, 1, 0, 0, 1, ''),(135, 4, 'MW', 265, 1, 0, 0, 1, ''),(136, 3, 'MY', 60, 1, 0, 0, 1, 'NNNNN'),(137, 3, 'MV', 960, 1, 0, 0, 1, ''),
(138, 4, 'ML', 223, 1, 0, 0, 1, ''),(139, 1, 'MT', 356, 1, 0, 0, 1, 'LLL NNNN'),(140, 5, 'MH', 692, 1, 0, 0, 1, ''),(141, 8, 'MQ', 596, 1, 0, 0, 1, ''),(142, 4, 'MR', 222, 1, 0, 0, 1, ''),
(143, 1, 'HU', 36, 1, 0, 0, 1, 'NNNN'),(144, 4, 'YT', 262, 1, 0, 0, 1, ''),(145, 2, 'MX', 52, 1, 0, 0, 1, 'NNNNN'),(146, 5, 'FM', 691, 1, 0, 0, 1, ''),(147, 7, 'MD', 373, 1, 0, 0, 1, 'C-NNNN'),
(148, 7, 'MC', 377, 1, 0, 0, 1, '980NN'),(149, 3, 'MN', 976, 1, 0, 0, 1, ''),(150, 7, 'ME', 382, 1, 0, 0, 1, 'NNNNN'),(151, 8, 'MS', 0, 1, 0, 0, 1, ''),(152, 4, 'MA', 212, 1, 0, 0, 1, 'NNNNN'),
(153, 4, 'MZ', 258, 1, 0, 0, 1, ''),(154, 4, 'NA', 264, 1, 0, 0, 1, ''),(155, 5, 'NR', 674, 1, 0, 0, 1, ''),(156, 3, 'NP', 977, 1, 0, 0, 1, ''),(157, 8, 'AN', 599, 1, 0, 0, 1, ''),
(158, 5, 'NC', 687, 1, 0, 0, 1, ''),(159, 8, 'NI', 505, 1, 0, 0, 1, 'NNNNNN'),(160, 4, 'NE', 227, 1, 0, 0, 1, ''),(161, 5, 'NU', 683, 1, 0, 0, 1, ''),(162, 5, 'NF', 0, 1, 0, 0, 1, ''),
(163, 5, 'MP', 0, 1, 0, 0, 1, ''),(164, 3, 'OM', 968, 1, 0, 0, 1, ''),(165, 3, 'PK', 92, 1, 0, 0, 1, ''),(166, 5, 'PW', 680, 1, 0, 0, 1, ''),(167, 3, 'PS', 0, 1, 0, 0, 1, ''),
(168, 8, 'PA', 507, 1, 0, 0, 1, 'NNNNNN'),(169, 5, 'PG', 675, 1, 0, 0, 1, ''),(170, 6, 'PY', 595, 1, 0, 0, 1, ''),(171, 6, 'PE', 51, 1, 0, 0, 1, ''),(172, 3, 'PH', 63, 1, 0, 0, 1, 'NNNN'),
(173, 5, 'PN', 0, 1, 0, 0, 1, 'LLLL NLL'),(174, 8, 'PR', 0, 1, 0, 0, 1, 'NNNNN'),(175, 3, 'QA', 974, 1, 0, 0, 1, ''),(176, 4, 'RE', 262, 1, 0, 0, 1, ''),(177, 7, 'RU', 7, 1, 0, 0, 1, 'NNNNNN'),
(178, 4, 'RW', 250, 1, 0, 0, 1, ''),(179, 8, 'BL', 0, 1, 0, 0, 1, ''),(180, 8, 'KN', 0, 1, 0, 0, 1, ''),(181, 8, 'LC', 0, 1, 0, 0, 1, ''),(182, 8, 'MF', 0, 1, 0, 0, 1, ''),
(183, 8, 'PM', 508, 1, 0, 0, 1, ''),(184, 8, 'VC', 0, 1, 0, 0, 1, ''),(185, 5, 'WS', 685, 1, 0, 0, 1, ''),(186, 7, 'SM', 378, 1, 0, 0, 1, 'NNNNN'),(187, 4, 'ST', 239, 1, 0, 0, 1, ''),
(188, 3, 'SA', 966, 1, 0, 0, 1, ''),(189, 4, 'SN', 221, 1, 0, 0, 1, ''),(190, 7, 'RS', 381, 1, 0, 0, 1, 'NNNNN'),(191, 4, 'SC', 248, 1, 0, 0, 1, ''),(192, 4, 'SL', 232, 1, 0, 0, 1, ''),
(193, 1, 'SI', 386, 1, 0, 0, 1, 'C-NNNN'),(194, 5, 'SB', 677, 1, 0, 0, 1, ''),(195, 4, 'SO', 252, 1, 0, 0, 1, ''),(196, 8, 'GS', 0, 1, 0, 0, 1, 'LLLL NLL'),(197, 3, 'LK', 94, 1, 0, 0, 1, 'NNNNN'),
(198, 4, 'SD', 249, 1, 0, 0, 1, ''),(199, 8, 'SR', 597, 1, 0, 0, 1, ''),(200, 7, 'SJ', 0, 1, 0, 0, 1, ''),(201, 4, 'SZ', 268, 1, 0, 0, 1, ''),(202, 3, 'SY', 963, 1, 0, 0, 1, ''),
(203, 3, 'TW', 886, 1, 0, 0, 1, 'NNNNN'),(204, 3, 'TJ', 992, 1, 0, 0, 1, ''),(205, 4, 'TZ', 255, 1, 0, 0, 1, ''),(206, 3, 'TH', 66, 1, 0, 0, 1, 'NNNNN'),(207, 5, 'TK', 690, 1, 0, 0, 1, ''),
(208, 5, 'TO', 676, 1, 0, 0, 1, ''),(209, 6, 'TT', 0, 1, 0, 0, 1, ''),(210, 4, 'TN', 216, 1, 0, 0, 1, ''),(211, 7, 'TR', 90, 1, 0, 0, 1, 'NNNNN'),(212, 3, 'TM', 993, 1, 0, 0, 1, ''),
(213, 8, 'TC', 0, 1, 0, 0, 1, 'LLLL NLL'),(214, 5, 'TV', 688, 1, 0, 0, 1, ''),(215, 4, 'UG', 256, 1, 0, 0, 1, ''),(216, 1, 'UA', 380, 1, 0, 0, 1, 'NNNNN'),(217, 3, 'AE', 971, 1, 0, 0, 1, ''),
(218, 6, 'UY', 598, 1, 0, 0, 1, ''),(219, 3, 'UZ', 998, 1, 0, 0, 1, ''),(220, 5, 'VU', 678, 1, 0, 0, 1, ''),(221, 6, 'VE', 58, 1, 0, 0, 1, ''),(222, 3, 'VN', 84, 1, 0, 0, 1, 'NNNNNN'),
(223, 2, 'VG', 0, 1, 0, 0, 1, 'CNNNN'),(224, 2, 'VI', 0, 1, 0, 0, 1, ''),(225, 5, 'WF', 681, 1, 0, 0, 1, ''),(226, 4, 'EH', 0, 1, 0, 0, 1, ''),(227, 3, 'YE', 967, 1, 0, 0, 1, ''),
(228, 4, 'ZM', 260, 1, 0, 0, 1, ''),(229, 4, 'ZW', 263, 1, 0, 0, 1, ''),(230, 7, 'AL', 355, 1, 0, 0, 1, 'NNNN'),(231, 3, 'AF', 93, 1, 0, 0, 0, ''),(232, 5, 'AQ', 0, 1, 0, 0, 1, ''),
(233, 1, 'BA', 387, 1, 0, 0, 1, ''),(234, 5, 'BV', 0, 1, 0, 0, 1, ''),(235, 5, 'IO', 0, 1, 0, 0, 1, 'LLLL NLL'),(236, 1, 'BG', 359, 1, 0, 0, 1, 'NNNN'),(237, 8, 'KY', 0, 1, 0, 0, 1, ''),
(238, 3, 'CX', 0, 1, 0, 0, 1, ''),(239, 3, 'CC', 0, 1, 0, 0, 1, ''),(240, 5, 'CK', 682, 1, 0, 0, 1, ''),(241, 6, 'GF', 594, 1, 0, 0, 1, ''),(242, 5, 'PF', 689, 1, 0, 0, 1, ''),
(243, 5, 'TF', 0, 1, 0, 0, 1, ''),(244, 7, 'AX', 0, 1, 0, 0, 1, 'NNNNN');
INSERT INTO `PREFIX_country` (`id_country`, `id_zone`, `iso_code`, `call_prefix`, `active`, `contains_states`, `need_identification_number`, `need_zip_code`, `zip_code_format`, `display_tax_label`) VALUES
(1, 1, 'DE', 49, 1, 0, 0, 1, 'NNNNN', 1),(2, 1, 'AT', 43, 1, 0, 0, 1, 'NNNN', 1),(3, 1, 'BE', 32, 1, 0, 0, 1, 'NNNN', 1),(4, 2, 'CA', 1, 1, 1, 0, 1, 'LNL NLN', 0),(5, 3, 'CN', 86, 1, 0, 0, 1, 'NNNNNN', 1),
(6, 1, 'ES', 34, 1, 0, 1, 1, 'NNNNN', 1),(7, 1, 'FI', 358, 1, 0, 0, 1, 'NNNNN', 1),(8, 1, 'FR', 33, 1, 0, 0, 1, 'NNNNN', 1),(9, 1, 'GR', 30, 1, 0, 0, 1, 'NNNNN', 1),(10, 1, 'IT', 39, 1, 0, 0, 1, 'NNNNN', 1),
(11, 3, 'JP', 81, 1, 0, 0, 1, 'NNN-NNNN', 1),(12, 1, 'LU', 352, 1, 0, 0, 1, 'NNNN', 1),(13, 1, 'NL', 31, 1, 0, 0, 1, 'NNNN LL', 1),(14, 1, 'PL', 48, 1, 0, 0, 1, 'NN-NNN', 1),
(15, 1, 'PT', 351, 1, 0, 0, 1, 'NNNN NNN', 1),(16, 1, 'CZ', 420, 1, 0, 0, 1, 'NNN NN', 1),(17, 1, 'GB', 44, 1, 0, 0, 1, '', 1),(18, 1, 'SE', 46, 1, 0, 0, 1, 'NNN NN', 1),
(19, 7, 'CH', 41, 1, 0, 0, 1, 'NNNN', 1),(20, 1, 'DK', 45, 1, 0, 0, 1, 'NNNN', 1),(21, 2, 'US', 1, 1, 1, 0, 1, 'NNNNN', 0),(22, 3, 'HK', 852, 1, 0, 0, 0, '', 1),(23, 1, 'NO', 47, 1, 0, 0, 1, 'NNNN', 1),
(24, 5, 'AU', 61, 1, 0, 0, 1, 'NNNN', 1),(25, 3, 'SG', 65, 1, 0, 0, 1, 'NNNNNN', 1),(26, 1, 'IE', 353, 1, 0, 0, 1, '', 1),(27, 5, 'NZ', 64, 1, 0, 0, 1, 'NNNN', 1),(28, 3, 'KR', 82, 1, 0, 0, 1, 'NNN-NNN', 1),
(29, 3, 'IL', 972, 1, 0, 0, 1, 'NNNNN', 1),(30, 4, 'ZA', 27, 1, 0, 0, 1, 'NNNN', 1),(31, 4, 'NG', 234, 1, 0, 0, 1, '', 1),(32, 4, 'CI', 225, 1, 0, 0, 1, '', 1),(33, 4, 'TG', 228, 1, 0, 0, 1, '', 1),
(34, 6, 'BO', 591, 1, 0, 0, 1, '', 1),(35, 4, 'MU', 230, 1, 0, 0, 1, '', 1),(36, 1, 'RO', 40, 1, 0, 0, 1, 'NNNNNN', 1),(37, 1, 'SK', 421, 1, 0, 0, 1, 'NNN NN', 1),(38, 4, 'DZ', 213, 1, 0, 0, 1, 'NNNNN', 1),
(39, 2, 'AS', 0, 1, 0, 0, 1, '', 1),(40, 7, 'AD', 376, 1, 0, 0, 1, 'CNNN', 1),(41, 4, 'AO', 244, 1, 0, 0, 0, '', 1),(42, 8, 'AI', 0, 1, 0, 0, 1, '', 1),(43, 2, 'AG', 0, 1, 0, 0, 1, '', 1),
(44, 6, 'AR', 54, 1, 1, 0, 1, 'LNNNN', 1),(45, 3, 'AM', 374, 1, 0, 0, 1, 'NNNN', 1),(46, 8, 'AW', 297, 1, 0, 0, 1, '', 1),(47, 3, 'AZ', 994, 1, 0, 0, 1, 'CNNNN', 1),(48, 2, 'BS', 0, 1, 0, 0, 1, '', 1),
(49, 3, 'BH', 973, 1, 0, 0, 1, '', 1),(50, 3, 'BD', 880, 1, 0, 0, 1, 'NNNN', 1),(51, 2, 'BB', 0, 1, 0, 0, 1, 'CNNNNN', 1),(52, 7, 'BY', 0, 1, 0, 0, 1, 'NNNNNN', 1),(53, 8, 'BZ', 501, 1, 0, 0, 0, '', 1),
(54, 4, 'BJ', 229, 1, 0, 0, 0, '', 1),(55, 2, 'BM', 0, 1, 0, 0, 1, '', 1),(56, 3, 'BT', 975, 1, 0, 0, 1, '', 1),(57, 4, 'BW', 267, 1, 0, 0, 1, '', 1),(58, 6, 'BR', 55, 1, 0, 0, 1, 'NNNNN-NNN', 1),
(59, 3, 'BN', 673, 1, 0, 0, 1, 'LLNNNN', 1),(60, 4, 'BF', 226, 1, 0, 0, 1, '', 1),(61, 3, 'MM', 95, 1, 0, 0, 1, '', 1),(62, 4, 'BI', 257, 1, 0, 0, 1, '', 1),(63, 3, 'KH', 855, 1, 0, 0, 1, 'NNNNN', 1),
(64, 4, 'CM', 237, 1, 0, 0, 1, '', 1),(65, 4, 'CV', 238, 1, 0, 0, 1, 'NNNN', 1),(66, 4, 'CF', 236, 1, 0, 0, 1, '', 1),(67, 4, 'TD', 235, 1, 0, 0, 1, '', 1),(68, 6, 'CL', 56, 1, 0, 0, 1, 'NNN-NNNN', 1),
(69, 6, 'CO', 57, 1, 0, 0, 1, 'NNNNNN', 1),(70, 4, 'KM', 269, 1, 0, 0, 1, '', 1),(71, 4, 'CD', 242, 1, 0, 0, 1, '', 1),(72, 4, 'CG', 243, 1, 0, 0, 1, '', 1),(73, 8, 'CR', 506, 1, 0, 0, 1, 'NNNNN', 1),
(74, 7, 'HR', 385, 1, 0, 0, 1, 'NNNNN', 1),(75, 8, 'CU', 53, 1, 0, 0, 1, '', 1),(76, 1, 'CY', 357, 1, 0, 0, 1, 'NNNN', 1),(77, 4, 'DJ', 253, 1, 0, 0, 1, '', 1),(78, 8, 'DM', 0, 1, 0, 0, 1, '', 1),
(79, 8, 'DO', 0, 1, 0, 0, 1, '', 1),(80, 3, 'TL', 670, 1, 0, 0, 1, '', 1),(81, 6, 'EC', 593, 1, 0, 0, 1, 'CNNNNNN', 1),(82, 4, 'EG', 20, 1, 0, 0, 0, '', 1),(83, 8, 'SV', 503, 1, 0, 0, 1, '', 1),
(84, 4, 'GQ', 240, 1, 0, 0, 1, '', 1),(85, 4, 'ER', 291, 1, 0, 0, 1, '', 1),(86, 1, 'EE', 372, 1, 0, 0, 1, 'NNNNN', 1),(87, 4, 'ET', 251, 1, 0, 0, 1, '', 1),(88, 8, 'FK', 0, 1, 0, 0, 1, 'LLLL NLL', 1),
(89, 7, 'FO', 298, 1, 0, 0, 1, '', 1),(90, 5, 'FJ', 679, 1, 0, 0, 1, '', 1),(91, 4, 'GA', 241, 1, 0, 0, 1, '', 1),(92, 4, 'GM', 220, 1, 0, 0, 1, '', 1),(93, 3, 'GE', 995, 1, 0, 0, 1, 'NNNN', 1),
(94, 4, 'GH', 233, 1, 0, 0, 1, '', 1),(95, 8, 'GD', 0, 1, 0, 0, 1, '', 1),(96, 7, 'GL', 299, 1, 0, 0, 1, '', 1),(97, 7, 'GI', 350, 1, 0, 0, 1, '', 1),(98, 8, 'GP', 590, 1, 0, 0, 1, '', 1),
(99, 8, 'GU', 0, 1, 0, 0, 1, '', 1),(100, 8, 'GT', 502, 1, 0, 0, 1, '', 1),(101, 7, 'GG', 0, 1, 0, 0, 1, 'LLN NLL', 1),(102, 4, 'GN', 224, 1, 0, 0, 1, '', 1),(103, 4, 'GW', 245, 1, 0, 0, 1, '', 1),
(104, 6, 'GY', 592, 1, 0, 0, 1, '', 1),(105, 8, 'HT', 509, 1, 0, 0, 1, '', 1),(106, 5, 'HM', 0, 1, 0, 0, 1, '', 1),(107, 7, 'VA', 379, 1, 0, 0, 1, 'NNNNN', 1),(108, 8, 'HN', 504, 1, 0, 0, 1, '', 1),
(109, 7, 'IS', 354, 1, 0, 0, 1, 'NNN', 1),(110, 3, 'IN', 91, 1, 0, 0, 1, 'NNN NNN', 1),(111, 3, 'ID', 62, 1, 0, 0, 1, 'NNNNN', 1),(112, 3, 'IR', 98, 1, 0, 0, 1, 'NNNNN-NNNNN', 1),
(113, 3, 'IQ', 964, 1, 0, 0, 1, 'NNNNN', 1),(114, 7, 'IM', 0, 1, 0, 0, 1, 'CN NLL', 1),(115, 8, 'JM', 0, 1, 0, 0, 1, '', 1),(116, 7, 'JE', 0, 1, 0, 0, 1, 'CN NLL', 1),(117, 3, 'JO', 962, 1, 0, 0, 1, '', 1),
(118, 3, 'KZ', 7, 1, 0, 0, 1, 'NNNNNN', 1),(119, 4, 'KE', 254, 1, 0, 0, 1, '', 1),(120, 7, 'KI', 686, 1, 0, 0, 1, '', 1),(121, 3, 'KP', 850, 1, 0, 0, 1, '', 1),(122, 3, 'KW', 965, 1, 0, 0, 1, '', 1),
(123, 3, 'KG', 996, 1, 0, 0, 1, '', 1),(124, 3, 'LA', 856, 1, 0, 0, 1, '', 1),(125, 1, 'LV', 371, 1, 0, 0, 1, 'C-NNNN', 1),(126, 3, 'LB', 961, 1, 0, 0, 1, '', 1),(127, 4, 'LS', 266, 1, 0, 0, 1, '', 1),
(128, 4, 'LR', 231, 1, 0, 0, 1, '', 1),(129, 4, 'LY', 218, 1, 0, 0, 1, '', 1),(130, 1, 'LI', 423, 1, 0, 0, 1, 'NNNN', 1),(131, 1, 'LT', 370, 1, 0, 0, 1, 'NNNNN', 1),(132, 3, 'MO', 853, 1, 0, 0, 0, '', 1),
(133, 7, 'MK', 389, 1, 0, 0, 1, '', 1),(134, 4, 'MG', 261, 1, 0, 0, 1, '', 1),(135, 4, 'MW', 265, 1, 0, 0, 1, '', 1),(136, 3, 'MY', 60, 1, 0, 0, 1, 'NNNNN', 1),(137, 3, 'MV', 960, 1, 0, 0, 1, '', 1),
(138, 4, 'ML', 223, 1, 0, 0, 1, '', 1),(139, 1, 'MT', 356, 1, 0, 0, 1, 'LLL NNNN', 1),(140, 5, 'MH', 692, 1, 0, 0, 1, '', 1),(141, 8, 'MQ', 596, 1, 0, 0, 1, '', 1),(142, 4, 'MR', 222, 1, 0, 0, 1, '', 1),
(143, 1, 'HU', 36, 1, 0, 0, 1, 'NNNN', 1),(144, 4, 'YT', 262, 1, 0, 0, 1, '', 1),(145, 2, 'MX', 52, 1, 0, 0, 1, 'NNNNN', 1),(146, 5, 'FM', 691, 1, 0, 0, 1, '', 1),(147, 7, 'MD', 373, 1, 0, 0, 1, 'C-NNNN', 1),
(148, 7, 'MC', 377, 1, 0, 0, 1, '980NN', 1),(149, 3, 'MN', 976, 1, 0, 0, 1, '', 1),(150, 7, 'ME', 382, 1, 0, 0, 1, 'NNNNN', 1),(151, 8, 'MS', 0, 1, 0, 0, 1, '', 1),(152, 4, 'MA', 212, 1, 0, 0, 1, 'NNNNN', 1),
(153, 4, 'MZ', 258, 1, 0, 0, 1, '', 1),(154, 4, 'NA', 264, 1, 0, 0, 1, '', 1),(155, 5, 'NR', 674, 1, 0, 0, 1, '', 1),(156, 3, 'NP', 977, 1, 0, 0, 1, '', 1),(157, 8, 'AN', 599, 1, 0, 0, 1, '', 1),
(158, 5, 'NC', 687, 1, 0, 0, 1, '', 1),(159, 8, 'NI', 505, 1, 0, 0, 1, 'NNNNNN', 1),(160, 4, 'NE', 227, 1, 0, 0, 1, '', 1),(161, 5, 'NU', 683, 1, 0, 0, 1, '', 1),(162, 5, 'NF', 0, 1, 0, 0, 1, '', 1),
(163, 5, 'MP', 0, 1, 0, 0, 1, '', 1),(164, 3, 'OM', 968, 1, 0, 0, 1, '', 1),(165, 3, 'PK', 92, 1, 0, 0, 1, '', 1),(166, 5, 'PW', 680, 1, 0, 0, 1, '', 1),(167, 3, 'PS', 0, 1, 0, 0, 1, '', 1),
(168, 8, 'PA', 507, 1, 0, 0, 1, 'NNNNNN', 1),(169, 5, 'PG', 675, 1, 0, 0, 1, '', 1),(170, 6, 'PY', 595, 1, 0, 0, 1, '', 1),(171, 6, 'PE', 51, 1, 0, 0, 1, '', 1),(172, 3, 'PH', 63, 1, 0, 0, 1, 'NNNN', 1),
(173, 5, 'PN', 0, 1, 0, 0, 1, 'LLLL NLL', 1),(174, 8, 'PR', 0, 1, 0, 0, 1, 'NNNNN', 1),(175, 3, 'QA', 974, 1, 0, 0, 1, '', 1),(176, 4, 'RE', 262, 1, 0, 0, 1, '', 1),(177, 7, 'RU', 7, 1, 0, 0, 1, 'NNNNNN', 1),
(178, 4, 'RW', 250, 1, 0, 0, 1, '', 1),(179, 8, 'BL', 0, 1, 0, 0, 1, '', 1),(180, 8, 'KN', 0, 1, 0, 0, 1, '', 1),(181, 8, 'LC', 0, 1, 0, 0, 1, '', 1),(182, 8, 'MF', 0, 1, 0, 0, 1, '', 1),
(183, 8, 'PM', 508, 1, 0, 0, 1, '', 1),(184, 8, 'VC', 0, 1, 0, 0, 1, '', 1),(185, 5, 'WS', 685, 1, 0, 0, 1, '', 1),(186, 7, 'SM', 378, 1, 0, 0, 1, 'NNNNN', 1),(187, 4, 'ST', 239, 1, 0, 0, 1, '', 1),
(188, 3, 'SA', 966, 1, 0, 0, 1, '', 1),(189, 4, 'SN', 221, 1, 0, 0, 1, '', 1),(190, 7, 'RS', 381, 1, 0, 0, 1, 'NNNNN', 1),(191, 4, 'SC', 248, 1, 0, 0, 1, '', 1),(192, 4, 'SL', 232, 1, 0, 0, 1, '', 1),
(193, 1, 'SI', 386, 1, 0, 0, 1, 'C-NNNN', 1),(194, 5, 'SB', 677, 1, 0, 0, 1, '', 1),(195, 4, 'SO', 252, 1, 0, 0, 1, '', 1),(196, 8, 'GS', 0, 1, 0, 0, 1, 'LLLL NLL', 1),(197, 3, 'LK', 94, 1, 0, 0, 1, 'NNNNN', 1),
(198, 4, 'SD', 249, 1, 0, 0, 1, '', 1),(199, 8, 'SR', 597, 1, 0, 0, 1, '', 1),(200, 7, 'SJ', 0, 1, 0, 0, 1, '', 1),(201, 4, 'SZ', 268, 1, 0, 0, 1, '', 1),(202, 3, 'SY', 963, 1, 0, 0, 1, '', 1),
(203, 3, 'TW', 886, 1, 0, 0, 1, 'NNNNN', 1),(204, 3, 'TJ', 992, 1, 0, 0, 1, '', 1),(205, 4, 'TZ', 255, 1, 0, 0, 1, '', 1),(206, 3, 'TH', 66, 1, 0, 0, 1, 'NNNNN', 1),(207, 5, 'TK', 690, 1, 0, 0, 1, '', 1),
(208, 5, 'TO', 676, 1, 0, 0, 1, '', 1),(209, 6, 'TT', 0, 1, 0, 0, 1, '', 1),(210, 4, 'TN', 216, 1, 0, 0, 1, '', 1),(211, 7, 'TR', 90, 1, 0, 0, 1, 'NNNNN', 1),(212, 3, 'TM', 993, 1, 0, 0, 1, '', 1),
(213, 8, 'TC', 0, 1, 0, 0, 1, 'LLLL NLL', 1),(214, 5, 'TV', 688, 1, 0, 0, 1, '', 1),(215, 4, 'UG', 256, 1, 0, 0, 1, '', 1),(216, 1, 'UA', 380, 1, 0, 0, 1, 'NNNNN', 1),(217, 3, 'AE', 971, 1, 0, 0, 1, '', 1),
(218, 6, 'UY', 598, 1, 0, 0, 1, '', 1),(219, 3, 'UZ', 998, 1, 0, 0, 1, '', 1),(220, 5, 'VU', 678, 1, 0, 0, 1, '', 1),(221, 6, 'VE', 58, 1, 0, 0, 1, '', 1),(222, 3, 'VN', 84, 1, 0, 0, 1, 'NNNNNN', 1),
(223, 2, 'VG', 0, 1, 0, 0, 1, 'CNNNN', 1),(224, 2, 'VI', 0, 1, 0, 0, 1, '', 1),(225, 5, 'WF', 681, 1, 0, 0, 1, '', 1),(226, 4, 'EH', 0, 1, 0, 0, 1, '', 1),(227, 3, 'YE', 967, 1, 0, 0, 1, '', 1),
(228, 4, 'ZM', 260, 1, 0, 0, 1, '', 1),(229, 4, 'ZW', 263, 1, 0, 0, 1, '', 1),(230, 7, 'AL', 355, 1, 0, 0, 1, 'NNNN', 1),(231, 3, 'AF', 93, 1, 0, 0, 0, '', 1),(232, 5, 'AQ', 0, 1, 0, 0, 1, '', 1),
(233, 1, 'BA', 387, 1, 0, 0, 1, '', 1),(234, 5, 'BV', 0, 1, 0, 0, 1, '', 1),(235, 5, 'IO', 0, 1, 0, 0, 1, 'LLLL NLL', 1),(236, 1, 'BG', 359, 1, 0, 0, 1, 'NNNN', 1),(237, 8, 'KY', 0, 1, 0, 0, 1, '', 1),
(238, 3, 'CX', 0, 1, 0, 0, 1, '', 1),(239, 3, 'CC', 0, 1, 0, 0, 1, '', 1),(240, 5, 'CK', 682, 1, 0, 0, 1, '', 1),(241, 6, 'GF', 594, 1, 0, 0, 1, '', 1),(242, 5, 'PF', 689, 1, 0, 0, 1, '', 1),
(243, 5, 'TF', 0, 1, 0, 0, 1, '', 1),(244, 7, 'AX', 0, 1, 0, 0, 1, 'NNNNN', 1);
INSERT INTO `PREFIX_country_lang` (`id_country`, `id_lang`, `name`) VALUES
(1, 1, 'Germany'),(1, 2, 'Allemagne'),(1, 3, 'Alemania'),(2, 1, 'Austria'),(2, 2, 'Autriche'),(2, 3, 'Austria'),
@@ -1026,3 +1026,13 @@ INSERT INTO `PREFIX_stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `n
(5, 4, 'Auffüllung'),
(5, 5, 'Riassortimento');
INSERT INTO `PREFIX_address_format` (`id_country`, `format`)
(SELECT `id_country` as id_country, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode city\ncountry\nphone' as format FROM `PREFIX_country`);
UPDATE `PREFIX_address_format` set `format`='firstname lastname
company
address1
address2
city state postcode
country
phone' where `id_country`=21;
+24 -3
View File
@@ -2,9 +2,9 @@ SET NAMES 'utf8';
INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES ('afterSaveAdminMeta', 'After save configuration in AdminMeta', 'After save configuration in AdminMeta', 0, 0);
INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES
INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES
(
(SELECT `id_module` FROM `PREFIX_module` WHERE `name` = 'blockcategories'),
(SELECT `id_module` FROM `PREFIX_module` WHERE `name` = 'blockcategories'),
(SELECT `id_hook` FROM `PREFIX_hook` WHERE `name` = 'afterSaveAdminMeta'), 1
);
@@ -23,7 +23,28 @@ ALTER TABLE `PREFIX_connections` CHANGE `ip_address` `ip_address` BIGINT NULL DE
UPDATE `PREFIX_meta_lang`
SET `title` = 'Angebote', `keywords` = 'besonders, Angebote', `url_rewrite` = 'angebote' WHERE url_rewrite = 'preise-fallen';
ALTER TABLE `PREFIX_order_detail`
ALTER TABLE `PREFIX_country` ADD `display_tax_label` BOOLEAN NOT NULL DEFAULT '1';
DROP TABLE IF EXISTS `PREFIX_country_tax`;
ALTER TABLE `PREFIX_order_detail`
CHANGE `product_quantity_in_stock` `product_quantity_in_stock` INT(10) NOT NULL DEFAULT '0';
CREATE TABLE `PREFIX_address_format` (
`id_country` int(10) unsigned NOT NULL,
`format` varchar(255) NOT NULL DEFAULT '',
KEY `country` (`id_country`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
INSERT INTO `PREFIX_address_format` (`id_country`, `format`)
(SELECT `id_country` as id_country, 'firstname lastname\ncompany\nvat_number\naddress1\naddress2\npostcode city\ncountry\nphone' as format FROM PREFIX_country);
UPDATE `PREFIX_address_format` set `format`='firstname lastname
company
address1
address2
city state postcode
country
phone' where `id_country`=21;
/* PHP:alter_cms_block(); */;
+4
View File
@@ -0,0 +1,4 @@
SET NAMES 'utf8';
ALTER TABLE `PREFIX_tab_lang` MODIFY `id_lang` int(10) unsigned NOT NULL AFTER `id_tab`;
+3 -1
View File
@@ -1,7 +1,9 @@
tinyMCE.init({
mode : "textareas",
mode : "specific_textareas",
theme : "advanced",
skin:"cirkuit",
editor_selector : "rte",
editor_deselector : "noEditor",
plugins : "safari,pagebreak,style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,xhtmlxtras,preview",
// Theme options
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
+29 -1
View File
@@ -23,6 +23,35 @@
<taxRule iso_code_country="br" id_tax="3" />
</taxRulesGroup>
</taxes>
<states>
<state name="Acre" iso_code="AC" country="BR" zone="South America" />
<state name="Alagoas" iso_code="AL" country="BR" zone="South America" />
<state name="Amapá" iso_code="AP" country="BR" zone="South America" />
<state name="Amazonas" iso_code="AM" country="BR" zone="South America" />
<state name="Bahia" iso_code="BA" country="BR" zone="South America" />
<state name="Ceará" iso_code="CE" country="BR" zone="South America" />
<state name="Distrito Federal" iso_code="DF" country="BR" zone="South America" />
<state name="Espírito Santo" iso_code="ES" country="BR" zone="South America" />
<state name="Goiás" iso_code="GO" country="BR" zone="South America" />
<state name="Maranhão" iso_code="MA" country="BR" zone="South America" />
<state name="Mato Grosso" iso_code="MT" country="BR" zone="South America" />
<state name="Mato Grosso do Sul" iso_code="MS" country="BR" zone="South America" />
<state name="Minas Gerais" iso_code="MG" country="BR" zone="South America" />
<state name="Pará" iso_code="PA" country="BR" zone="South America" />
<state name="Paraíba" iso_code="PB" country="BR" zone="South America" />
<state name="Paraná" iso_code="PR" country="BR" zone="South America" />
<state name="Pernambuco" iso_code="PE" country="BR" zone="South America" />
<state name="Piauí" iso_code="PI" country="BR" zone="South America" />
<state name="Rio de Janeiro" iso_code="RJ" country="BR" zone="South America" />
<state name="Rio Grande do Norte" iso_code="RN" country="BR" zone="South America" />
<state name="Rio Grande do Sul" iso_code="RS" country="BR" zone="South America" />
<state name="Rondônia" iso_code="RO" country="BR" zone="South America" />
<state name="Roraima" iso_code="RR" country="BR" zone="South America" />
<state name="Santa Catarina" iso_code="SC" country="BR" zone="South America" />
<state name="São Paulo" iso_code="SP" country="BR" zone="South America" />
<state name="Sergipe" iso_code="SE" country="BR" zone="South America" />
<state name="Tocantins" iso_code="TO" country="BR" zone="South America" />
</states>
<units>
<unit type="weight" value="kg" />
<unit type="volume" value="L" />
@@ -31,4 +60,3 @@
<unit type="long_distance" value="km" />
</units>
</localizationPack>
+32 -32
View File
@@ -2,38 +2,38 @@
global $_LANGMAIL;
$_LANGMAIL = array();
$_LANGMAIL['Welcome!'] = '';
$_LANGMAIL['Message from contact form'] = '';
$_LANGMAIL['Your message has been correctly sent'] = '';
$_LANGMAIL['New credit slip regarding your order'] = '';
$_LANGMAIL['Virtual product to download'] = '';
$_LANGMAIL['Fwd: Customer message'] = '';
$_LANGMAIL['Your guest account has been transformed to customer account'] = '';
$_LANGMAIL['Package in transit'] = '';
$_LANGMAIL['Welcome!'] = 'Willkommen!';
$_LANGMAIL['Message from contact form'] = 'Nachricht aus dem Kontaktformular';
$_LANGMAIL['Your message has been correctly sent'] = 'Ihre Nachricht ist korrekt gesendet worden';
$_LANGMAIL['New credit slip regarding your order'] = 'Neuer Gutschein zu Ihrer Bestellung';
$_LANGMAIL['Virtual product to download'] = 'Virtuelles Produkt zum Downloaden';
$_LANGMAIL['Fwd: Customer message'] = 'Fwd: Kundennachricht';
$_LANGMAIL['Your guest account has been transformed to customer account'] = 'Ihr Gast-Konto wurde in ein Kunden-Konto umgewandelt';
$_LANGMAIL['Package in transit'] = 'Paket auf dem Weg';
$_LANGMAIL['[Log'] = '';
$_LANGMAIL['Order confirmation'] = '';
$_LANGMAIL['Message from a customer'] = '';
$_LANGMAIL['New message regarding your order'] = '';
$_LANGMAIL['Your order return state has changed'] = '';
$_LANGMAIL['Your password'] = '';
$_LANGMAIL['Password query confirmation'] = '';
$_LANGMAIL['An answer to your message is available'] = '';
$_LANGMAIL['New voucher regarding your order'] = '';
$_LANGMAIL['Happy birthday!'] = '';
$_LANGMAIL['Newsletter confirmation'] = '';
$_LANGMAIL['Newsletter voucher'] = '';
$_LANGMAIL['Your wishlist\\\'s link'] = '';
$_LANGMAIL['Message from '] = '';
$_LANGMAIL[' $subject'] = '';
$_LANGMAIL['Your cart and your discount'] = '';
$_LANGMAIL['Thanks for your order'] = '';
$_LANGMAIL['You are one of our best customers'] = '';
$_LANGMAIL['We miss you'] = '';
$_LANGMAIL['Product available'] = '';
$_LANGMAIL['Product out of stock'] = '';
$_LANGMAIL['Error reporting from your PayPal module'] = '';
$_LANGMAIL['Congratulations!'] = '';
$_LANGMAIL['Referral Program'] = '';
$_LANGMAIL['A friend sent you a link to'] = '';
$_LANGMAIL['Order confirmation'] = 'Bestellungsbestätigung';
$_LANGMAIL['Message from a customer'] = 'Nachricht eines Kunden';
$_LANGMAIL['New message regarding your order'] = 'Neue Nachricht zu Ihrer Bestellung';
$_LANGMAIL['Your order return state has changed'] = 'Ihr Bestellrücksendungsstatus hat sich geändert';
$_LANGMAIL['Your password'] = 'Ihr Kennwort';
$_LANGMAIL['Password query confirmation'] = 'Bestätigung der Kennwortanfrage';
$_LANGMAIL['An answer to your message is available'] = 'Es steht eine Antwort auf Ihre Nachricht zur Verfügung';
$_LANGMAIL['New voucher regarding your order'] = 'Neuer Gutschein zu Ihrer Bestellung';
$_LANGMAIL['Happy birthday!'] = 'Alles Gute zum Geburtstag!';
$_LANGMAIL['Newsletter confirmation'] = 'Newsletter-Bestätigung';
$_LANGMAIL['Newsletter voucher'] = 'Newsletter-Gutschein';
$_LANGMAIL['Your wishlist\\\'s link'] = 'Ihr Wunschlisten-Link';
$_LANGMAIL['Message from '] = 'Nachricht von';
$_LANGMAIL[' $subject'] = '$subject';
$_LANGMAIL['Your cart and your discount'] = 'Ihr Warenkorb und Ihr Rabatt';
$_LANGMAIL['Thank you for your order.'] = 'Danke für Ihre Bestellung.';
$_LANGMAIL['You are one of our best customers!'] = 'Sind sind einer unserer besten Kunden!';
$_LANGMAIL['We miss you!'] = 'Wir vermissen Sie!';
$_LANGMAIL['Product available'] = 'Produkt verfügbar';
$_LANGMAIL['Product out of stock'] = 'Produkt ausverkauft';
$_LANGMAIL['Error reporting from your PayPal module'] = 'Fehlerbericht aus Ihrem PayPal Modul';
$_LANGMAIL['Congratulations!'] = 'Herzlichen Glückwunsch!';
$_LANGMAIL['Referral Program'] = 'Empfehlungsprogramm';
$_LANGMAIL['A friend sent you a link to'] = 'Ein Freund hat Ihnen einen Link gesandt zu';
?>
+2 -17
View File
@@ -90,25 +90,10 @@
</tr>
<tr>
<td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;">
{delivery_company}
<br><span style="color:#DB3484; font-weight:bold;">{delivery_firstname} {delivery_lastname}</span>
<br>{delivery_address1}
<br>{delivery_address2}
<br>{delivery_city} {delivery_postal_code}
<br>{delivery_country} {delivery_state}
<br>{delivery_phone}
<br>{delivery_other}
{delivery_block_html}
</td>
<td style="padding:0.5em 0 0.5em 0.5em; background-color:#EBECEE;">
{invoice_company}
<br />{invoice_vat_number}
<br><span style="color:#DB3484; font-weight:bold;">{invoice_firstname} {invoice_lastname}</span>
<br>{invoice_address1}
<br>{invoice_address2}
<br>{invoice_city} {invoice_postal_code}
<br>{invoice_country} {invoice_state}
<br>{invoice_phone}
<br>{invoice_other}
{invoice_block_html}
</td>
</tr>
</table>
+2 -17
View File
@@ -17,25 +17,10 @@ Livraison
Transporteur : {carrier}
Adresse de livraison :
{delivery_company}
{delivery_firstname} {delivery_lastname}
{delivery_address1}
{delivery_address2}
{delivery_postal_code} {delivery_city}
{delivery_country} {delivery_state}
{delivery_other}
{delivery_block_txt}
Adresse de facturation :
{invoice_company}
{invoice_vat_number}
{invoice_firstname} {invoice_lastname}
{invoice_address1}
{invoice_address2}
{invoice_postal_code} {invoice_city}
{invoice_country} {invoice_state}
{invoice_other}
{invoice_block_txt}
Vous pouvez accéder au suivi de votre commande et télécharger votre facture dans "Historique des commandes" de la rubrique "Mon compte" sur notre site.
Si vous avez un compte invité, vous pouvez suivre votre commande à cette adresse: {shop_url}guest-tracking.php
+2 -1
View File
@@ -4,8 +4,9 @@
<displayName>Authorize.net AIM (Advanced Integration Method)</displayName>
<version>1.0</version>
<description>Receive payment with Authorize.net</description>
<author></author>
<author>PrestaShop</author>
<tab>payments_gateways</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries>us</limited_countries>
</module>
+3 -3
View File
@@ -4,7 +4,7 @@ global $_MODULE;
$_MODULE = array();
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_c2796655c25e1b0b8582716036aece08'] = 'Regalo de cumpleaños';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d1f5899bf2af57ed816390d9d740daf6'] = 'Haga a sus clientes regalos de cumpleaños automáticamente';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_42f95f1b218dda65c23c52fcb205f1ed'] = 'Cree un vale descuento para los clientes que celebren su cumpleaños y que pueda usarse una sola vez';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_ccfcf858237a83953c1ac03b5abde35e'] = 'Crear un bono para los clientes que celebran su cumpleaños y que tiene por lo menos un pedido válido';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Activo';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_52292d2f9c39936bc72fbd47a3060df3'] = 'Adicionalemente, debe establecer una regla CRON que pida el archivo';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f7e78e04cba74c610354e91e622cc105'] = 'todos los días';
@@ -24,5 +24,5 @@ $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_7b6ac3f2cdb42a4462ff7ca3c
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_410008089d5bb723438103a84d48a59c'] = 'Para alcanzar este objetivo usted puede organizar:';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_3e788301a1b0ce341aa5ce15bc520545'] = 'Operaciones puntuales: recompensas comerciales (ofertas especiales personalizadas, producto o servicios ofrecidos), recompensas no comerciales (prioridad en el envío de un pedido o de un producto), recompensas pecuniarias (enlaces, cupones del descuento, prioridad en el reembolso...).';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f299b58558601a85c98a2d1d7867d523'] = 'Operaciones sostenibles: las tarjetas de fidelidad o de puntos, que no sólo justifican la comunicación entre el comerciante y el cliente, pero también ofrecen ventajas a los clientes (ofertas, descuentos privados).';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_2ac84f3e753fa299ebe4a6dfe57f1d9c'] = 'Estas operaciones animan a los clientes a comprar y también a volver a la tienda virtual regularmente.';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_38241c5ab16ef8f1ba73460ecd0469e8'] = '¡Su regalo de cumpleaños!';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d434c183a411611f50fa7e121b0f6565'] = 'Estas operaciones animan a los clientes a comprar y también a volver a su tienda en línea frecuentemente.';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d46bd07675d08116e85f8a4c7866de53'] = '¡Su regalo de cumpleaños!';
+3
View File
@@ -4,6 +4,7 @@ global $_MODULE;
$_MODULE = array();
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_c2796655c25e1b0b8582716036aece08'] = 'Cadeau d\'anniversaire';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d1f5899bf2af57ed816390d9d740daf6'] = 'Offrez automatiquement à vos clients des cadeaux d\'anniversaire';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_ccfcf858237a83953c1ac03b5abde35e'] = 'Créer un bon de réduction pour les clients fêtant leur anniversaire et ayant au moins une commande valide';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Actif';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_52292d2f9c39936bc72fbd47a3060df3'] = 'De plus, vous devez installer une règle CRON qui appellera le fichier';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f7e78e04cba74c610354e91e622cc105'] = 'chaque jour';
@@ -23,3 +24,5 @@ $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_7b6ac3f2cdb42a4462ff7ca3c
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_410008089d5bb723438103a84d48a59c'] = 'Pour y parvenir, plusieurs moyens existent :';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_3e788301a1b0ce341aa5ce15bc520545'] = 'Les opérations ponctuelles : les récompenses marchandes (offres promotionnelles ciblées et personnalisées, cadeaux -produit ou service offert-), les récompenses non marchandes (traitement prioritaire d\'une commande ou d\'un produit), les récompenses pécuniaires (bons d\'achat, de réduction, de remboursement). ';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f299b58558601a85c98a2d1d7867d523'] = 'Les opérations pérennes : (carte de fidélité, points de fidélité) qui non seulement justifient la communication marchand-clients, et aussi offre des avantages aux clients (offres privatives, réductions).';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d434c183a411611f50fa7e121b0f6565'] = 'Ces opérations encouragent les clients à acheter et aussi à revenir sur votre boutique en ligne régulièrement.';
$_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d46bd07675d08116e85f8a4c7866de53'] = 'Votre cadeau d\'anniversaire !';
+13 -13
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -42,7 +42,7 @@ class BlockCart extends Module
$this->displayName = $this->l('Cart block');
$this->description = $this->l('Adds a block containing the customer\'s shopping cart.');
}
public function smartyAssigns(&$smarty, &$params)
{
global $errors, $cookie;
@@ -62,7 +62,7 @@ class BlockCart extends Module
}
else
$taxCalculationMethod = Group::getDefaultPriceDisplayMethod();
$useTax = !($taxCalculationMethod == PS_TAX_EXC);
$products = $params['cart']->getProducts(true);
@@ -72,13 +72,13 @@ class BlockCart extends Module
$wrappingCost = (float)($params['cart']->getOrderTotal($useTax, Cart::ONLY_WRAPPING));
$totalToPay = $params['cart']->getOrderTotal($useTax);
if ($useTax AND Configuration::get('PS_TAX_DISPLAY') == 1)
{
$totalToPayWithoutTaxes = $params['cart']->getOrderTotal(false);
$smarty->assign('tax_cost', Tools::displayPrice($totalToPay - $totalToPayWithoutTaxes, $currency));
}
$smarty->assign(array(
'products' => $products,
'customizedDatas' => Product::getAllCustomizedDatas((int)($params['cart']->id)),
@@ -88,7 +88,7 @@ class BlockCart extends Module
'nb_total_products' => (int)($nbTotalProducts),
'shipping_cost' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::ONLY_SHIPPING), $currency),
'show_wrapping' => $wrappingCost > 0 ? true : false,
'show_tax' => (int)(Configuration::get('PS_TAX_DISPLAY')) == 1 ? true : false,
'show_tax' => (int)(Configuration::get('PS_TAX_DISPLAY') == 1 && $smarty->getConfigVars('use_taxes')),
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency),
'total' => Tools::displayPrice($totalToPay, $currency),
@@ -125,7 +125,7 @@ class BlockCart extends Module
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<fieldset>
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<label>'.$this->l('Ajax cart').'</label>
<div class="margin-form">
<input type="radio" name="ajax" id="ajax_on" value="1" '.(Tools::getValue('ajax', Configuration::get('PS_BLOCK_CART_AJAX')) ? 'checked="checked" ' : '').'/>
@@ -134,7 +134,7 @@ class BlockCart extends Module
<label class="t" for="ajax_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p class="clear">'.$this->l('Activate AJAX mode for cart (compatible with the default theme)').'</p>
</div>
<center><input type="submit" name="submitBlockCart" value="'.$this->l('Save').'" class="button" /></center>
</fieldset>
</form>';
@@ -157,11 +157,10 @@ class BlockCart extends Module
{
if (Configuration::get('PS_CATALOG_MODE'))
return;
global $smarty;
$smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
$this->smartyAssigns($smarty, $params);
return $this->display(__FILE__, 'blockcart.tpl');
}
@@ -174,20 +173,21 @@ class BlockCart extends Module
{
if (Configuration::get('PS_CATALOG_MODE'))
return;
global $smarty;
$this->smartyAssigns($smarty, $params);
$res = $this->display(__FILE__, 'blockcart-json.tpl');
return $res;
}
public function hookHeader()
{
if (Configuration::get('PS_CATALOG_MODE'))
return;
Tools::addCSS(($this->_path).'blockcart.css', 'all');
if ((int)(Configuration::get('PS_BLOCK_CART_AJAX')))
Tools::addJS(($this->_path).'ajax-cart.js');
}
}
+5 -5
View File
@@ -40,13 +40,13 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
<h4>
<a href="{$link->getPageLink("$order_process.php", true)}">{l s='Cart' mod='blockcart'}</a>
{if $ajax_allowed}
<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded'}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
<span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}>&nbsp;</span>
{/if}
</h4>
<div class="block_content">
<!-- block summary -->
<div id="cart_block_summary" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed}collapsed{else}expanded{/if}">
<div id="cart_block_summary" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}collapsed{else}expanded{/if}">
<span class="ajax_cart_quantity" {if $cart_qties <= 0}style="display:none;"{/if}>{$cart_qties}</span>
<span class="ajax_cart_product_txt_s" {if $cart_qties <= 1}style="display:none"{/if}>{l s='products' mod='blockcart'}</span>
<span class="ajax_cart_product_txt" {if $cart_qties > 1}style="display:none"{/if}>{l s='product' mod='blockcart'}</span>
@@ -54,7 +54,7 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
<span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='(empty)' mod='blockcart'}</span>
</div>
<!-- block list of products -->
<div id="cart_block_list" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed}expanded{else}collapsed{/if}">
<div id="cart_block_list" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}expanded{else}collapsed{/if}">
{if $products}
<dl class="products">
{foreach from=$products item='product' name='myLoop'}
@@ -126,7 +126,7 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
<span>{l s='Total' mod='blockcart'}</span>
<span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>
</p>
{if $use_taxes}
{if $use_taxes && $display_tax_label == 1}
{if $priceDisplay == 0}
<p id="cart-price-precisions">
{l s='Prices are tax included' mod='blockcart'}
+1
View File
@@ -8,4 +8,5 @@
<tab>front_office_features</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
+1 -1
View File
@@ -40,7 +40,7 @@ $_MODULE['<{blockcms}prestashop>blockcms_903d12e7aa8c380c290b78c1898e01b7'] = 'U
$_MODULE['<{blockcms}prestashop>blockcms_92fc29650a0f9dd3fca4e5de1845f78b'] = 'Debe elegir al menos una página o subcategoría para crear un bloque CMS';
$_MODULE['<{blockcms}prestashop>blockcms_5e75cbfbfd02a7b2fab0ed21505e811b'] = 'Página CMS o subcategoría no válidos';
$_MODULE['<{blockcms}prestashop>blockcms_420d575844f77db5299065080d9c237f'] = 'Nombre del bloque demasiado largo';
$_MODULE['<{blockcms}prestashop>blockcms_c12d11dfdaf316576221cf4319fbd7fc'] = 'id del bloque cms no válida';
$_MODULE['<{blockcms}prestashop>blockcms_ede67d50014846cb8bb1b00d5fde77be'] = ' id_cms_block no válido';
$_MODULE['<{blockcms}prestashop>blockcms_05b51791a83d3cef29ad68b70d48d131'] = 'Activación footer no válida';
$_MODULE['<{blockcms}prestashop>blockcms_5dab5acc3c6a2a7e87e8d8926a2c763e'] = 'Está tratando de suprimir un bloque cms que no existe';
$_MODULE['<{blockcms}prestashop>blockcms_138218281781fd0d938a140892d7386c'] = 'Edición de links CMS a pie de página con éxito';
+1 -1
View File
@@ -40,7 +40,7 @@ $_MODULE['<{blockcms}prestashop>blockcms_903d12e7aa8c380c290b78c1898e01b7'] = 'E
$_MODULE['<{blockcms}prestashop>blockcms_92fc29650a0f9dd3fca4e5de1845f78b'] = 'Vous devez choisir au moins une page ou sous-catégorie pour créer un bloc CMS';
$_MODULE['<{blockcms}prestashop>blockcms_5e75cbfbfd02a7b2fab0ed21505e811b'] = 'Page CMS ou sous-catégorie invalide';
$_MODULE['<{blockcms}prestashop>blockcms_420d575844f77db5299065080d9c237f'] = 'Nom du bloc trop long';
$_MODULE['<{blockcms}prestashop>blockcms_c12d11dfdaf316576221cf4319fbd7fc'] = 'id_block_cms invalide';
$_MODULE['<{blockcms}prestashop>blockcms_ede67d50014846cb8bb1b00d5fde77be'] = 'id_cms_block invalide';
$_MODULE['<{blockcms}prestashop>blockcms_05b51791a83d3cef29ad68b70d48d131'] = 'Footer activation invalide';
$_MODULE['<{blockcms}prestashop>blockcms_5dab5acc3c6a2a7e87e8d8926a2c763e'] = 'Vous essayez de supprimer un block cms inexistant';
$_MODULE['<{blockcms}prestashop>blockcms_138218281781fd0d938a140892d7386c'] = 'Édition des liens CMS en pied de page réussie';
+1
View File
@@ -8,4 +8,5 @@
<tab>front_office_features</tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
+32 -5
View File
@@ -84,19 +84,46 @@ function reloadContent()
ajaxLoaderOn = 1;
}
ajaxQuery = $.ajax(
data = $('#layered_form').serialize();
$('.layered_slider').each( function () {
data += '&'+$(this).attr('id')+'='+$(this).slider('values', 0)+'_'+$(this).slider('values', 1);
});
ajaxQuery = $.ajax(
{
type: 'GET',
url: baseDir + 'modules/blocklayered/blocklayered-ajax.php',
data: $('#layered_form').serialize(),
data: data,
dataType: 'json',
success: function(result)
{
$('#layered_block_left').after($(result)[0]).remove();
$('#product_list').html($(result)[1]);
$('#layered_block_left').after('<div id="tmp_layered_block_left"></div>').remove();
$('#tmp_layered_block_left').html(result.filtersBlock).attr('id', 'layered_block_left');
$('#product_list').html(result.productList).html();
$('#product_list').css('opacity', '1');
ajaxLoaderOn = 0;
}
});
ajaxQueries.push(ajaxQuery);
}
}
/*
function initSlider(type, min, max, values, unit)
{
$('#layered_'+type+'_slider').slider({
range: true,
min: min,
max: max,
values: [ values[0], values[1]],
slide: function( event, ui ) {
$('#layered_'+type+'_range').html(ui.values[ 0 ] + unit + ' - ' + ui.values[ 1 ] + unit);
},
stop: function () {
reloadContent();
}
});
$('#layered_'+type+'_range').html($('#layered_'+type+'_slider').slider('values', 0 ) +unit+'-'+$('#layered_'+type+'_slider').slider('values', 1)+unit );
}
*/
+327 -347
View File
@@ -30,6 +30,9 @@ if (!defined('_CAN_LOAD_FILES_'))
class BlockLayered extends Module
{
private $products ;
public function __construct()
{
$this->name = 'blocklayered';
@@ -46,7 +49,6 @@ class BlockLayered extends Module
public function install()
{
if ($result = parent::install() AND $this->registerHook('leftColumn') AND $this->registerHook('header')
AND $this->registerHook('addProduct') AND $this->registerHook('updateProduct') AND $this->registerHook('deleteProduct')
AND $this->registerHook('categoryAddition') AND $this->registerHook('categoryUpdate') AND $this->registerHook('categoryDeletion'))
{
Configuration::updateValue('PS_LAYERED_NAVIGATION_CHECKBOXES', 1);
@@ -60,13 +62,12 @@ class BlockLayered extends Module
{
/* Delete all configurations */
Configuration::deleteByName('PS_LAYERED_NAVIGATION_CHECKBOXES');
return parent::uninstall();
}
public function hookLeftColumn($params)
{
return $this->generateFilters();
return $this->generateFiltersBlock($this->getSelectedFilters());
}
public function hookRightColumn($params)
@@ -77,36 +78,22 @@ class BlockLayered extends Module
public function hookHeader($params)
{
Tools::addJS(($this->_path).'blocklayered.js');
Tools::addJS(_PS_JS_DIR_.'jquery/jquery-ui-1.8.10.custom.min.js');
Tools::addCSS(($this->_path).'blocklayered.css', 'all');
Tools::addCSS(_PS_CSS_DIR_.'jquery-ui-1.8.10.custom.css', 'all');
}
public function hookAddProduct($params)
{
$this->rebuildLayeredCache(array((int)$params['product']->id));
}
public function hookUpdateProduct($params)
{
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_cache WHERE id_product = '.(int)$params['product']->id.' LIMIT 1');
$this->rebuildLayeredCache(array((int)$params['product']->id));
}
public function hookDeleteProduct($params)
{
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_cache WHERE id_product = '.(int)$params['product']->id.' LIMIT 1');
}
public function hookCategoryAddition($params)
{
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'layered_cache` ADD `c'.(int)$params['category']->id.'` TINYINT UNSIGNED NOT NULL DEFAULT \'0\'');
Configuration::updateValue('PS_LAYERED_COLUMNS', Configuration::get('PS_LAYERED_COLUMNS').',c'.(int)$params['category']->id);
$this->rebuildLayeredCache(array(), array((int)$params['category']->id));
}
public function hookCategoryUpdate($params)
{
/* The category status might (active, inactive) have changed, we have to update the layered cache table structure */
if (!$params['category']->active)
/*
if (!$params['category']->active)
$this->hookCategoryDeletion($params);
else
{
@@ -119,27 +106,23 @@ class BlockLayered extends Module
if (!Db::getInstance()->getRow('SELECT id_layered_category FROM `'._DB_PREFIX_.'layered_category` WHERE id_category = '.(int)$params['category']->id))
$this->rebuildLayeredCache(array(), array((int)$params['category']->id));
}
*/
}
public function hookCategoryDeletion($params)
{
Db::getInstance()->Execute('DELETE FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$params['category']->id);
$oneRow = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'layered_cache`');
if (isset($oneRow['c'.(int)$params['category']->id]))
{
Db::getInstance()->Execute('ALTER TABLE `'._DB_PREFIX_.'layered_cache` DROP `c'.(int)$params['category']->id.'`');
Configuration::updateValue('PS_LAYERED_COLUMNS', str_replace(',c'.(int)$params['category']->id, '', Configuration::get('PS_LAYERED_COLUMNS')));
}
}
public function getContent()
{
$html = '';
if (Tools::isSubmit('submitLayeredCache'))
{
$this->rebuildLayeredStructure();
$this->rebuildLayeredCache();
echo '
$html .= '
<div class="conf confirm">
<img src="../img/admin/ok.gif" alt="" title="" />
'.$this->l('Layered navigation database was initialized successfully').'
@@ -147,21 +130,20 @@ class BlockLayered extends Module
}
elseif (Tools::isSubmit('submitLayeredSettings'))
{
echo '
$html .= '
<div class="conf confirm">
<img src="../img/admin/ok.gif" alt="" title="" />
'.$this->l('Settings saved successfully').'
</div>';
}
echo '
$html .= '
<h2>'.$this->l('Layered navigation').'</h2>
<p class="warning" style="font-weight: bold;"><img src="../img/admin/information.png" alt="" /> '.$this->l('This module is in beta version and will be improved in PrestaShop v1.4.1').'</p><br />
<p class="warning" style="font-weight: bold;"><img src="../img/admin/information.png" alt="" /> '.$this->l('This module is in beta version and will be improved').'</p><br />
<fieldset class="width2">
<legend><img src="../img/admin/asterisk.gif" alt="" />'.$this->l('10 upcoming improvements in PrestaShop v1.4.1').'</legend>
<legend><img src="../img/admin/asterisk.gif" alt="" />'.$this->l('10 upcoming improvements').'</legend>
<ol>
<li>'.$this->l('Real-time refresh of the cache table').'</li>
<li>'.$this->l('Real-time refresh of the cache table').' <img src="../img/admin/enabled.gif" alt="" /></li>
<li>'.$this->l('Additional filters (prices, weight)').'</li>
<li>'.$this->l('Ability to manage filters by category in the module configuration').'</li>
<li>'.$this->l('Ability to hide filter groups with no values and filter values with 0 products').'</li>
@@ -186,22 +168,161 @@ class BlockLayered extends Module
<legend><img src="../img/admin/database_gear.gif" alt="" />'.$this->l('Cache initialization').'</legend>
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<div class="warning">
<p style="font-weight: bold;"><img src="../img/admin/warning.gif" alt="" /> '.$this->l('When do you have to initialize the cache?').'</p>
<ul>
<li style="color: red; font-weight: bold;">'.$this->l('Before using this module for the first time').'</li>
<li>'.$this->l('You add/update/delete').' '.$this->l('a feature or a feature value').'</li>
<li>'.$this->l('You add/update/delete').' '.$this->l('an attribute group or an attribute value').'</li>
<li>'.$this->l('You update one or more feature values for a product').'</li>
</ul>
<p style="color: red; font-weight: bold;">'.$this->l('Before using this module for the first time you have to initialize the cache').'</p>
<p><b>'.$this->l('Warning: This could take several minutes.').'</b><br /><br />
'.$this->l('If you do not, this cache table might become larger and larger (less efficient), and all the new choices (attributes, features) will not be offered to your visitors.').'</p>
</div>
<p style="text-align: center;"><input type="submit" class="button" name="submitLayeredCache" value="'.$this->l('Initialize the layered navigation database').'" /></p>
</form>
</fieldset>';
return $html;
}
public function generateFilters($selectedFilters = array())
private function getSelectedFilters()
{
$id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1));
if ($id_parent == 1)
return;
/* Analyze all the filters selected by the user and store them into a tab */
$selectedFilters = array('category' => array(), 'manufacturer' => array(), 'quantity' => array(), 'condition' => array());
foreach ($_GET AS $key => $value)
{
if (substr($key, 0, 8) == 'layered_')
{
preg_match('/^(.*)_[0-9|new|used|refurbished|slider]+$/', substr($key, 8, strlen($key) - 8), $res);
if (isset($res[1]))
{
$tmpTab = explode('_', $value);
$value = $tmpTab[0];
$id_key = false;
if (isset($tmpTab[1]))
$id_key = $tmpTab[1];
if ($res[1] == 'condition' AND in_array($value, array('new', 'used', 'refurbished')))
$selectedFilters['condition'][] = $value;
elseif ($res[1] == 'quantity' AND (!$value OR $value == 1))
$selectedFilters['quantity'][] = $value;
elseif (in_array($res[1], array('id_attribute_group', 'category', 'id_feature', 'manufacturer')))
{
if (!isset($selectedFilters[$res[1].($id_key ? '_'.$id_key : '')]))
$selectedFilters[$res[1].($id_key ? '_'.$id_key : '')] = array();
$selectedFilters[$res[1].($id_key ? '_'.$id_key : '')][] = (int)$value;
}
elseif (in_array($res[1], array('weight')))
$selectedFilters[$res[1]] = $tmpTab;
}
}
}
return $selectedFilters;
}
public function getProductByFilters($selectedFilters = array())
{
global $cookie;
if (!empty($this->products))
return $this->products;
/* If the current category isn't defined of if it's homepage, we have nothing to display */
$id_parent = (int)Tools::getValue('id_category', Tools::getValue('id_category_layered', 1));
if ($id_parent == 1)
return;
if (!sizeof($selectedFilters['category']))
$selectedFilters['category'][] = $id_parent;
$queryFilters = '';
foreach ($selectedFilters AS $key => $filterValues)
{
if (!sizeof($filterValues))
continue;
preg_match('/^(.*[^_0-9])/', $key, $res);
$key = $res[1];
switch ($key)
{
case 'id_feature':
$queryFilters .= ' AND p.id_product IN ( SELECT id_product FROM '._DB_PREFIX_.'feature_product fp WHERE ';
foreach ($filterValues AS $filterValue)
$queryFilters .= 'fp.`id_feature_value` = '.(int)$filterValue.' OR ';
$queryFilters = rtrim($queryFilters, 'OR ').')';
break;
case 'id_attribute_group':
$queryFilters .= ' AND p.id_product IN ( SELECT pa.`id_product`
FROM `ps_product_attribute_combination` pac
LEFT JOIN `ps_product_attribute` pa
ON (pa.`id_product_attribute` = pac.`id_product_attribute`) WHERE ';
foreach ($filterValues AS $filterValue)
$queryFilters .= 'pac.`id_attribute` = '.(int)$filterValue.' OR ';
$queryFilters = rtrim($queryFilters, 'OR ').')';
break;
case 'category':
$parent = new category($id_parent);
if (!sizeof($selectedFilters['category']))
$queryFilters .= ' AND p.id_product IN ( SELECT id_product FROM '._DB_PREFIX_.'category_product cp
LEFT JOIN ps_category c ON (c.id_category = cp.id_category)
WHERE 1 AND c.nleft >= parent->nleft AND c.nright <= parent->nright';
else
{
$queryFilters .= ' AND p.id_product IN ( SELECT id_product FROM '._DB_PREFIX_.'category_product cp WHERE 1 AND cp.`id_category` = '.(int)$id_parent;
if (sizeof($selectedFilters['category']))
$queryFilters .= ' OR ';
foreach ($selectedFilters['category'] AS $id_category)
$queryFilters .= 'cp.`id_category` = '.(int)$id_category.' OR ';
$queryFilters = rtrim($queryFilters, 'OR ').')';
}
break;
case 'quantity':
if (sizeof($selectedFilters['quantity']) == 2)
break;
$queryFilters .= ' AND p.quantity '.(!$selectedFilters['quantity'][0] ? '=' : '>').' 0';
break;
case 'manufacturer':
$queryFilters .= ' AND p.id_manufacturer IN ('.implode($selectedFilters['manufacturer'], ',').')';
break;
case 'condition':
if (sizeof($selectedFilters['condition']) == 3)
break;
$queryFilters .= ' AND p.condition IN (';
foreach ($selectedFilters['condition'] AS $cond)
$queryFilters .= '\''.$cond.'\',';
$queryFilters = rtrim($queryFilters, ',').')';
break;
case 'weight':
$queryFilters .= ' AND p.`weight` BETWEEN '.(float)$selectedFilters['weight'][0].' AND '.(float)$selectedFilters['weight'][1];
break;
}
}
//id_category_layered = current displayed category
if (!sizeof($selectedFilters['category']))
$queryFilters .= ' AND p.id_product IN (
SELECT id_product FROM '._DB_PREFIX_.'category_product cp
WHERE cp.`id_category` = '.(int)$id_parent.')';
$sql = '
SELECT p.id_product, p.out_of_stock, p.available_for_order, p.quantity, p.id_category_default, p.customizable, p.show_price, p.`weight`,
p.ean13, pl.available_later, pl.description_short, pl.link_rewrite, pl.name, i.id_image, il.legend, m.name manufacturer_name, p.condition, p.id_manufacturer,
DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product)
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).')
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE pl.id_lang = '.(int)$cookie->id_lang.$queryFilters;
$this->products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
return $this->products;
}
public function generateFiltersBlock($selectedFilters = array())
{
global $smarty, $link, $cookie;
@@ -215,29 +336,57 @@ class BlockLayered extends Module
$category = new Category((int)$id_parent);
$subCategories = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT c.id_category, c.id_parent
SELECT c.id_category, c.id_parent, cl.name
FROM '._DB_PREFIX_.'category c
WHERE c.nleft > '.(int)$category->nleft.' and c.nright <= '.(int)$category->nright.' AND c.active = 1
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category)
WHERE c.nleft > '.(int)$category->nleft.' and c.nright <= '.(int)$category->nright.' AND c.active = 1 AND c.id_parent = '.(int)$category->id.' AND cl.id_lang = '.(int)$cookie->id_lang.'
ORDER BY c.position ASC');
$oneRow = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'layered_cache');
if (!$oneRow)
return;
$whereC = ' AND (c'.(int)$id_parent.' = 1 OR ';
$queryProduct = ', c'.(int)$id_parent;
$whereC = ' cp.`id_category` = '.(int)$id_parent.' OR ';
foreach ($subCategories AS $subcategory)
if (isset($oneRow['c'.(int)$subcategory['id_category']]))
{
$whereC .= ' c'.(int)$subcategory['id_category'].' = 1 OR ';
$queryProduct .= ', c'.(int)$subcategory['id_category'];
$selectedFilters['category'][] = (int)$subcategory['id_category'];
}
$whereC .= ' cp.`id_category` = '.(int)$subcategory['id_category'].' OR ';
$whereC = rtrim($whereC, 'OR ').')';
$productsSQL = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT p.`id_product`, p.`condition`, p.`id_manufacturer`, p.`quantity`, p.`weight`,
(SELECT GROUP_CONCAT(`id_category`) FROM `'._DB_PREFIX_.'category_product` cp WHERE cp.`id_product` = p.`id_product`) as ids_cat,
(SELECT GROUP_CONCAT(`id_feature_value`) FROM `'._DB_PREFIX_.'feature_product` fp WHERE fp.`id_product` = p.`id_product`) as ids_feat,
(SELECT GROUP_CONCAT(DISTINCT(pac.`id_attribute`))
FROM `'._DB_PREFIX_.'product_attribute_combination` pac
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.`id_product_attribute` = pac.`id_product_attribute`)
WHERE pa.`id_product` = p.`id_product` ) as ids_attr
FROM '._DB_PREFIX_.'product p
WHERE p.`active` = 1 AND p.`id_product` IN ( SELECT id_product FROM `'._DB_PREFIX_.'category_product` cp WHERE'.$whereC, false);
$products = array();
$db = Db::getInstance();
$weight = array();
while ($product = $db->nextRow($productsSQL))
{
$row = array();
foreach ($product AS $key => $value)
{
if($key == 'ids_feat')
$row['f'] = explode(',', $value);
if($key == 'ids_attr')
$row['a'] = explode(',', $value);
if($key == 'ids_cat')
$row['c'] = explode(',', $value);
if($key == 'weight')
$weight[] = $value;
}
$row['id_manufacturer'] = (int)$product['id_manufacturer'];
$row['quantity'] = (bool)$product['quantity'];
$row['condition'] = $product['condition'];
$row['weight'] = $product['weight'];
$products[(int)$product['id_product']] = $row;
}
/* Get the filters for the current category */
$filters = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('SELECT * FROM '._DB_PREFIX_.'layered_category WHERE id_category = '.(int)$id_parent);
$filterBlocks = $f = $a = array();
foreach ($filters AS $filter)
{
$filterBlocks[(int)$filter['position']]['type_lite'] = $filter['type'];
@@ -253,11 +402,7 @@ class BlockLayered extends Module
FROM '._DB_PREFIX_.'feature_value fv
LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = fv.id_feature_value)
WHERE (fv.custom IS NULL OR fv.custom = 0) AND fv.id_feature = '.(int)$filterBlocks[(int)$filter['position']]['id_key'].' AND fvl.id_lang = '.(int)$cookie->id_lang);
foreach ($filterBlocks[(int)$filter['position']]['SQLvalues'] AS $key => $value)
if (isset($oneRow['f'.(int)$value['id_feature_value']]))
$queryProduct .= ', f'.(int)$value['id_feature_value'];
break;
case 'id_attribute_group':
@@ -267,36 +412,11 @@ class BlockLayered extends Module
SELECT al.id_attribute, al.name, a.color
FROM '._DB_PREFIX_.'attribute a
LEFT JOIN '._DB_PREFIX_.'attribute_lang al ON (al.id_attribute = a.id_attribute)
WHERE a.id_attribute_group = '.(int)$filterBlocks[(int)$filter['position']]['id_key'].' AND al.id_lang = '.(int)$cookie->id_lang);
foreach ($filterBlocks[(int)$filter['position']]['SQLvalues'] AS $value)
if (isset($oneRow['a'.(int)$value['id_attribute']]))
$queryProduct .= ', a'.(int)$value['id_attribute'];
WHERE a.id_attribute_group = '.(int)$filterBlocks[(int)$filter['position']]['id_key'].' AND al.id_lang = '.(int)$cookie->id_lang);
break;
}
}
$productsSQL = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT lc.id_product, p.condition, p.id_manufacturer, p.quantity'.$queryProduct.'
FROM '._DB_PREFIX_.'layered_cache lc
INNER JOIN '._DB_PREFIX_.'product p ON (p.id_product = lc.id_product)
WHERE 1 '.$whereC, false);
$products = array();
$db = Db::getInstance();
while ($product = $db->nextRow($productsSQL))
{
$row = array();
foreach ($product AS $key => $value)
if ($value == 1)
$row[$key] = true;
$row['id_manufacturer'] = (int)$product['id_manufacturer'];
$row['quantity'] = (bool)$product['quantity'];
$row['condition'] = $product['condition'];
$products[(int)$product['id_product']] = $row;
}
/* Get the feature block names & values */
if (sizeof($f))
{
@@ -304,13 +424,12 @@ class BlockLayered extends Module
SELECT id_feature, name
FROM '._DB_PREFIX_.'feature_lang
WHERE id_lang = '.(int)$cookie->id_lang.' AND id_feature IN ('.implode(',', $f).')');
$fNameByID = array();
foreach ($fNames AS $fName)
$fNameByID[(int)$fName['id_feature']] = $fName['name'];
}
/* Get the feature block names & values */
/* Get the attribute block names & values */
if (sizeof($a))
{
$aNames = Db::getInstance()->ExecuteS('
@@ -327,40 +446,36 @@ class BlockLayered extends Module
$colorGroups[(int)$aName['id_attribute_group']] = true;
}
}
foreach ($filterBlocks AS &$filterBlock)
{
if ($filterBlock['type_lite'] == 'category')
{
$filterBlock['name'] = $this->l('Categories');
$c = array();
foreach ($subCategories AS $subCat)
{
$c[] = (int)$subCat['id_category'];
$filterBlock['values'][(int)$subCat['id_category']]['name'] = $subCat['name'];
//init the number of product in this category
if (!isset($filterBlock['values'][(int)$subCat['id_category']]['nbr']))
$filterBlock['values'][(int)$subCat['id_category']]['nbr'] = 0;
//check if the category is selected and set to true
if (isset($selectedFilters['category']) AND in_array($subCat['id_category'], $selectedFilters['category']))
$filterBlock['values'][(int)$subCat['id_category']]['checked'] = true;
}
$productCat = $this->filterProducts($products, $selectedFilters, 'category');
$filterCategories = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT c.id_category, c.id_parent, cl.name,
(SELECT GROUP_CONCAT(c2.id_category) FROM '._DB_PREFIX_.'category c2 WHERE c2.active = 1 AND c2.nleft > c.nleft and c2.nright < c.nright) subcategories
FROM '._DB_PREFIX_.'category c
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = c.id_category)
WHERE c.active = 1 AND c.id_parent = '.(int)$category->id.' AND cl.id_lang = '.(int)$cookie->id_lang.'
ORDER BY c.position ASC');
foreach ($filterCategories AS $filterCategory)
{
$filterBlock['values'][(int)$filterCategory['id_category']]['name'] = method_exists('Category', 'hideCategoryPosition') ? Category::hideCategoryPosition($filterCategory['name']) : $filterCategory['name'];
if (!isset($filterBlock['values'][(int)$filterCategory['id_category']]['n']))
$filterBlock['values'][(int)$filterCategory['id_category']]['n'] = 0;
if (isset($selectedFilters['category']) AND in_array($filterCategory['id_category'], $selectedFilters['category']))
$filterBlock['values'][(int)$filterCategory['id_category']]['checked'] = true;
//count nbr product in category
foreach ($c AS $idSubCategory)
foreach ($productCat AS $product)
{
$tmpTab = explode(',', $filterCategory['subcategories']);
$tmpTab[] = (int)$filterCategory['id_category'];
foreach ($tmpTab AS $idSubCategory)
if (isset($product['c'.(int)$idSubCategory]))
$filterBlock['values'][(int)$filterCategory['id_category']]['n']++;
}
}
if(in_array($idSubCategory, $product['c']))
$filterBlock['values'][(int)$idSubCategory]['nbr']++;
}
elseif ($filterBlock['type_lite'] == 'id_feature')
{
@@ -368,23 +483,24 @@ class BlockLayered extends Module
$filterBlock['values'] = array();
$productFeat = $this->filterProducts($products, $selectedFilters, 'id_feature_'.(int)$filterBlock['id_key']);
foreach ($filterBlock['SQLvalues'] AS $value)
{
{
foreach ($productFeat AS $product)
if (isset($product['f'.$value['id_feature_value']]))
{
if (in_array($value['id_feature_value'], $product['f']))
{
$filterBlock['values'][(int)$value['id_feature_value']]['name'] = $value['value'];
if (!isset($filterBlock['values'][(int)$value['id_feature_value']]['n']))
$filterBlock['values'][(int)$value['id_feature_value']]['n'] = 0;
$filterBlock['values'][(int)$value['id_feature_value']]['n']++;
if (!isset($filterBlock['values'][(int)$value['id_feature_value']]['nbr']))
$filterBlock['values'][(int)$value['id_feature_value']]['nbr'] = 0;
$filterBlock['values'][(int)$value['id_feature_value']]['nbr']++;
}
foreach ($products AS $product)
if (isset($product['f'.$value['id_feature_value']]) AND !isset($filterBlock['values'][(int)$value['id_feature_value']]))
if (in_array($value['id_feature_value'], $product['f']) AND !isset($filterBlock['values'][(int)$value['id_feature_value']]))
{
$filterBlock['values'][(int)$value['id_feature_value']]['name'] = $value['value'];
$filterBlock['values'][(int)$value['id_feature_value']]['n'] = 0;
$filterBlock['values'][(int)$value['id_feature_value']]['nbr'] = 0;
}
}
if (isset($selectedFilters['id_feature_'.(int)$filterBlock['id_key']]) AND in_array((int)$value['id_feature_value'].'_'.(int)$filterBlock['id_key'], $selectedFilters['id_feature_'.(int)$filterBlock['id_key']]))
$filterBlock['values'][(int)$value['id_feature_value']]['checked'] = true;
}
@@ -398,24 +514,25 @@ class BlockLayered extends Module
$filterBlock['values'] = array();
$productsAttr = $this->filterProducts($products, $selectedFilters, 'id_attribute_group_'.(int)$filterBlock['id_key']);
foreach ($filterBlock['SQLvalues'] AS $value)
{
foreach ($productsAttr AS $product)
if (isset($product['a'.$value['id_attribute']]))
{
if(in_array($value['id_attribute'], $product['a']))
{
$filterBlock['values'][(int)$value['id_attribute']]['name'] = $value['name'];
$filterBlock['values'][(int)$value['id_attribute']]['color'] = $value['color'];
if (!isset($filterBlock['values'][(int)$value['id_attribute']]['n']))
$filterBlock['values'][(int)$value['id_attribute']]['n'] = 0;
$filterBlock['values'][(int)$value['id_attribute']]['n']++;
if (!isset($filterBlock['values'][(int)$value['id_attribute']]['nbr']))
$filterBlock['values'][(int)$value['id_attribute']]['nbr'] = 0;
$filterBlock['values'][(int)$value['id_attribute']]['nbr']++;
}
foreach ($products AS $product)
if (isset($product['a'.$value['id_attribute']]) AND !isset($filterBlock['values'][(int)$value['id_attribute']]))
{
$filterBlock['values'][(int)$value['id_attribute']]['name'] = $value['name'];
$filterBlock['values'][(int)$value['id_attribute']]['n'] = 0;
$filterBlock['values'][(int)$value['id_attribute']]['nbr'] = 0;
}
}
if (isset($selectedFilters['id_attribute_group_'.(int)$filterBlock['id_key']]) AND in_array((int)$value['id_attribute'].'_'.(int)$filterBlock['id_key'], $selectedFilters['id_attribute_group_'.(int)$filterBlock['id_key']]))
$filterBlock['values'][(int)$value['id_attribute']]['checked'] = true;
}
@@ -425,16 +542,17 @@ class BlockLayered extends Module
{
$filterBlock['name'] = $this->l('Condition');
$filterBlock['values'] = array(
'new' => array('name' => $this->l('New'), 'n' => 0),
'used' => array('name' => $this->l('Used'), 'n' => 0),
'refurbished' => array('name' => $this->l('Refurbished'), 'n' => 0));
'new' => array('name' => $this->l('New'), 'nbr' => 0),
'used' => array('name' => $this->l('Used'), 'nbr' => 0),
'refurbished' => array('name' => $this->l('Refurbished'), 'nbr' => 0));
$productCond = $this->filterProducts($products, $selectedFilters, 'condition');
foreach ($filterBlock['values'] AS $conditionKey => &$condition)
{
foreach ($productCond AS $product)
if ($product['condition'] == $conditionKey)
$condition['n']++;
$condition['nbr']++;
if (isset($selectedFilters['condition']) AND in_array($conditionKey, $selectedFilters['condition']))
$condition['checked'] = true;
}
@@ -443,14 +561,16 @@ class BlockLayered extends Module
{
$filterBlock['name'] = $this->l('Availability');
$filterBlock['values'] = array(
'1' => array('name' => $this->l('In stock'), 'n' => 0),
'0' => array('name' => $this->l('Not available'), 'n' => 0));
'1' => array('name' => $this->l('In stock'), 'nbr' => 0),
'0' => array('name' => $this->l('Not available'), 'nbr' => 0));
$productQuant = $this->filterProducts($products, $selectedFilters, 'quantity');
foreach ($filterBlock['values'] AS $quantKey => &$quantity)
{
foreach ($productQuant AS $product)
if ($product['quantity'] == $quantKey)
$quantity['n']++;
$quantity['nbr']++;
if (isset($selectedFilters['quantity']) AND in_array($quantKey, $selectedFilters['quantity']))
$quantity['checked'] = true;
}
@@ -458,40 +578,58 @@ class BlockLayered extends Module
elseif ($filterBlock['type_lite'] == 'manufacturer')
{
$filterBlock['name'] = $this->l('Manufacturer');
$productsManuf = $this->filterProducts($products, $selectedFilters, 'manufacturer');
$man = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT DISTINCT(p.id_manufacturer), m.name
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE p.id_product IN ('.implode(',', array_keys($products)).') AND p.id_manufacturer != 0');
$productsManuf = $this->filterProducts($products, $selectedFilters, 'manufacturer');
foreach ($man AS $manufacturer)
{
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['name'] = $manufacturer['name'];
if (!isset($filterBlock['values'][(int)$manufacturer['id_manufacturer']]['n']))
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['n'] = 0;
if (!isset($filterBlock['values'][(int)$manufacturer['id_manufacturer']]['nbr']))
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['nbr'] = 0;
foreach ($productsManuf AS $product)
if ($product['id_manufacturer'] == $manufacturer['id_manufacturer'])
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['n']++;
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['nbr']++;
if (isset($selectedFilters['manufacturer']) AND in_array($manufacturer['id_manufacturer'], $selectedFilters['manufacturer']))
$filterBlock['values'][(int)$manufacturer['id_manufacturer']]['checked'] = true;
}
}
elseif ($filterBlock['type_lite'] == 'weight')
{
if (max($weight) != min($weight))
{
$filterBlock['name'] = $this->l('Weight');
$filterBlock['slider'] = true;
$filterBlock['max'] = max($weight);
$filterBlock['min'] = min($weight);
if (isset($selectedFilters['weight']))
$filterBlock['values'] = array($selectedFilters['weight'][0], $selectedFilters['weight'][1]);
else
$filterBlock['values'] = array(min($weight), max($weight));
$filterBlock['unit'] = Configuration::get('PS_WEIGHT_UNIT');
}
else
unset($selectedFilters['weight']);
}
}
$nFilters = 0;
foreach ($selectedFilters AS $filters)
$nFilters += sizeof($filters);
$smarty->assign(array(
'layered_use_checkboxes' => (int)Configuration::get('PS_LAYERED_NAVIGATION_CHECKBOXES'),
'id_category_layered' => (int)$id_parent,
'selected_filters' => $selectedFilters,
'n_filters' => (int)$nFilters,
'nbr_filterBlocks' => sizeof($filterBlocks),
'filters' => $filterBlocks));
return $smarty->fetch(_PS_MODULE_DIR_.$this->name.'/blocklayered.tpl');
}
@@ -499,118 +637,20 @@ class BlockLayered extends Module
{
global $smarty, $cookie;
/* Analyze all the filters selected by the user and store them into a tab */
$filters = array('category' => array(), 'manufacturer' => array(), 'quantity' => array(), 'condition' => array());
foreach ($_GET AS $key => $value)
if (substr($key, 0, 8) == 'layered_')
{
preg_match('/^(.*)_[0-9|new|used|refurbished]+$/', substr($key, 8, strlen($key) - 8), $res);
if (isset($res[1]))
{
$tmpTab = explode('_', $value);
$value = $tmpTab[0];
$id_key = false;
if (isset($tmpTab[1]))
$id_key = $tmpTab[1];
if ($res[1] == 'condition' AND in_array($value, array('new', 'used', 'refurbished')))
$filters['condition'][] = $value;
elseif ($res[1] == 'quantity' AND (!$value OR $value == 1))
$filters['quantity'][] = $value;
elseif (in_array($res[1], array('id_attribute_group', 'category', 'id_feature', 'manufacturer')))
{
if (!isset($filters[$res[1].($id_key ? '_'.$id_key : '')]))
$filters[$res[1].($id_key ? '_'.$id_key : '')] = array();
$filters[$res[1].($id_key ? '_'.$id_key : '')][] = (int)$value;
}
}
}
$selectedFilters = $this->getSelectedFilters();
$products = $this->getProductByFilters($selectedFilters);
$queryFilters = '';
foreach ($filters AS $key => $filterValues)
{
if (!sizeof($filterValues))
continue;
preg_match('/^(.*[^_0-9])/', $key, $res);
$key = $res[1];
switch ($key)
{
case 'id_feature':
$queryFilters .= ' AND (';
foreach ($filterValues AS $filterValue)
$queryFilters .= 'lc.f'.(int)$filterValue.' = 1 OR ';
$queryFilters = rtrim($queryFilters, 'OR ').')';
break;
case 'id_attribute_group':
$queryFilters .= ' AND (';
foreach ($filterValues AS $filterValue)
$queryFilters .= 'lc.a'.(int)$filterValue.' = 1 OR ';
$queryFilters = rtrim($queryFilters, 'OR ').')';
break;
case 'category':
$queryFilters .= ' AND (lc.c'.(int)Tools::getValue('id_category_layered').' = 1 OR ';
foreach ($filters['category'] AS $id_category)
{
$category = new Category((int)$id_category);
if (Validate::isLoadedObject($category))
{
$subCategories = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT c.id_category, c.id_parent
FROM '._DB_PREFIX_.'category c
WHERE c.nleft >= '.(int)$category->nleft.' and c.nright <= '.(int)$category->nright.' AND c.active = 1
ORDER BY c.position ASC');
foreach ($subCategories AS $subCategory)
$queryFilters .= 'lc.c'.(int)$subCategory['id_category'].' = 1 OR ';
}
}
$queryFilters = rtrim($queryFilters, 'OR ').')';
break;
case 'quantity':
if (sizeof($filters['quantity']) == 2)
break;
$queryFilters .= ' AND p.quantity '.(!$filters['quantity'][0] ? '=' : '>').' 0';
break;
case 'manufacturer':
$queryFilters .= ' AND p.id_manufacturer IN ('.implode($filters['manufacturer'], ',').')';
break;
case 'condition':
if (sizeof($filters['condition']) == 3)
break;
$queryFilters .= ' AND p.condition IN (';
foreach ($filters['condition'] AS $cond)
$queryFilters .= '\''.$cond.'\',';
$queryFilters = rtrim($queryFilters, ',').')';
break;
}
}
if (!sizeof($filters['category']))
$queryFilters .= ' AND (lc.c'.(int)Tools::getValue('id_category_layered').' = 1)';
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT p.id_product, p.out_of_stock, p.available_for_order, p.quantity, p.id_category_default, p.customizable, p.show_price,
p.ean13, pl.available_later, pl.description_short, pl.link_rewrite, pl.name, i.id_image, il.legend, m.name manufacturer_name,
DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new
FROM '._DB_PREFIX_.'layered_cache lc
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = lc.id_product)
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.id_product = p.id_product)
LEFT JOIN '._DB_PREFIX_.'image i ON (i.id_product = p.id_product AND i.cover = 1)
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = '.(int)($cookie->id_lang).')
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE pl.id_lang = '.(int)$cookie->id_lang.$queryFilters);
$products = Product::getProductsProperties((int)$cookie->id_lang, $products);
$smarty->assign('products', $products);
/* We are sending an array in jSon to the .js controller, it will update both the filters and the products zones */
return '<div id="layered_ajax_column">'.$this->generateFilters($filters).'</div><div id="layered_ajax_products">'.$smarty->fetch(_PS_THEME_DIR_.'product-list.tpl').'</div>';
return Tools::jsonEncode(array(
'filtersBlock' => $this->generateFiltersBlock($selectedFilters),
'productList' => $smarty->fetch(_PS_THEME_DIR_.'product-list.tpl')
));
// return '<div id="layered_ajax_column">'.$this->generateFiltersBlock($selectedFilters).'</div><div id="layered_ajax_products">'.$smarty->fetch(_PS_THEME_DIR_.'product-list.tpl').'</div>';
}
public function rebuildLayeredStructure()
@@ -618,59 +658,6 @@ class BlockLayered extends Module
@set_time_limit(0);
@ini_set('memory_limit', '64M');
/* Delete and re-create the products cache table */
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_cache');
$createTable = 'CREATE TABLE `'._DB_PREFIX_.'layered_cache` (`id_product` INT UNSIGNED NOT NULL,';
$confValue = 'id_product,';
/* Add the missing feature values columns */
$featureValues = Db::getInstance()->ExecuteS('
SELECT fv.id_feature_value
FROM '._DB_PREFIX_.'feature_product fp
LEFT JOIN '._DB_PREFIX_.'feature_value fv ON (fv.id_feature_value = fp.id_feature_value)
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = fp.id_product)
WHERE (fv.custom IS NULL OR fv.custom = 0) AND p.active = 1
GROUP BY fv.id_feature_value');
/* Add the missing attribute values columns */
$attributeValues = Db::getInstance()->ExecuteS('
SELECT pac.id_attribute
FROM '._DB_PREFIX_.'product_attribute_combination pac
LEFT JOIN '._DB_PREFIX_.'product_attribute pa ON (pa.id_product_attribute = pac.id_product_attribute)
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = pa.id_product)
WHERE p.active = 1
GROUP BY pac.id_attribute');
/* Add the missing categories columns */
$categories = Db::getInstance()->ExecuteS('
SELECT cp.id_category
FROM '._DB_PREFIX_.'category_product cp
LEFT JOIN '._DB_PREFIX_.'category c ON (c.id_category = cp.id_category)
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = cp.id_product)
WHERE p.active = 1 AND c.active = 1
GROUP BY cp.id_category');
foreach ($featureValues AS $featureValue)
{
$createTable .= '`f'.(int)$featureValue['id_feature_value'].'` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\',';
$confValue .= 'f'.(int)$featureValue['id_feature_value'].',';
}
foreach ($attributeValues AS $attributeValue)
{
$createTable .= '`a'.(int)$attributeValue['id_attribute'].'` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\',';
$confValue .= 'a'.(int)$attributeValue['id_attribute'].',';
}
foreach ($categories AS $category)
{
$createTable .= '`c'.(int)$category['id_category'].'` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\',';
$confValue .= 'c'.(int)$category['id_category'].',';
}
Configuration::updateValue('PS_LAYERED_COLUMNS', rtrim($confValue, ','));
Db::getInstance()->Execute($createTable.' PRIMARY KEY (`id_product`)) ENGINE=MyISAM CHARSET=latin1');
/* Delete and re-create the layered categories table */
Db::getInstance()->Execute('DROP TABLE IF EXISTS '._DB_PREFIX_.'layered_category');
Db::getInstance()->Execute('
@@ -678,7 +665,7 @@ class BlockLayered extends Module
`id_layered_category` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id_category` INT(10) UNSIGNED NOT NULL,
`id_value` INT(10) UNSIGNED NOT NULL DEFAULT \'0\',
`type` ENUM(\'category\',\'id_feature\',\'id_attribute_group\',\'quantity\',\'condition\',\'manufacturer\') NOT NULL,
`type` ENUM(\'category\',\'id_feature\',\'id_attribute_group\',\'quantity\',\'condition\',\'manufacturer\',\'weight\') NOT NULL,
`position` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id_layered_category`),
KEY `id_category` (`id_category`,`type`)
@@ -732,15 +719,6 @@ class BlockLayered extends Module
WHERE c.active = 1'.(sizeof($categoriesIds) ? ' AND cp.id_category IN ('.implode(',', $categoriesIds).')' : '').' AND p.active = 1'.(sizeof($productsIds) ? ' AND p.id_product IN ('.implode(',', $productsIds).')' : '').' AND (fv.custom IS NULL OR fv.custom = 0)
GROUP BY p.id_product', false);
/* Get all the columns to fill */
$columns = explode(',', Configuration::get('PS_LAYERED_COLUMNS'));
/* We do not need to build the query for products when we are just updating the layered_category table */
if (!sizeof($categoriesIds))
{
$query = 'INSERT INTO `'._DB_PREFIX_.'layered_cache` VALUES ';
$values = '';
}
while ($product = $db->nextRow($result))
{
$a = $c = $f = array();
@@ -751,27 +729,6 @@ class BlockLayered extends Module
if (!empty($product['features']))
$f = array_flip(explode(',', $product['features']));
/* We do not need to build the query for products when we are just updating the layered_category table */
if (!sizeof($categoriesIds))
{
$values .= '(';
$n = 0;
foreach ($columns AS $column)
{
if (!$n)
$values .= (int)$product['id_product'].',';
else
{
if (isset(${$column{0}}[ltrim($column, $column{0})]))
$values .= '1,';
else
$values .= '0,';
}
$n++;
}
$values = rtrim($values, ',').'),';
}
$queryCategory = 'INSERT INTO '._DB_PREFIX_.'layered_category (id_category, id_value, type, position) VALUES ';
$toInsert = false;
foreach ($c AS $id_category => $category)
@@ -816,20 +773,32 @@ class BlockLayered extends Module
$queryCategory .= '('.(int)$id_category.',NULL,\'condition\','.(int)$nCategories[(int)$id_category]++.'),';
$toInsert = true;
}
if (!isset($doneCategories[(int)$id_category]['w']))
{
$doneCategories[(int)$id_category]['w'] = true;
$queryCategory .= '('.(int)$id_category.',NULL,\'weight\','.(int)$nCategories[(int)$id_category]++.'),';
$toInsert = true;
}
/*
if (!isset($doneCategories[(int)$id_category]['p']))
{
$doneCategories[(int)$id_category]['p'] = true;
$queryCategory .= '('.(int)$id_category.',NULL,\'price\','.(int)$nCategories[(int)$id_category]++.'),';
$toInsert = true;
}
*/
}
if ($toInsert)
Db::getInstance()->Execute(rtrim($queryCategory, ','));
}
/* We do not need to build the query for products when we are just updating the layered_category table */
if (!sizeof($categoriesIds))
$db->Execute($query.rtrim($values, ','));
}
function filterProducts($products, $selectedFilters, $excludeType = false)
{
$productsToKeep = array();
$filterByLetter = array('id_attribute_group' => 'a', 'id_feature' => 'f', 'category' => 'c', 'manufacturer' => 'id_manufacturer', 'quantity' => 'quantity', 'condition' => 'condition');
$filterByLetter = array('id_attribute_group' => 'a', 'id_feature' => 'f', 'category' => 'c', 'manufacturer' => 'id_manufacturer',
'quantity' => 'quantity', 'condition' => 'condition', 'weight' => 'weight', 'price' => 'price');
foreach ($selectedFilters AS $type => $filters)
{
if ($type == $excludeType OR !sizeof($filters))
@@ -841,15 +810,18 @@ class BlockLayered extends Module
switch ($type)
{
case 'category':
foreach ($products AS $k => $product)
if($filter = Tools::getValue('id_category_layered'))
$productsToKeep[] = (int)$k;
//don't break me
case 'id_attribute_group':
case 'id_feature':
case 'category':
foreach ($products AS $k => $product)
foreach ($filters AS $filter)
if (isset($product[$filterByLetter[$type].(int)$filter]))
if (in_array($filter, $product[$filterByLetter[$type]]))
$productsToKeep[] = (int)$k;
break;
case 'manufacturer':
case 'condition':
case 'quantity':
@@ -858,6 +830,14 @@ class BlockLayered extends Module
if ($product[$filterByLetter[$type]] == $filter)
$productsToKeep[] = (int)$k;
break;
case 'weight':
case 'price':
$min = $filters[0];
$max = $filters[1];
foreach ($products AS $k => $product)
if((float)$min <= (float)$product[$filterByLetter[$type]] AND (float)$product[$filterByLetter[$type]] <= (float)$max)
$productsToKeep[] = (int)$k;
break;
}
foreach ($products AS $k => $product)
+81 -22
View File
@@ -25,6 +25,7 @@
*}
<!-- Block layered navigation module -->
{if $nbr_filterBlocks != 0}
<div id="layered_block_left" class="block">
<h4>{l s='Catalog' mod='blocklayered'}</h4>
<div class="block_content">
@@ -35,17 +36,28 @@
<span class="layered_subtitle" style="float: none;">{l s='Enabled filters:' mod='blocklayered'}</span>
<ul>
{foreach from=$selected_filters key=filter_type item=filter_values}
{foreach from=$filter_values item=filter_value}
{foreach from=$filters item=filter}
{if $filter.type == $filter_type && isset($filter.values)}
{foreach from=$filter.values key=id_value item=value}
{if $id_value == $filter_value}
<li><a href="#" rel="layered_{$filter.type_lite}_{$id_value}" title="{l s='Cancel' mod='blocklayered'}">x</a> {$filter.name|escape:html:'UTF-8'}{l s=':'} {$value.name|escape:html:'UTF-8'}</li>
{/if}
{/foreach}
{/if}
{/foreach}
{/foreach}
{foreach from=$filter_values item=filter_value name=f_values}
{foreach from=$filters item=filter}
{if $filter.type == $filter_type && isset($filter.values)}
{if isset($filter.slider) && $smarty.foreach.f_values.first}
<li>
- {$filter.name|escape:html:'UTF-8'}{l s=':'}
{$filter.values[0]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'} -
{$filter.values[1]|escape:html:'UTF-8'}{$filter.unit|escape:html:'UTF-8'}
</li>
{else}
{foreach from=$filter.values key=id_value item=value}
{if $id_value == $filter_value}
<li>
<a href="#" rel="layered_{$filter.type_lite}_{$id_value}" title="{l s='Cancel' mod='blocklayered'}">x</a>
{$filter.name|escape:html:'UTF-8'}{l s=':'} {$value.name|escape:html:'UTF-8'}
</li>
{/if}
{/foreach}
{/if}
{/if}
{/foreach}
{/foreach}
{/foreach}
</ul>
</div>
@@ -57,17 +69,63 @@
<span class="layered_close"><a href="#" rel="layered_{$filter.type}_{$filter.id_key}">v</a></span>
<div class="clear"></div>
<ul id="layered_{$filter.type}_{$filter.id_key}">
{foreach from=$filter.values key=id_value item=value}
<li{if $layered_use_checkboxes} class="nomargin"{/if}>
{if isset($filter.is_color_group) && $filter.is_color_group}
<input type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_attribute_{$id_value}" {if !$value.n} value="X" disabled="disabled"{/if} style="background: {if isset($value.color)}{$value.color}{else}#CCC{/if}; margin-left: 0; width: 16px; height: 16px; padding:0; border: 1px solid {if isset($value.checked) && $value.checked}red{else}#666{/if};" />
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
{else}
{if $layered_use_checkboxes}<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.n} disabled="disabled"{/if} /> {/if}
{/if}
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.n} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" rel="{$id_value}_{$filter.id_key}"{/if}{/if}>{$value.name|escape:html:'UTF-8'}<span> ({$value.n})</span></label>
</li>
{/foreach}
{if !isset($filter.slider)}
{foreach from=$filter.values key=id_value item=value}
<li{if $layered_use_checkboxes} class="nomargin"{/if}>
{if isset($filter.is_color_group) && $filter.is_color_group}
<input type="button" name="layered_{$filter.type_lite}_{$id_value}" rel="{$id_value}_{$filter.id_key}" id="layered_attribute_{$id_value}" {if !$value.nbr} value="X" disabled="disabled"{/if} style="background: {if isset($value.color)}{$value.color}{else}#CCC{/if}; margin-left: 0; width: 16px; height: 16px; padding:0; border: 1px solid {if isset($value.checked) && $value.checked}red{else}#666{/if};" />
{if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if}
{else}
{if $layered_use_checkboxes}
<input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} />
{/if}
{/if}
<label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" rel="{$id_value}_{$filter.id_key}"{/if}{/if}>{$value.name|escape:html:'UTF-8'}<span> ({$value.nbr})</span></label>
</li>
{/foreach}
{else}
<label for="{$filter.type}">{l s='Range'} : </label><span id="layered_{$filter.type}_range"></span>
<div style="margin-top:5px;" class="layered_slider" id="layered_{$filter.type}_slider"></div>
<script type="text/javascript">
unit = '{$filter.unit}';
{literal}
$(document).ready(function()
{
$('#layered_{/literal}{$filter.type}{literal}_slider').slider({
range: true,
min: {/literal}{$filter.min}{literal},
max: {/literal}{$filter.max}{literal},
values: [ {/literal}{$filter.values[0]}{literal}, {/literal}{$filter.values[1]}{literal}],
slide: function( event, ui ) {
$('#layered_{/literal}{$filter.type}{literal}_range').html(ui.values[ 0 ] + unit + ' - ' + ui.values[ 1 ] + unit);
console.log(event);
console.log(ui);
},
stop: function () {
reloadContent();
}
});
$('#layered_{/literal}{$filter.type}{literal}_range').html($('#layered_{/literal}{$filter.type}{literal}_slider').slider('values', 0 ) +unit+
' - ' + $('#layered_{/literal}{$filter.type}{literal}_slider').slider('values', 1 )+unit );
});
{/literal}
</script>
<!--
<script type="text/javascript">
unit = '{$filter.unit}';
type = '{$filter.type}';
max = '{$filter.max}';
min = '{$filter.min}';
values = [{$filter.values[0]}, {$filter.values[1]}];
{literal}
$(document).ready(function()
{
initSlider(type, min, max, values, unit);
});
{/literal}
</script>
-->
{/if}
</ul>
</div>
{/if}
@@ -89,4 +147,5 @@
<p style="margin: 20px 0; text-align: center;"><img src="{$img_ps_dir}loader.gif" alt="" /><br />{l s='Loading...' mod='blocklayered'}</p>
</div>
</div>
{/if}
<!-- /Block layered navigation module -->
+1
View File
@@ -8,4 +8,5 @@
<tab>front_office_features</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
+3 -2
View File
@@ -2,10 +2,11 @@
<module>
<name>ekomi</name>
<displayName>eKomi</displayName>
<version>0.8</version>
<version>1.0</version>
<description>Adds a eKomi block</description>
<author></author>
<tab>advertising_marketing</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
</module>
<limited_countries></limited_countries>
</module>
+4 -5
View File
@@ -34,7 +34,7 @@ class Ekomi extends Module
{
$this->name = 'ekomi';
$this->tab = 'advertising_marketing';
$this->version = 0.8;
$this->version = 1.0;
parent::__construct();
@@ -108,9 +108,8 @@ class Ekomi extends Module
public function hookNewOrder($params)
{
global $cookie;
if (!Configuration::get('PS_EKOMI_EMAIL'))
return false;
return true;
/* Email generation */
$subject = '[Ekomi-Prestashop] '.Configuration::get('PS_SHOP_NAME');
@@ -122,8 +121,8 @@ class Ekomi extends Module
);
/* Email sending */
if (!Mail::Send((int)($cookie->id_lang), 'ekomi', $subject, $templateVars, Configuration::get('PS_EKOMI_EMAIL'), NULL, $params['customer']->email, Configuration::get('PS_SHOP_NAME'), NULL, NULL, dirname(__FILE__).'/mails/'))
return false;
if (!Mail::Send(1, 'ekomi', $subject, $templateVars, Configuration::get('PS_EKOMI_EMAIL'), NULL, $params['customer']->email, Configuration::get('PS_SHOP_NAME'), NULL, NULL, dirname(__FILE__).'/mails/'))
return true;
return true;
}
}
+4 -1
View File
@@ -8,7 +8,10 @@ $_MODULE['<{ekomi}prestashop>ekomi_f4d1ea475eaa85102e2b4e6d95da84bd'] = 'Confirm
$_MODULE['<{ekomi}prestashop>ekomi_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada';
$_MODULE['<{ekomi}prestashop>ekomi_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración';
$_MODULE['<{ekomi}prestashop>ekomi_597b9cfa17df5ac4e2a4b1f4b6de347a'] = 'configuración eKomi';
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'script eKomi';
$_MODULE['<{ekomi}prestashop>ekomi_c4fda5e26d4854b8718850c90694a54c'] = 'eKomi por e-mail';
$_MODULE['<{ekomi}prestashop>ekomi_c48c140af813696592daafbabe6d8b9f'] = 'script eKomi';
$_MODULE['<{ekomi}prestashop>ekomi_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Mostrar';
$_MODULE['<{ekomi}prestashop>ekomi_b9f5c797ebbf55adccdd8539a65a0241'] = 'Ocultar';
$_MODULE['<{ekomi}prestashop>ekomi_ccf7919cbd0248b0f86a8c39f74da5d0'] = 'Mostrar o no el bloque (los pedidos serán enviados a eKomi independientemente de que usted elija ocultar o mostrar el bloque).';
$_MODULE['<{ekomi}prestashop>ekomi_0767b05248fcba405524f792944858ef'] = 'Por favor, rellene el formulario con los datos básicos que eKomi le da.';
$_MODULE['<{ekomi}prestashop>ekomi_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
+6 -3
View File
@@ -19,12 +19,15 @@ $_MODULE['<{hipay}prestashop>hipay_527557971b02f68ead6a278fb96ac396'] = 'vérifi
$_MODULE['<{hipay}prestashop>hipay_1c5f361b20c116ab2324e28b1ac54e12'] = 'Su tienda no está en línea';
$_MODULE['<{hipay}prestashop>hipay_66170e45eb6eb71c35fc3b259a866ff7'] = 'La categoría de productos Hipay no está configurada para cada ID del sitio web';
$_MODULE['<{hipay}prestashop>hipay_1a1a01512e42b64541ed9b1f43a56036'] = 'imposible recuperar las categorías Hipay. Vea el diario de errores para más información.';
$_MODULE['<{hipay}prestashop>hipay_8f19eb452ad0295c45ca62a099f10dc6'] = 'Hipay es una cartera electrónica segura que le ofrece una paleta de herramientas y de aplicaciones para facturar difertentes tipos de contenidos y de servicios: contenidos numéricos, descargas, bienes físicos... sin necesidad de negociar con un banco y sin gastos técnicos. ';
$_MODULE['<{hipay}prestashop>hipay_e5ac60a0713182096ea3f9590f101b25'] = 'Simple y gratuita, la implementación de la solución Hipay constituye una ventaja para un sitio de venta en línea que desea impulsarse en Europa: pagos seguros con tarjetas internacionales, soluciones de pago locales, transferencias bancarias...';
$_MODULE['<{hipay}prestashop>hipay_01ad06b7c5887516f56ff824278feb67'] = 'Nota : Para reenvolsar integramente una transacción, vaya al sitio www.hipay.com, en la gestión de venta Hipay/gestión de las ventas.';
$_MODULE['<{hipay}prestashop>hipay_74e0ddca931daefcd88f3c118e8eb0f1'] = 'Hipay es un monedero electrónico seguro que tiene el aval bancario europeo. Hipay le ofrece muchas posibilidades, sin necesidad de negociar con un banco. Fácil y de uso gratuito, la solución Hipay constituye una real ventaja para los sitios de venta en línea que desean expandirse por Europa: pagos seguros con tarjetas internacionales, soluciones locales de pago, transferencias bancarias ...';
$_MODULE['<{hipay}prestashop>hipay_01ad06b7c5887516f56ff824278feb67'] = 'Nota : Para reenbolsar integramente una transacción, vaya al sitio www.hipay.com, en la gestión de venta Hipay/gestión de las ventas.';
$_MODULE['<{hipay}prestashop>hipay_254f642527b45bc260048e30704edb39'] = 'Configuración';
$_MODULE['<{hipay}prestashop>hipay_d86590564b22be4d3b242472722bf969'] = 'La configuración de Hipay es muy fácil y funciona en 3 pasos';
$_MODULE['<{hipay}prestashop>hipay_f21850b58e4866b30f7d3724cc29edb1'] = 'Acceder a su espacio de venta Hipay';
$_MODULE['<{hipay}prestashop>hipay_dc32882bf2b1893d53aeaaa862c46d5c'] = 'Crear una cuenta Hipay';
$_MODULE['<{hipay}prestashop>hipay_04c85eb0ee32a3a352e80c9bce37b038'] = 'Activar la solución Hipay en su PrestaShop, ¡es gratis!';
$_MODULE['<{hipay}prestashop>hipay_b7ce0a1dce723a074049b88fb22dbb4d'] = 'Disfrutar de precios especiales en las transacciones a través de PrestaShop ';
$_MODULE['<{hipay}prestashop>hipay_7667c2b31b9980267cb526ed2f0d235d'] = 'poniéndose en contacto con nuestro departamento de ventas';
$_MODULE['<{hipay}prestashop>hipay_08bd40c7543007ad06e4fce31618f6ec'] = 'Cuenta Hipay';
$_MODULE['<{hipay}prestashop>hipay_9596f310ab4657258496ab217d3b5d85'] = 'real / producción';
$_MODULE['<{hipay}prestashop>hipay_aeda5c9c68fbc42071d76a8d2b3d73e8'] = 'test';
+4
View File
@@ -22,8 +22,12 @@ $_MODULE['<{hipay}prestashop>hipay_1a1a01512e42b64541ed9b1f43a56036'] = 'Impossi
$_MODULE['<{hipay}prestashop>hipay_74e0ddca931daefcd88f3c118e8eb0f1'] = 'Hipay est un portefeuille électronique sécurisé et possédant l\'agrément bancaire européen. Hipay vous offre de nombreuses possibilités sans avoir besoin de négocier avec une banque. Facile et gratuite, limplémentation de la solution Hipay constitue un véritable atout pour un site e-commerce qui souhaite se développer en Europe : paiements sécurisés par cartes internationales, solutions de paiement locales, virements bancaires...';
$_MODULE['<{hipay}prestashop>hipay_01ad06b7c5887516f56ff824278feb67'] = 'Note : Pour rembourser intégralement une transaction, veuillez vous rendre sur le site www.hipay.com, dans la gestion marchande Hipay/gestion des ventes.';
$_MODULE['<{hipay}prestashop>hipay_254f642527b45bc260048e30704edb39'] = 'Configuration';
$_MODULE['<{hipay}prestashop>hipay_d86590564b22be4d3b242472722bf969'] = 'La configuration de Hipay est vraiment facile et fonctionne en 3 étapes';
$_MODULE['<{hipay}prestashop>hipay_f21850b58e4866b30f7d3724cc29edb1'] = 'Accédez à votre espace marchand Hipay';
$_MODULE['<{hipay}prestashop>hipay_dc32882bf2b1893d53aeaaa862c46d5c'] = 'Créez un compte Hipay';
$_MODULE['<{hipay}prestashop>hipay_04c85eb0ee32a3a352e80c9bce37b038'] = 'Activer la solution Hipay dans votre PrestaShop, c\'est gratuit !';
$_MODULE['<{hipay}prestashop>hipay_b7ce0a1dce723a074049b88fb22dbb4d'] = 'Profitez de tarifs préférentiels sur les transactions via Prestashop en';
$_MODULE['<{hipay}prestashop>hipay_7667c2b31b9980267cb526ed2f0d235d'] = 'contactant notre département des ventes';
$_MODULE['<{hipay}prestashop>hipay_08bd40c7543007ad06e4fce31618f6ec'] = 'Compte Hipay';
$_MODULE['<{hipay}prestashop>hipay_9596f310ab4657258496ab217d3b5d85'] = 'réel / production';
$_MODULE['<{hipay}prestashop>hipay_aeda5c9c68fbc42071d76a8d2b3d73e8'] = 'test';
+1
View File
@@ -48,6 +48,7 @@ $_MODULE['<{loyalty}prestashop>loyalty_928666bdf20510dfa5c58393b77f1798'] = 'Val
$_MODULE['<{loyalty}prestashop>loyalty_a9be824aae4f2381a27b7c699b1e041e'] = 'En espera de validación';
$_MODULE['<{loyalty}prestashop>loyalty_78945de8de090e90045d299651a68a9b'] = 'Disponibles';
$_MODULE['<{loyalty}prestashop>loyalty_4cb08bf5ad3d3c7b010dde725a078b28'] = 'Convertidos';
$_MODULE['<{loyalty}prestashop>loyalty_df05c2db84dacb19b599b489bf3963db'] = 'No disponible en los descuentos';
$_MODULE['<{loyalty}prestashop>loyalty_01371a1d58e9234c0b9dbc08cf54fa8b'] = 'No válidos en descuentos';
$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mi cuenta:';
$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'Mis puntos recompensa';
+1
View File
@@ -48,6 +48,7 @@ $_MODULE['<{loyalty}prestashop>loyalty_928666bdf20510dfa5c58393b77f1798'] = 'Val
$_MODULE['<{loyalty}prestashop>loyalty_a9be824aae4f2381a27b7c699b1e041e'] = 'En attente de validation';
$_MODULE['<{loyalty}prestashop>loyalty_78945de8de090e90045d299651a68a9b'] = 'Disponibles';
$_MODULE['<{loyalty}prestashop>loyalty_4cb08bf5ad3d3c7b010dde725a078b28'] = 'Déjà convertis';
$_MODULE['<{loyalty}prestashop>loyalty_df05c2db84dacb19b599b489bf3963db'] = 'Non disponible sur les remises';
$_MODULE['<{loyalty}prestashop>loyalty_01371a1d58e9234c0b9dbc08cf54fa8b'] = 'Non valables sur les promotions';
$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mon compte';
$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'Mes points de fidélité';
+2
View File
@@ -48,6 +48,7 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_90b95ae88150c6a34c4129dc4f1ebbd
$_MODULE['<{mondialrelay}prestashop>mondialrelay_c15b40b8c535191f6f0b6f9beaced3cf'] = 'Seguro complementario N4';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_b67a442fff3ca0a03ea253b0668f946d'] = 'Seguro complementario N5';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_33cbd0d8b6476501f55a8320481ec0f1'] = 'Lista de países :';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_aef71ba4fd060dea2e2c76d1b5076caf'] = 'Puede elegir varios países pulsando Ctrl mientras selecciona los países';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_0309a6c666a7a803fdb9db95de71cf01'] = 'Francia';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_6c1674d14bf5f95742f572cddb0641a7'] = 'Bélgica';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_06630c890abadde9228ea818ce52b621'] = 'Luxemburgo';
@@ -120,6 +121,7 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_6c530987d533793b0f25fb18807b69c
$_MODULE['<{mondialrelay}prestashop>mondialrelay_3d2da0d2e731d59465a92f13216cf82d'] = 'La página señas';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_06b3355cd8a61603396c7e453bdb1025'] = 'Dirección vacía: ¿está seguro de haber introducio una dirección válida en la página Señas?';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_2f84f9d5731852c4d07d52ef0badc42e'] = 'Problemas para obtener las direcciones de servicio web MondialRelay: los servidores de Mondial Relay pueden estar fuera de servicio';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_016854c68c7122b18d89ff0f5e40502b'] = 'No hay Punto de entrega cerca de su domicilio, por favor cambie su dirección o utilice otro modo de transporte';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_21034ae6d01a83e702839a72ba8a77b0'] = '(sin IVA)';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_1f87346a16cf80c372065de3c54c86d9'] = '(IVA incluido)';
$_MODULE['<{mondialrelay}prestashop>mondialrelay_e7a6ca4e744870d455a57b644f696457'] = '¡Gratis!';
+1 -1
View File
@@ -55,7 +55,7 @@
<div style="float: left; margin-left: 20px; margin-bottom: 10px;">
{$c.name|escape:'html':'UTF-8'}<br />
{section loop=6 step=1 start=1 name=average}
<input class="auto-submit-star" disabled="disabled" type="radio" name="{$c.name|escape:'html':'UTF-8'}_{$smarty.section.average.index}" value="{$smarty.section.average.index}" {if $averages[$c.id_product_comment_criterion]|round neq 0 and $smarty.section.average.index eq $averages[$c.id_product_comment_criterion]|round}checked="checked"{/if} />
<input class="auto-submit-star" disabled="disabled" type="radio" name="{$c.name|escape:'html':'UTF-8'}_{$smarty.section.average.index}" value="{$smarty.section.average.index}" {if isset($averages[$c.id_product_comment_criterion]) AND $averages[$c.id_product_comment_criterion]|round neq 0 AND $smarty.section.average.index eq $averages[$c.id_product_comment_criterion]|round}checked="checked"{/if} />
{/section}
</div>
{/foreach}
@@ -62,9 +62,9 @@
{foreach from=$list_ids_product item=id_product}
{assign var='tab_grade' value=$product_grades[$grade_id]}
<td width="{$width}%" class="{$classname} comparison_infos ajax_block_product" align="center">
{if $tab_grade[$id_product]}
{if isset($tab_grade[$id_product]) AND $tab_grade[$id_product]}
{section loop=6 step=1 start=1 name=average}
<input class="auto-submit-star" disabled="disabled" type="radio" name="{$grade_id}_{$product_id}_{$smarty.section.average.index}" {if $tab_grade[$id_product]|round neq 0 and $smarty.section.average.index eq $tab_grade[$id_product]|round}checked="checked"{/if} />
<input class="auto-submit-star" disabled="disabled" type="radio" name="{$grade_id}_{$product_id}_{$smarty.section.average.index}" {if isset($tab_grade[$id_product]) AND $tab_grade[$id_product]|round neq 0 and $smarty.section.average.index eq $tab_grade[$id_product]|round}checked="checked"{/if} />
{/section}
{else}
-
@@ -79,7 +79,7 @@
<td class="{$classname} comparison_infos">{l s='Average' mod='productcomments'}</td>
{foreach from=$list_ids_product item=id_product}
<td width="{$width}%" class="{$classname} comparison_infos" align="center" >
{if $list_product_average[$id_product]}
{if isset($list_product_average[$id_product]) AND $list_product_average[$id_product]}
{section loop=6 step=1 start=1 name=average}
<input class="auto-submit-star" disabled="disabled" type="radio" name="average_{$id_product}" {if $list_product_average[$id_product]|round neq 0 and $smarty.section.average.index eq $list_product_average[$id_product]|round}checked="checked"{/if} />
{/section}
@@ -94,7 +94,7 @@
<td class="{$classname} comparison_infos">&nbsp;</td>
{foreach from=$list_ids_product item=id_product}
<td width="{$width}%" class="{$classname} comparison_infos" align="center" >
{if $product_comments[$id_product]}
{if isset($product_comments[$id_product]) AND $product_comments[$id_product]}
<a href="#" rel="#comments_{$id_product}" class="cluetip">{l s='view comments' mod='productcomments'}</a>
<div style="display:none" id="comments_{$id_product}">
{foreach from=$product_comments[$id_product] item=comment}
+1
View File
@@ -10,6 +10,7 @@ $_MODULE['<{producttooltip}prestashop>producttooltip_93cba07454f06a4a960172bbd6e
$_MODULE['<{producttooltip}prestashop>producttooltip_bafd7322c6e97d25b6299b5d6fe8920b'] = 'No';
$_MODULE['<{producttooltip}prestashop>producttooltip_2c8de3180924949acc5f6250af689802'] = 'Periodo de validez:';
$_MODULE['<{producttooltip}prestashop>producttooltip_640fd0cc0ffa0316ae087652871f4486'] = 'minutos';
$_MODULE['<{producttooltip}prestashop>producttooltip_8a8110f8a25a0e445f51edf84fd98a96'] = 'Si activa la opción anterior, debe activar la primera opción del módulo StatData';
$_MODULE['<{producttooltip}prestashop>producttooltip_1e358b149c2d4105f3a74c1961d1d9fb'] = '¿Mostrar la fecha del último pedido?';
$_MODULE['<{producttooltip}prestashop>producttooltip_69cd5a64d37c70989558b58f0b484fb3'] = 'Si no hay pedido, ¿mostrar la última vez que un producto ha sido añadido al carrito?';
$_MODULE['<{producttooltip}prestashop>producttooltip_a536f110cc080569666e95e8f49fda9b'] = 'No mostrar los acontecimientos de más de:';
+1 -1
View File
@@ -2,7 +2,7 @@
<module>
<name>trustedshops</name>
<displayName>Trusted Shops Customer Rating</displayName>
<version>1.1</version>
<version>1.2</version>
<description>Boost consumer confidence and turn more shoppers into buyers.</description>
<author></author>
<tab>payment_security</tab>
+9
View File
@@ -4,6 +4,12 @@ global $_MODULE;
$_MODULE = array();
$_MODULE['<{trustedshops}prestashop>display_products_02ecb4a4709d9bcc590f1a25fc82c0e2'] = 'Trusted Shops protección comprador (recomendado)';
$_MODULE['<{trustedshops}prestashop>display_products_b55aab8932a39ca85bb0a1b6eb83f83f'] = 'Protección comprador hasta';
$_MODULE['<{trustedshops}prestashop>display_products_a53a5a9f38f31d62a791717b943e02f3'] = 'EUR IVA incluído';
$_MODULE['<{trustedshops}prestashop>display_products_b3c25d2f94cf87ece3dbb2907318520c'] = 'La protección comprador Trusted Shops hace su compra en línea segura. Acepto que mi email sea trasferido y';
$_MODULE['<{trustedshops}prestashop>display_products_536a056b710e94b16169efd17a4a657b'] = 'guardado';
$_MODULE['<{trustedshops}prestashop>display_products_2dc4be4d5564180e6df95d5a5a679195'] = 'para el tratamiento de la protección comprador por Trusted Shops.';
$_MODULE['<{trustedshops}prestashop>display_products_229eb04083e06f419f9ac494329f957d'] = 'Condiciones';
$_MODULE['<{trustedshops}prestashop>display_products_4ccaceceffe4b5e58f6a7a7ed3ced4c4'] = 'para la protección del comprador.';
$_MODULE['<{trustedshops}prestashop>order-confirmation-tsbp-classic_7b5406da2d5f15923d6b01d3264c5619'] = 'Cuño Trusted Shops- Pulse aquí para comprobar';
$_MODULE['<{trustedshops}prestashop>order-confirmation-tsbp-classic_4052048c767f22e9071c3e6f404d00c6'] = 'Como miembro de Trusted Shops, le ofrecemos un servicio complementario excepcional: la garantía de reembolso Trusted Shops. ';
$_MODULE['<{trustedshops}prestashop>order-confirmation-tsbp-classic_f975f42362625cf21e592009ff4b3d7b'] = 'Inscríbase para obtener la garantía de reembolso de Trusted Shops. ';
@@ -85,6 +91,7 @@ $_MODULE['<{trustedshops}prestashop>tsbuyerprotection_259060bb469ed1256c2e758e32
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_8512ae7d57b1396273f76fe6ed341a23'] = 'idioma';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_f7ea4ac740662d2427d1ef1f2695206d'] = 'ha sido suprimido';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_3fb2ea84b90d4ea9fab48ea356a2319b'] = 'Se ha añadido el login del certificado';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_b18f5630d5ffdfcee5ab0a44ee6e1eb6'] = 'Tiene que crear un nombre de usuario y una contraseña antes de efectuar cualquier cambio.';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_e32263743aac776e5e32fc385d8b669a'] = 'Trusted Shops es el sello de calidad europea para sitios de venta en línea con garantía de reembolso para sus clientes. En el momento de la certificación, su tienda está sometida a una auditoría que agrupa más de 1000 criterios diferentes que respetan las exigencias de las asociaciones de protección de los consumidores, así como las legislaciones nacionales y europeas. ';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_2c786e15a571a442adf85460e6358883'] = '¡Más confianza implica más ventas!';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_e06f60bb083e167516a94aafd5a3a2e2'] = 'El sello de calidad Trusted Shops es ideal para aumentar la confianza de los clientes en su tienda en línea. Cuanto más confíen los clientes en su sitio Wab, más compras realizarán el el mismo.';
@@ -92,6 +99,8 @@ $_MODULE['<{trustedshops}prestashop>tsbuyerprotection_8dd66ca6788218bd7d2ba7fe43
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_26286e2764ccde55c99d1b258315aa1a'] = 'Puede proponer a sus clientes en línea un argumento importante: la protección comprador Trusted Shops que asegura al cliente en caso de no reembolso o si no reciba la mercancía. Este seguro suplementario permite reducir la interrupción de los pedidos. ';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_710142158c105c01ef807ce959cbc451'] = 'Una fidelización clientela fructuosa y durable';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_f7e15d97ad927ef705de61e787883ada'] = 'Para aumentar las compras en línea, el sello de calidad Trusted Shops con protección comprador es un criterio de calidad durable para compras en línea seguras. Es una manera de transformar clientes únicos en clientes fieles. ';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_7442a1e0ab5e2e26ca9363d226b93d13'] = 'Ambiente tipo';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_8e77e16312de3f95afdf5b92b10232a2'] = 'En este momento está usando el modo:';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_dc62561dd8d390e274487516e869fc93'] = 'Obtenir el link de registro';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_5c93149208b3885248b960eb22e6ba49'] = 'Esta variable ha sido enviada por email por Tructed Shops';
$_MODULE['<{trustedshops}prestashop>tsbuyerprotection_233a96df2f68dbeafaa3126edadc1ce8'] = 'Identificación interna del software de la tienda en Trusted Shops';
+1
View File
@@ -8,6 +8,7 @@ $_MODULE['<{trustedshops}prestashop>display_products_a53a5a9f38f31d62a791717b943
$_MODULE['<{trustedshops}prestashop>display_products_b3c25d2f94cf87ece3dbb2907318520c'] = 'La protection acheteur Trusted Shops sécurise votre achat en ligne. Jaccepte le transfert et la';
$_MODULE['<{trustedshops}prestashop>display_products_536a056b710e94b16169efd17a4a657b'] = 'sauvegarde';
$_MODULE['<{trustedshops}prestashop>display_products_2dc4be4d5564180e6df95d5a5a679195'] = 'de mon adresse email pour le traitement de la protection acheteur par Trusted Shops.';
$_MODULE['<{trustedshops}prestashop>display_products_229eb04083e06f419f9ac494329f957d'] = 'Conditions';
$_MODULE['<{trustedshops}prestashop>display_products_4ccaceceffe4b5e58f6a7a7ed3ced4c4'] = 'pour la protection acheteur.';
$_MODULE['<{trustedshops}prestashop>order-confirmation-tsbp-classic_7b5406da2d5f15923d6b01d3264c5619'] = 'Sceau Trusted Shops - Cliquez pour le verifier.';
$_MODULE['<{trustedshops}prestashop>order-confirmation-tsbp-classic_4052048c767f22e9071c3e6f404d00c6'] = 'En tant que membre Trusted Shops, nous vous offrons un service complémentaire exceptionnel: la garantie de remboursement Trusted Shops. Les frais relatifs à cette garantie sont entièrement à notre charge, alors n\'hésitez pas, il vous suffit de vous inscrire.';
+132 -131
View File
@@ -42,7 +42,7 @@ class TSBuyerProtection extends AbsTrustedShops
const DB_APPLI = 'ts_application_id';
const WEBSERVICE_BO = 'administration';
const WEBSERVICE_FO = 'front-end';
/**
* List of registration link, need to add parameters
* @see TSBuyerProtection::_getRegistrationLink()
@@ -54,7 +54,7 @@ class TSBuyerProtection extends AbsTrustedShops
'FR' => 'http://www.trustedshops.com/marchands/affiliation.html',
'PL' => 'http://www.trustedshops.pl/handlowcy/cennik.html',
);
/**
* Link to obtain the certificate about the shop.
* Use by seal of approval.
@@ -67,22 +67,22 @@ class TSBuyerProtection extends AbsTrustedShops
'FR' => 'http://www.trustedshops.fr',
'PL' => 'http://www.trustedshops.de/profil/#shop_name#_#shop_id#.html',
);
/**
* Available language for used TrustedShops Buyer Protection
* @see TSBuyerProtection::__construct()
* @var array
*/
private $available_languages = array('EN'=>'', 'FR'=>'', 'DE'=>'', 'PL'=>'', );
/**
* @todo : be sure : see TrustedShopsRating::__construct()
* @var array
*/
public $limited_countries = array('PL', 'GB', 'US', 'FR', 'DE');
/**
* Differents urls to call for Trusted Shops API
* Differents urls to call for Trusted Shops API
* @var array
*/
private static $webservice_urls = array(
@@ -95,12 +95,12 @@ class TSBuyerProtection extends AbsTrustedShops
'production' => 'https://protection.trustedshops.com/ts/protectionservices/ApplicationRequestService?wsdl',
),
);
// Configuration vars
// Configuration vars
private static $SHOPSW;
private static $ET_CID;
private static $ET_LID;
/**
* Its must look like :
* array(
@@ -113,19 +113,19 @@ class TSBuyerProtection extends AbsTrustedShops
private static $DEFAULT_LANG;
private static $CAT_ID;
private static $ENV_API;
/**
* save shop url
* @var string
*/
private $site_url;
/**
* Payment type used by Trusted Shops.
* @var array
*/
private static $payments_type;
public function __construct()
{
// need to set this in constructor to allow translation
@@ -177,16 +177,16 @@ class TSBuyerProtection extends AbsTrustedShops
}
}
}
public function install()
{
if (!method_exists('Tools', 'jsonDecode') || !method_exists('Tools', 'jsonEncode'))
return false;
foreach ($this->available_languages as $iso=>$lang)
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'CERTIFICATE_'.strtoupper($iso),
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'CERTIFICATE_'.strtoupper($iso),
Tools::htmlentitiesUTF8(Tools::jsonEncode(array('stateEnum'=>'', 'typeEnum'=>'', 'url'=>'', 'tsID'=>'', 'user'=>'', 'password'=>''))));
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'SHOPSW', '');
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'ET_CID', '');
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'ET_LID', '');
@@ -206,7 +206,7 @@ class TSBuyerProtection extends AbsTrustedShops
);
';
Db::getInstance()->Execute($req);
$req = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.TSBuyerProtection::DB_APPLI.'` (
`id_application` INT NOT NULL PRIMARY KEY,
`ts_id` VARCHAR( 33 ) NOT NULL,
@@ -217,16 +217,16 @@ class TSBuyerProtection extends AbsTrustedShops
);
';
Db::getInstance()->Execute($req);
//add hidden category
$category = new Category();
$languages = Language::getLanguages(true);
foreach ($this->available_languages as $iso=>$lang)
foreach ($this->available_languages as $iso=>$lang)
{
$category->name[Language::getIdByIso(strtolower($iso))] = 'Trustedshops';
$category->link_rewrite[Language::getIdByIso(strtolower($iso))] = 'trustedshops';
}
// If the default lang is different than available languages :
// (Bug occurred otherwise)
if (!array_key_exists(Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')), $this->available_languages))
@@ -234,7 +234,7 @@ class TSBuyerProtection extends AbsTrustedShops
$category->name[(int)Configuration::get('PS_LANG_DEFAULT')] = 'Trustedshops';
$category->link_rewrite[(int)Configuration::get('PS_LANG_DEFAULT')] = 'trustedshops';
}
$category->id_parent = 0;
$category->level_depth = 0;
$category->active = 0;
@@ -242,12 +242,12 @@ class TSBuyerProtection extends AbsTrustedShops
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'CAT_ID', intval($category->id));
return true;
}
public function uninstall()
{
foreach ($this->available_languages as $iso=>$lang)
Configuration::deleteByName(TSBuyerProtection::PREFIX_TABLE.'CERTIFICATE_'.strtoupper($iso));
$category = new Category((int)TSBuyerProtection::$CAT_ID);
$category->delete();
Configuration::deleteByName(TSBuyerProtection::PREFIX_TABLE.'CAT_ID');
@@ -257,7 +257,7 @@ class TSBuyerProtection extends AbsTrustedShops
Configuration::deleteByName(TSBuyerProtection::PREFIX_TABLE.'ENV_API');
return true;
}
/**
* Just for return the file path
* @return string
@@ -266,11 +266,11 @@ class TSBuyerProtection extends AbsTrustedShops
{
return $this->site_url.'modules/'.self::$module_name.'/cron_garantee.php';
}
/**
* This method is used to access of TrustedShops API
* from a SoapClient object.
*
*
* @uses TSBuyerProtection::$webservice_urls with TSBuyerProtection::$ENV_API
* To get the api url according to the environment (test or production)
* @param string $type
@@ -282,11 +282,11 @@ class TSBuyerProtection extends AbsTrustedShops
$client = new SoapClient($url);
return $client;
}
/**
* Checks the Trusted Shops IDs entered in the shop administration
* and returns the characteristics of the corresponding certificate.
*
*
* @uses TSBuyerProtection::_getClient()
* @param string $certificate certificate code already send by Trusted Shops
*/
@@ -307,13 +307,13 @@ class TSBuyerProtection extends AbsTrustedShops
} catch (SoapFault $fault) {
$this->errors[] = $this->l('Code #').$fault->faultcode.',<br />'.$this->l('message:').$fault->faultstring;
}
if(is_int($validation))
throw new TSBPException($validation, TSBPException::ADMINISTRATION);
if (!$validation OR array_key_exists($validation->stateEnum, $array_state))
{
if ($validation->stateEnum === 'TEST' || $validation->stateEnum === 'PRODUCTION')
if ($validation->stateEnum === 'TEST' || $validation->stateEnum === 'PRODUCTION' || $validation->stateEnum === 'INTEGRATION')
{
$this->confirmations[] = $array_state[$validation->stateEnum];
return $validation;
@@ -329,10 +329,10 @@ class TSBuyerProtection extends AbsTrustedShops
$this->errors[] = $this->l('Unknown error.');
}
}
/**
* Checks the shop's web service access credentials.
*
*
* @uses TSBuyerProtection::_getClient()
* @param string $ts_id
* @param string $user
@@ -349,14 +349,14 @@ class TSBuyerProtection extends AbsTrustedShops
}
if ($return < 0)
throw new TSBPException($return, TSBPException::ADMINISTRATION);
return true;
}
/**
* Returns the characteristics of the buyer protection products
* Returns the characteristics of the buyer protection products
* that are allocated individually to each certificate by Trusted Shops.
*
*
* @uses TSBuyerProtection::_getClient()
* @param string $ts_id
*/
@@ -372,10 +372,10 @@ class TSBuyerProtection extends AbsTrustedShops
return $items->item;
return false;
}
/**
* Check validity for params required for TSBuyerProtection::_requestForProtectionV2()
*
*
* @param array $params
*/
private function _requestForProtectionV2ParamsValidator(array $params)
@@ -413,7 +413,7 @@ class TSBuyerProtection extends AbsTrustedShops
if(isset($key['ereg']))
$bool_flag = !preg_match($key['ereg'], $params[$key['name']]) ? false : $bool_flag ;
}
if (!$bool_flag)
{
$this->errors[] = sprintf($this->l('The field %s is wrong, please ensure it was correctly filled.'), $key['name']);
@@ -421,13 +421,13 @@ class TSBuyerProtection extends AbsTrustedShops
}
}
return $bool_flag;
}
/**
* Create the Buyer Protection application by the web service.
* Applications are saved by Trusted Shops and are processed at regular intervals.
*
*
* @uses TSBuyerProtection::_getClient()
* @uses TSBuyerProtection::_requestForProtectionV2ParamsValidator()
* to check required params
@@ -445,13 +445,13 @@ class TSBuyerProtection extends AbsTrustedShops
WHERE `id_order` = "'.$params['shopOrderID'].'"
';
$order = Db::getInstance()->ExecuteS($sql);
// If an order was already added, no need to continue.
// Otherwise a new application is created by TrustedShops.
// this can occured when order confirmation page is reload.
if(isset($order[0]))
return false;
if ($testing_params)
{
try {
@@ -467,7 +467,7 @@ class TSBuyerProtection extends AbsTrustedShops
{
$date = date('Y-m-d H:i:s');
$sql = '
INSERT INTO `'._DB_PREFIX_.TSBuyerProtection::DB_APPLI.'`
INSERT INTO `'._DB_PREFIX_.TSBuyerProtection::DB_APPLI.'`
(
`id_application`,
`ts_id`,
@@ -485,7 +485,7 @@ class TSBuyerProtection extends AbsTrustedShops
)
';
Db::getInstance()->Execute($sql);
// To reset product quantity in database.
$sql = '
SELECT `id_product`
@@ -501,13 +501,13 @@ class TSBuyerProtection extends AbsTrustedShops
else
$this->errors[] = $this->l('Some parameters sending to "requestForProtectionV2" method are wrong or missing.');
}
/**
* With the getRequestState() method,
* the status of a guarantee application is requested
* the status of a guarantee application is requested
* and in the event of a successful transaction,
* the guarantee number is returned.
*
*
* @uses TSBuyerProtection::_getClient()
* @param array $params
* @throws TSBPException
@@ -527,22 +527,22 @@ class TSBuyerProtection extends AbsTrustedShops
}
return $code;
}
/**
* Check statut of last applications
* Check statut of last applications
* saved with TSBuyerProtection::_requestForProtectionV2()
*
*
* Negative value means an error occured.
* Error code are managed in TSBPException.
* @see (exception) TSBPException::_getFrontEndMessage() method
*
* Trusted Shops recommends that the request
*
* Trusted Shops recommends that the request
* should be automated by a cronjob with an interval of 10 minutes.
* @see /../cron_garantee.php
*
*
* A message is added to the sheet order in Back-office,
* @see Message class
*
*
* @uses TSBuyerProtection::_getRequestState()
* @uses Message class
* @return void
@@ -584,10 +584,10 @@ class TSBuyerProtection extends AbsTrustedShops
$msg->add();
}
}
/**
* Registration link to Trusted Shops
*
*
* @param string $shopsw
* @param string $et_cid
* @param string $et_lid
@@ -601,22 +601,22 @@ class TSBuyerProtection extends AbsTrustedShops
return $this->registration_link[$lang].sprintf('?shopsw=%s&et_cid=%s&et_lid=%s', urlencode($shopsw), urlencode($et_cid), urlencode($et_lid));
return false;
}
/**
* Method to display or redirect the subscription link.
*
*
* @param string $link
*/
private function _getRegistrationLink($link)
{
return '<script type="text/javascript" >$().ready(function(){window.open("'.$link.'");});</script>
<noscript><p><a href="'.$link.'" target="_blank" title="'.$this->l('Registration Link').'" class="link">'.$this->l('Click to get the Registration Link').'</a><p></noscript>';
}
/**
* saved paramter to acces of particular subscribtion link.
*
*
* @return string the registration link.
*/
private function _submitRegistrationLink()
@@ -625,7 +625,7 @@ class TSBuyerProtection extends AbsTrustedShops
TSBuyerProtection::$SHOPSW = (Validate::isCleanHtml(Tools::getValue('shopsw'))) ? Tools::getValue('shopsw') : '';
TSBuyerProtection::$ET_CID = (Validate::isCleanHtml(Tools::getValue('et_cid'))) ? Tools::getValue('et_cid') : '';
TSBuyerProtection::$ET_LID = (Validate::isCleanHtml(Tools::getValue('et_lid'))) ? Tools::getValue('et_lid') : '';
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'SHOPSW', TSBuyerProtection::$SHOPSW);
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'ET_CID', TSBuyerProtection::$ET_CID);
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'ET_LID', TSBuyerProtection::$ET_LID);
@@ -633,12 +633,12 @@ class TSBuyerProtection extends AbsTrustedShops
$this->confirmations[] = $this->l('Registration link has been created. Follow this link if you was not redirected ealier:').'&nbsp;<a href="'.$link_registration.'" class="link">&gt;'.$this->l('Link').'&lt;</a>';
return $link_registration;
}
/**
* Save in special database each buyer protection product for a certificate,
* Each Trusted Shops particular characteristics is saved.
* Create a product in Prestashop database to allow added each of them in cart.
*
*
* @param array|stdClass $protection_items
* @param string $ts_id
*/
@@ -651,12 +651,12 @@ class TSBuyerProtection extends AbsTrustedShops
LEFT JOIN `ps_product_lang` AS pl ON ts.`id_product` = pl.`id_product`
WHERE ts.`ts_id`="'.$ts_id.'"';
Db::getInstance()->Execute($sql);
foreach ($protection_items as $key=>$item)
{
//add hidden product
$product = new Product();
foreach ($this->available_languages as $iso=>$lang)
foreach ($this->available_languages as $iso=>$lang)
{
$language = Language::getIdByIso(strtolower($iso));
if ((int)$language !== 0)
@@ -665,7 +665,7 @@ class TSBuyerProtection extends AbsTrustedShops
$product->link_rewrite[$language] = 'trustedshops_garantee';
}
}
// If the default lang is different than available languages :
// (Bug occurred otherwise)
if (!array_key_exists(Language::getIsoById((int)Configuration::get('PS_LANG_DEFAULT')), $this->available_languages))
@@ -679,7 +679,7 @@ class TSBuyerProtection extends AbsTrustedShops
$product->active = true;
$product->id_tax = 0;
$product->add();
if ($product->id)
{
$sql = '
@@ -713,11 +713,11 @@ class TSBuyerProtection extends AbsTrustedShops
}
}
}
/**
* Check and add a Trusted Shops certificate in shop.
*
* @uses TSBuyerProtection::_getProtectionItems()
*
* @uses TSBuyerProtection::_getProtectionItems()
* to get all buyer protection products from Trusted Shops
* @uses TSBuyerProtection::_saveProtectionItems()
* to save buyer protection products in shop
@@ -734,7 +734,7 @@ class TSBuyerProtection extends AbsTrustedShops
if ($checked_certificate)
{
TSBuyerProtection::$CERTIFICATE[strtoupper($checked_certificate->certificationLanguage)] = array('stateEnum'=>$checked_certificate->stateEnum, 'typeEnum'=>$checked_certificate->typeEnum, 'url'=>$checked_certificate->url, 'tsID'=>$checked_certificate->tsID, 'user'=>'', 'password'=>'');
// update the configuration var
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'CERTIFICATE_'.strtoupper($checked_certificate->certificationLanguage), Tools::htmlentitiesUTF8(Tools::jsonEncode(TSBuyerProtection::$CERTIFICATE[strtoupper($checked_certificate->certificationLanguage)])));
$this->confirmations[] = $this->l('Certificate has been well added.');
@@ -752,11 +752,11 @@ class TSBuyerProtection extends AbsTrustedShops
}
return false;
}
/**
* Apply delete or edit action to a certificate
*
* @return boolean|array
*
* @return boolean|array
* - false if action concerned multiple certificate
* (in normal way, this never occured )
* - return required $certificate to edit.
@@ -771,7 +771,7 @@ class TSBuyerProtection extends AbsTrustedShops
$this->errors[] = $this->l('You must edit or delete a Certificate one per one');
return false;
}
// delete action :
if (is_array($delete) AND isset(TSBuyerProtection::$CERTIFICATE[$delete[0]]['tsID']))
{
@@ -782,7 +782,7 @@ class TSBuyerProtection extends AbsTrustedShops
.' "'.$certificate_to_delete.'" ('.$this->l('language').' : '.$delete[0].') '
.$this->l('has been well deleted');
}
// edit action :
if (is_array($edit))
{
@@ -792,12 +792,12 @@ class TSBuyerProtection extends AbsTrustedShops
}
return true;
}
/**
* Change the certificate values.
* concerns only excellence certificate
* concerns only excellence certificate
* for payment type, login and password values.
*
*
* @uses TSBuyerProtection::_checkLogin()
* @return true;
*/
@@ -816,7 +816,7 @@ class TSBuyerProtection extends AbsTrustedShops
foreach ($all_payment_type as $key=>$module_id)
TSBuyerProtection::$CERTIFICATE[$iso_lang]['payment_type'][(string)$key] = $module_id;
}
$check_login = false;
try {
$check_login = $this->_checkLogin(TSBuyerProtection::$CERTIFICATE[$iso_lang]['tsID'], $user, $password);
@@ -829,7 +829,7 @@ class TSBuyerProtection extends AbsTrustedShops
TSBuyerProtection::$CERTIFICATE[$iso_lang]['password'] = $password;
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'CERTIFICATE_'.$iso_lang, Tools::htmlentitiesUTF8(Tools::jsonEncode(TSBuyerProtection::$CERTIFICATE[$iso_lang])));
$this->confirmations[] = $this->l('Certificate login has been well added.');
}
}
else
@@ -838,7 +838,7 @@ class TSBuyerProtection extends AbsTrustedShops
}
return true;
}
/**
* Change the environment for working.
* Not use anymore but keeped
@@ -859,10 +859,10 @@ class TSBuyerProtection extends AbsTrustedShops
TSBuyerProtection::$ENV_API = $env_api;
Configuration::updateValue(TSBuyerProtection::PREFIX_TABLE.'ENV_API', TSBuyerProtection::$ENV_API);
}
/**
* Dispatch post process depends on each formular
*
*
* @return array depend on the needs about each formular.
*/
private function _preProcess()
@@ -878,10 +878,10 @@ class TSBuyerProtection extends AbsTrustedShops
$posts_return['change_certificate'] = $this->_submitChangeCertificate();
return $posts_return;
}
/**
* Display each formaular in back-office
*
*
* @see Module::getContent()
* @return string for displaying form.
*/
@@ -899,12 +899,12 @@ class TSBuyerProtection extends AbsTrustedShops
$out .= '<br />';
$out .= $this->_displayFormAddCertificate();
$out .= '<br />';
$bool_display_certificats = false;
if (is_array(self::$CERTIFICATE))
foreach (self::$CERTIFICATE as $certif)
$bool_display_certificats = (isset($certif['tsID']) && $certif['tsID'] != '')? true : $bool_display_certificats;
if ($bool_display_certificats)
$out .= $this->_displayFormCertificatesList();
if (isset($posts_return['edit_certificate']) && $posts_return['edit_certificate'] &&
@@ -1045,7 +1045,7 @@ class TSBuyerProtection extends AbsTrustedShops
$out .= '<input type="checkbox" name="certificate_delete[]" value="'.$lang.'" />';
} else {
$out .= $this->l('No need');
}
}
$out .= '
</td>
</tr>';
@@ -1060,16 +1060,16 @@ class TSBuyerProtection extends AbsTrustedShops
';
return $out;
}
/**
* Check if a module is payment module.
*
* Method instanciate a $module by its name,
* Module::getInstanceByName() rather than Module::getInstanceById()
*
* Method instanciate a $module by its name,
* Module::getInstanceByName() rather than Module::getInstanceById()
* is used for cache improvement and avoid an sql request.
*
*
* Method test if PaymentMethod::getCurrency() is a method from the module.
*
*
* @see Module::getInstanceByName() in classes/Module.php
* @param string $module name of the module
*/
@@ -1077,7 +1077,7 @@ class TSBuyerProtection extends AbsTrustedShops
{
$return = false;
$module = Module::getInstanceByName($module);
if (method_exists($module, 'getCurrency')){
$return = clone $module;
}
@@ -1106,7 +1106,7 @@ class TSBuyerProtection extends AbsTrustedShops
});
TSPayment.init();
});
</script>
<form action="'.$this->_makeFormAction($_SERVER['REQUEST_URI'], $this->id_tab).'" method="post" >
<fieldset>
@@ -1192,7 +1192,7 @@ class TSBuyerProtection extends AbsTrustedShops
/**
* For Excellence certificate display Buyer protection products.
* An error message if the certificate is not totally filled
*
*
* @param array $params
* @return string tpl content
*/
@@ -1200,15 +1200,15 @@ class TSBuyerProtection extends AbsTrustedShops
{
$lang = Language::getIsoById($params['cookie']->id_lang);
$lang = strtoupper($lang);
if (!isset(TSBuyerProtection::$CERTIFICATE[$lang]) ||
if (!isset(TSBuyerProtection::$CERTIFICATE[$lang]) ||
!isset(TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum']))
return '';
// This hook is available only with EXCELLENCE certificate.
if(TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum'] == 'CLASSIC' OR (TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'PRODUCTION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'TEST'))
if(TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum'] == 'CLASSIC' OR (TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'INTEGRATION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'PRODUCTION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'TEST'))
return '';
// If login parameters missing for the certificate an error occured
if ((TSBuyerProtection::$CERTIFICATE[$lang]['user'] == '' OR TSBuyerProtection::$CERTIFICATE[$lang]['password'] == '') AND TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum'] == 'EXCELLENCE')
{
@@ -1219,13 +1219,13 @@ class TSBuyerProtection extends AbsTrustedShops
.$this->l('Problem occurred with your language:').' "'.$lang
.'"</p>';
}
if (array_key_exists($lang, $this->available_languages))
{
$currency = new Currency((int)$params['cookie']->id_currency);
$sql = '
SELECT * FROM `'._DB_PREFIX_.TSBuyerProtection::DB_ITEMS.'`
WHERE 1
WHERE 1
AND ts_id ="'.TSBuyerProtection::$CERTIFICATE[$lang]['tsID'].'"
AND `protected_amount_decimal` >= "'.$params['cart']->getOrderTotal(true, Cart::BOTH).'"
AND `currency` = "'.$currency->iso_code.'"
@@ -1236,7 +1236,7 @@ class TSBuyerProtection extends AbsTrustedShops
{
$sql = '
SELECT * FROM `'._DB_PREFIX_.TSBuyerProtection::DB_ITEMS.'`
WHERE 1
WHERE 1
AND ts_id ="'.TSBuyerProtection::$CERTIFICATE[$lang]['tsID'].'"
AND `protected_amount_decimal` <= "'.$params['cart']->getOrderTotal(true, Cart::BOTH).'"
AND `currency` = "'.$currency->iso_code.'"
@@ -1252,11 +1252,11 @@ class TSBuyerProtection extends AbsTrustedShops
}
return $this->display(TSBuyerProtection::$module_name, 'display_products.tpl');
}
/**
* This prepare values to create the Trusted Shops web service
* for Excellence certificate.
*
*
* @see TSBuyerProtection::_requestForProtectionV2() method
* @param array $params
* @param string $lang
@@ -1267,32 +1267,32 @@ class TSBuyerProtection extends AbsTrustedShops
$currency = new Currency((int)$params['objOrder']->id_currency);
$order_products = $params['objOrder']->getProducts();
$order_item_ids = array();
foreach ($order_products as $product)
$order_item_ids[] = $product['product_id'];
$sql = '
SELECT * FROM `'._DB_PREFIX_.TSBuyerProtection::DB_ITEMS.'`
WHERE 1
WHERE 1
AND `id_product` IN ('.implode(',', $order_item_ids).')
AND `ts_id` ="'.TSBuyerProtection::$CERTIFICATE[$lang]['tsID'].'"
AND `currency` = "'.$currency->iso_code.'"
';
$item = Db::getInstance()->ExecuteS($sql);
// No items ? means no buyer protection products was bought.
if(empty($item))
return '';
// In normal context this never occured,
// In normal context this never occured,
// because of a buyer could never add multiple Buyer protection products.
if (count($item) > 1)
{
$this->errors[] = $this->l('A buyer can\'t buy multiple Buyer Protection Products.');
die($this->errors);
}
$item = $item[0];
$item = $item[0];
$customer = new Customer($params['objOrder']->id_customer);
$payment_module = Module::getInstanceByName($params['objOrder']->module);
$arr_params = array();
@@ -1317,17 +1317,17 @@ class TSBuyerProtection extends AbsTrustedShops
$arr_params['shopSystemVersion'] = 'Prestashop '._PS_VERSION_;
$arr_params['wsUser'] = TSBuyerProtection::$CERTIFICATE[$lang]['user'];
$arr_params['wsPassword'] = TSBuyerProtection::$CERTIFICATE[$lang]['password'];
$this->_requestForProtectionV2($arr_params);
$return = '';
if (!empty($this->errors))
$return = '<p style="color:red">'.implode('<br />', $this->errors).'</p>';
else
$return = '<p>'.$this->l('You will receive a mail by Trusted Shops about your garantie number.').'</p>';
$return = '<p>'.$this->l('You will receive a mail by Trusted Shops about your garantie number.').'</p>';
return $return;
}
/**
* Trusted Shops Buyer Protection is integrated at the end of the checkout
* as a form on the order confirmation page.
@@ -1335,7 +1335,7 @@ class TSBuyerProtection extends AbsTrustedShops
* the order data is processed to Trusted Shops.
* The customer confirms the Buyer Protection on the Trusted Shops site.
* The guarantee is then booked and the customer receives an email by Trusted Shops.
*
*
* @param array $params
* @param string $lang
* @return string tpl content
@@ -1344,7 +1344,7 @@ class TSBuyerProtection extends AbsTrustedShops
{
$customer = new Customer($params['objOrder']->id_customer);
$currency = new Currency((int)$params['objOrder']->id_currency);
$arr_params = array();
$arr_params['charset'] = 'UTF-8';
$arr_params['shop_id'] = TSBuyerProtection::$CERTIFICATE[$lang]['tsID'];
@@ -1362,12 +1362,12 @@ class TSBuyerProtection extends AbsTrustedShops
);
return $this->display(TSBuyerProtection::$module_name, 'order-confirmation-tsbp-classic.tpl');
}
/**
* Order confirmation displaying and actions depend on the certificate type.
*
*
* @uses TSBuyerProtection::_orderConfirmationClassic() for Classic certificate
* @uses TSBuyerProtection::_orderConfirmationExcellence for Excellence certificate.
* @uses TSBuyerProtection::_orderConfirmationExcellence for Excellence certificate.
* @param array $params
* @return string depend on which certificate is used.
*/
@@ -1375,15 +1375,16 @@ class TSBuyerProtection extends AbsTrustedShops
{
$lang = Language::getIsoById($params['objOrder']->id_lang);
$lang = strtoupper($lang);
// If certificate is a classic type or certificate login parameters missing
if (((TSBuyerProtection::$CERTIFICATE[$lang]['user'] == '' OR TSBuyerProtection::$CERTIFICATE[$lang]['password'] == '') AND TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum'] == 'EXCELLENCE')
OR (TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'PRODUCTION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'TEST'))
OR (TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'INTEGRATION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'PRODUCTION' AND TSBuyerProtection::$CERTIFICATE[$lang]['stateEnum'] !== 'TEST'))
return '';
if(TSBuyerProtection::$CERTIFICATE[$lang]['typeEnum'] == 'CLASSIC')
return $this->_orderConfirmationClassic($params, $lang);
else
return $this->_orderConfirmationExcellence($params, $lang);
}
}
@@ -1,5 +1,5 @@
{*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -24,6 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}
<style>
{literal}
input.myButtonTricksTS
{
font-size:9px !important;
@@ -31,6 +32,7 @@ input.myButtonTricksTS
cursor:pointer;
padding:3px;
}
{/literal}
</style>
<div class="trustedshops-form" style="text-align:center;border:1px solid #ccc;padding:10px;">
<div style="float:left;width:72px;">
@@ -58,3 +60,4 @@ input.myButtonTricksTS
</div>
</form>
</div>
+15 -14
View File
@@ -45,10 +45,10 @@ class TrustedShops extends Module
global $smarty;
$this->name = 'trustedshops';
$this->tab = 'payment_security';
$this->version = 1.1;
$this->version = 1.2;
parent::__construct();
if (empty(self::$objects_list))
{
TSBuyerProtection::setTranslationObject($this);
@@ -59,20 +59,20 @@ class TrustedShops extends Module
self::$objects_list[0]->setModuleName($this->name);
self::$objects_list[0]->setSmarty($smarty);
}
if (!extension_loaded('soap'))
$this->warnings[] = $this->l('This module requires the SOAP PHP extension to function properly.');
foreach (self::$objects_list as $object)
{
$this->limited_countries = array_merge($this->limited_countries, $object->limited_countries);
if(!empty($object->warnings))
$this->warnings = array_merge($this->warnings, $object->warnings);
}
if (!empty($this->warnings))
$this->warning = implode(',<br />', $this->warnings).'.';
$this->displayName = $this->l('Trusted Shops Customer Rating');
$this->description = $this->l('Boost consumer confidence and turn more shoppers into buyers.');
$this->confirmUninstall = $this->l('Are you sure you want to delete all your settings?');
@@ -85,7 +85,7 @@ class TrustedShops extends Module
{
$return = $object->install();
if (!$return)
break;
break;
}
$return = ($return) ? (parent::install() AND $this->registerHook('orderConfirmation') AND $this->registerHook('newOrder') AND $this->registerHook('rightColumn') AND $this->registerHook('paymentTop') AND $this->registerHook('orderConfirmation')) : $return;
$id_hook = Hook::get('payment');
@@ -100,7 +100,7 @@ class TrustedShops extends Module
{
$return = $object->uninstall();
if (!$return)
break;
break;
}
$return = ($return) ? parent::uninstall() : $return;
return $return;
@@ -122,14 +122,14 @@ class TrustedShops extends Module
foreach($tabs['title'] as $key=>$title)
$out .= '<li id="menuTab'.$key.'" class="menuTabButton'.( (int)$key === (int)Tools::getValue('id_tab') ? ' selected' : '' ).'">'.($key+1).'. '.$title.'</li>';
$out .= '</ul>';
// Display content Tabs
$out .= '<div id="tabList">';
foreach($tabs['content'] as $key=>$content)
$out .= '<div id="menuTab'.$key.'Sheet" class="tabItem'.( (int)$key === (int)Tools::getValue('id_tab') ? ' selected' : '' ).'">'.$content.'</div>';
$out .= '<br clear="left" />'.$this->displayCSSJSTab();
// Check If each object (display as Tab) contains errors message of
// Check If each object (display as Tab) contains errors message of
$this->checkObjectsErrorsOrConfirmations();
return ( !empty($this->errors) ? $this->displayErrors() : $this->displayConfirmations() ).$out;
}
@@ -162,10 +162,10 @@ class TrustedShops extends Module
</script>
';
}
/**
* Check If each object (display as Tab) contains errors message of
*
*
* @return void
*/
private function checkObjectsErrorsOrConfirmations()
@@ -231,3 +231,4 @@ class TrustedShops extends Module
return $return;
}
}
+4
View File
@@ -24,6 +24,8 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_7545c5d3ad246a683a197a2903a4d5e6'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_b089be65fd32939f1bf1c4aeff1a7457'] = 'No rectangular';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f8320b26d30ab433c5a54546d21f414c'] = 'Falso';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f827cf462f62848df37c5e1e94a4da74'] = 'Verdadero';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_386aad80d82f8245e9ef80352a2240e8'] = 'Todos los artículos en un solo paquete';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f35eb2a913a3fd6fd8e661012cf0ebd8'] = 'Un artículo en cada paquete';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f57cff5425b6e64843c5f066c5b310d0'] = 'Estado del módulo USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_09bdd414ce843927aa3dceadc8bce034'] = '¡El transportista USPS ya es funcional!';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_ec8b84c83dfee20afa4c2f35245a254b'] = 'El transportista USPS aún no está completamente configurado, debe:';
@@ -63,6 +65,8 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_8d2ee0603dfce09b57d60db628cde269'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_795de10b1bdcb843b3703c63ad577fc6'] = 'Elija en la lista el tipo de paquete por defecto';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_93c8645dbbc33cf8d126266a827a5501'] = 'Machinable';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_67cd0f5256c40c16a6cfd6effe3ab06b'] = 'Elija si puede ser tratado por una máquina por defecto o no.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_8d6bd50f3fe3ee2f4513066c25e5fb4a'] = 'Modo de cálculo';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_c5238c5f72dee585afdf4bddf6de518e'] = 'Al usar el modo de cálculo \"Todos los artículos en un solo paquete\" utilizará automáticamente el tamaño por defecto de embalaje, tipo de embalaje y entrega. Las configuraciones específicas para las categorías o producto no se utilizarán.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_5cdd307ba6e260beb4801c0c10e22a3a'] = 'Servicio de entrega';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_78945de8de090e90045d299651a68a9b'] = 'Disponible';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_2d25c72c1b18e562f6654fff8e11711e'] = 'No disponible';
+4
View File
@@ -24,6 +24,8 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_7545c5d3ad246a683a197a2903a4d5e6'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_b089be65fd32939f1bf1c4aeff1a7457'] = 'Non rectangular';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f8320b26d30ab433c5a54546d21f414c'] = 'False';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f827cf462f62848df37c5e1e94a4da74'] = 'True';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_386aad80d82f8245e9ef80352a2240e8'] = 'Tous les articles en un seul paquet';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f35eb2a913a3fd6fd8e661012cf0ebd8'] = 'Découper un article par paquet';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_f57cff5425b6e64843c5f066c5b310d0'] = 'Statut du module USPS';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_09bdd414ce843927aa3dceadc8bce034'] = 'Le transporteur USPS est fonctionnel !';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_ec8b84c83dfee20afa4c2f35245a254b'] = 'Le transporteur USPS n\'est pas encore complètement configuré, vous devez :';
@@ -63,6 +65,8 @@ $_MODULE['<{uspscarrier}prestashop>uspscarrier_8d2ee0603dfce09b57d60db628cde269'
$_MODULE['<{uspscarrier}prestashop>uspscarrier_795de10b1bdcb843b3703c63ad577fc6'] = 'Choisissez le type de paquet par défaut';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_93c8645dbbc33cf8d126266a827a5501'] = 'Machinable';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_67cd0f5256c40c16a6cfd6effe3ab06b'] = 'Choisissez si cela peut être traité par une machine ou non par défaut';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_8d6bd50f3fe3ee2f4513066c25e5fb4a'] = 'Mode de calcul';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_c5238c5f72dee585afdf4bddf6de518e'] = 'Utilisation du mode de calcul : \"Tous les articles dans un seul paquet\" utilisera automatiquement la taille des emballages par défaut, le type d\'emballage et de livraison. Les configurations spécifiques pour les catégories ou un produit ne seront pas utilisées.';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_5cdd307ba6e260beb4801c0c10e22a3a'] = 'Service de livraison';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_78945de8de090e90045d299651a68a9b'] = 'Disponible';
$_MODULE['<{uspscarrier}prestashop>uspscarrier_2d25c72c1b18e562f6654fff8e11711e'] = 'Non disponible';
+2 -2
View File
@@ -21,8 +21,8 @@ needs please refer to http://www.prestashop.com for more information.
@license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
International Registered Trademark & Property of PrestaShop SA
NAME: Prestashop 1.4 final
VERSION: 1.4.0.17
NAME: Prestashop 1.4.1.0
VERSION: 1.4.1.0
VORBEREITUNG
===========

Some files were not shown because too many files have changed in this diff Show More