This commit is contained in:
rMalie
2011-08-24 15:57:10 +00:00
parent 9a90513393
commit 74843c4060
20 changed files with 58 additions and 20 deletions
+4 -4
View File
@@ -621,7 +621,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
else
{
$content = explode('|', $content);
if ($content[0] == 'OK')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[2]) && Validate::isCleanHtml($content[1]))
{
$result['partner_preactivation'] = $content[2];
$content[1] = explode('#%#', $content[1]);
@@ -643,7 +643,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
// PREACTIVATION PAYPAL WARNING
$content = @file_get_contents('https://www.prestashop.com/partner/preactivation/preactivation-warnings.php?version=1.0&partner=paypal&iso_country='.Tools::strtolower(Context::getContext()->country->iso_code).'&iso_lang='.Tools::strtolower(Context::getContext()->language->iso_code).'&id_lang='.(int)Context::getContext().'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context);
$content = explode('|', $content);
if ($content[0] == 'OK')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', $content[1]);
else
Configuration::updateValue('PS_PREACTIVATION_PAYPAL_WARNING', '');
@@ -655,7 +655,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
else
{
$content = explode('|', $content);
if ($content[0] == 'OK')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] = $content[1];
else
$result['discover_prestashop'] = 'NOK';
@@ -665,7 +665,7 @@ if (Tools::isSubmit('getAdminHomeElement'))
$content = @file_get_contents($protocol.'://www.prestashop.com/partner/paypal/paypal-tips.php?protocol='.$protocol.'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)Context::getContext()->language->id, false, $stream_context);
$content = explode('|', $content);
if ($content[0] == 'OK')
if ($content[0] == 'OK' && Validate::isCleanHtml($content[1]))
$result['discover_prestashop'] .= $content[1];
}
+1
View File
@@ -130,6 +130,7 @@ class AdminAccess extends AdminTab
$this->printTabAccess((int)($currentProfile), $tab, $accesses[$tab['id_tab']], false, $tabsize, sizeof($tabs));
foreach ($tabs AS $child)
if ($child['id_parent'] === $tab['id_tab'])
if (isset($accesses[$child['id_tab']]))
$this->printTabAccess($currentProfile, $child, $accesses[$child['id_tab']], true, $tabsize, sizeof($tabs));
}
echo '</table>';
+1
View File
@@ -54,6 +54,7 @@ hr {height: 1px;color:#DEDEDE;background-color:#DEDEDE}
#content {background-color:#FFF;border-left:1px solid #383838;border-right:1px solid #383838}
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #416110}
select {border: 1px solid #416110}
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
.header_module{background:url(header_module.png);padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;}
a.action_module{color: #488C40;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #812143;display:block;}
+1
View File
@@ -49,6 +49,7 @@ hr {height: 1px;color:#E0D0B1;background-color:#E0D0B1}
#content {background-color:#FFF;border-left:1px solid #999999;border-right:1px solid #999999}
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #E0D0B1}
select {border: 1px solid #E0D0B1}
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
.header_module{background:url(header_module.png);padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;}
a.action_module{color: #268CCD;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
+1
View File
@@ -51,6 +51,7 @@ hr {height: 1px;color:#E0D0B1;background-color:#E0D0B1}
#content {background-color:#FFF;border-left:1px solid #999999;border-right:1px solid #999999}
input[type="text"],input[type="password"],input[type="file"],textarea {border:1px solid #E0D0B1}
select {border: 1px solid #E0D0B1}
select[disabled="disabled"], input[disabled="disabled"],textarea[disabled="disabled"] {border: 1px solid #CCCCCC;color: #AAAAAA}
.header_module{background:url(header_module.png);padding-left: 0.5em;padding-top: 0.8em;height:20px;color: #812143;border:solid 1px #CCC;}
a.action_module{color: #268CCD;text-decoration: underline;}
a.header_module_toggle{font-weight: bold;color: #268CCD;display:block;}
+1
View File
@@ -1673,6 +1673,7 @@ class ProductCore extends ObjectModel
$cur_cart = new Cart($id_cart);
}
$cart_quantity = 0;
if ((int)($id_cart))
{
if (!isset(self::$_cart_quantity[(int)($id_cart).'_'.(int)($id_product)]) OR self::$_cart_quantity[(int)($id_cart).'_'.(int)($id_product)] != (int)($quantity))
+8
View File
@@ -461,13 +461,21 @@ class SearchCore
$wordIdsByWord[$product['id_shop']][$product['id_lang']]['_'.$word] = 0;
}
$existingWords = $db->ExecuteS('SELECT word FROM '._DB_PREFIX_.'search_word WHERE word IN ('.implode(',', $queryArray2).') GROUP BY word');
if($existingWords)
foreach($existingWords as $data)
unset($queryArray[$data['word']]);
if (count($queryArray))
{
// The words are inserted...
$db->Execute('
INSERT IGNORE INTO '._DB_PREFIX_.'search_word (id_lang, id_shop, word)
VALUES '.implode(',',$queryArray));
}
if (count($queryArray2))
{
// ...then their IDs are retrieved and added to the cache
$addedWords = $db->ExecuteS('
SELECT sw.id_word, sw.word
+5
View File
@@ -246,6 +246,11 @@ class OrderOpcControllerCore extends ParentOrderController
'errorTOS' => Tools::displayError('You must accept terms of service before', false),
'isPaymentStep' => (bool)(isset($_GET['isPaymentStep']) AND $_GET['isPaymentStep'])
));
/* Call a hook to display more information on form */
self::$smarty->assign(array(
'HOOK_CREATE_ACCOUNT_FORM' => Module::hookExec('createAccountForm'),
'HOOK_CREATE_ACCOUNT_TOP' => Module::hookExec('createAccountTop')
));
$years = Tools::dateYears();
$months = Tools::dateMonths();
$days = Tools::dateDays();
+2 -2
View File
@@ -2,11 +2,11 @@
<module>
<name>ebay</name>
<displayName><![CDATA[eBay]]></displayName>
<version><![CDATA[1.2]]></version>
<version><![CDATA[1.2.1]]></version>
<description><![CDATA[Open your shop on the eBay market place !]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[market_place]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
</module>
+19 -6
View File
@@ -59,7 +59,7 @@ class Ebay extends Module
{
$this->name = 'ebay';
$this->tab = 'market_place';
$this->version = '1.2';
$this->version = '1.2.1';
$this->author = 'PrestaShop';
parent::__construct ();
$this->displayName = $this->l('eBay');
@@ -324,6 +324,10 @@ class Ebay extends Module
$dateNew = date('Y-m-d').'T'.date('H:i:s').'.000Z';
if (Configuration::get('EBAY_ORDER_LAST_UPDATE') < date('Y-m-d', strtotime('-45 minutes')).'T'.date('H:i:s', strtotime('-45 minutes')).'.000Z')
{
// Lock
Configuration::updateValue('EBAY_ORDER_LAST_UPDATE', $dateNew);
// eBay Request
$ebay = new eBayRequest();
$page = 1;
@@ -345,8 +349,7 @@ class Ebay extends Module
{
if (!Db::getInstance()->getValue('SELECT `id_ebay_order` FROM `'._DB_PREFIX_.'ebay_order` WHERE `id_order_ref` = \''.pSQL($order['id_order_ref']).'\''))
{
$result = Db::getInstance()->getRow('SELECT `id_customer` FROM `'._DB_PREFIX_.'customer` WHERE `active` = 1 AND `email` = \''.pSQL($order['email']).'\' AND `deleted` = 0'.(substr(_PS_VERSION_, 0, 3) == '1.3' ? '' : ' AND `is_guest` = 0'));
$id_customer = (isset($result['id_customer']) ? $result['id_customer'] : 0);
$id_customer = (int)Db::getInstance()->getValue('SELECT `id_customer` FROM `'._DB_PREFIX_.'customer` WHERE `active` = 1 AND `email` = \''.pSQL($order['email']).'\' AND `deleted` = 0'.(substr(_PS_VERSION_, 0, 3) == '1.3' ? '' : ' AND `is_guest` = 0'));
// Check for empty name
$order['firstname'] = str_replace('_', '', trim($order['firstname']));
@@ -355,6 +358,8 @@ class Ebay extends Module
$order['familyname'] = $order['firstname'];
if (empty($order['firstname']))
$order['firstname'] = $order['familyname'];
if (empty($order['phone']) || !Validate::isPhoneNumber($order['phone']))
$order['phone'] = '0100000000';
if (Validate::isEmail($order['email']) && !empty($order['firstname']) && !empty($order['familyname']))
{
@@ -376,10 +381,17 @@ class Ebay extends Module
$id_customer = $customer->id;
}
// Search if address exists
$id_address = (int)Db::getInstance()->getValue('SELECT `id_address` FROM `'._DB_PREFIX_.'address` WHERE `id_customer` = '.(int)$id_customer.' AND `alias` = \'eBay\'');
if ($id_address > 0)
$address = new Address((int)$id_address);
else
{
$address = new Address();
$address->id_customer = (int)$id_customer;
}
$address->id_country = (int)Country::getByIso($order['country_iso_code']);
$address->alias = 'eBay '.date('Y-m-d H:i:s');
$address->alias = 'eBay';
$address->lastname = pSQL($order['familyname']);
$address->firstname = pSQL($order['firstname']);
$address->address1 = pSQL($order['address1']);
@@ -388,6 +400,9 @@ class Ebay extends Module
$address->city = pSQL($order['city']);
$address->phone = pSQL($order['phone']);
$address->active = 1;
if ($id_address > 0 && Validate::isLoadedObject($address))
$address->update();
else
$address->add();
$id_address = $address->id;
@@ -455,8 +470,6 @@ class Ebay extends Module
}
}
}
Configuration::updateValue('EBAY_ORDER_LAST_UPDATE', $dateNew);
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
<module>
<name>gsitemap</name>
<displayName><![CDATA[Google sitemap]]></displayName>
<version><![CDATA[1.6]]></version>
<version><![CDATA[1.7]]></version>
<description><![CDATA[Generate your Google sitemap file]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[seo]]></tab>
+1
View File
@@ -38,4 +38,5 @@ $_MODULE['<{mailalerts}prestashop>myalerts_0b3db27bc15f682e92ff250ebb167d4b'] =
$_MODULE['<{mailalerts}prestashop>myalerts_8cf04a9734132302f96da8e113e80ce5'] = 'Accueil';
$_MODULE['<{mailalerts}prestashop>product_61172eb93737ebf095d3fa02119ce1df'] = 'Demande de notification enregistrée';
$_MODULE['<{mailalerts}prestashop>product_900f8551b29793ecb604a545b2059cc1'] = 'Votre adresse e-mail est invalide';
$_MODULE['<{mailalerts}prestashop>product_67135a14d3ac4f1369633dd006d6efec'] = 'votre@email.com';
$_MODULE['<{mailalerts}prestashop>product_546e02eaa9a986c83cc347e273269f2c'] = 'Prévenez-moi lorsque le produit est disponible';
+2 -2
View File
@@ -28,7 +28,7 @@
oosHookJsCodeFunctions.push('oosHookJsCodeMailAlert');
function clearText() {
if ($('#oos_customer_email').val() == 'your@email.com')
if ($('#oos_customer_email').val() == '{l s='your@email.com' mod='mailalerts'}')
$('#oos_customer_email').val('');
}
@@ -86,7 +86,7 @@ $(document).ready(function() {
<!-- MODULE MailAlerts -->
{if isset($email) AND $email}
<input type="text" id="oos_customer_email" name="customer_email" size="20" value="your@email.com" class="mailalerts_oos_email" onclick="clearText();" /><br />
<input type="text" id="oos_customer_email" name="customer_email" size="20" value="{l s='your@email.com' mod='mailalerts'}" class="mailalerts_oos_email" onclick="clearText();" /><br />
{/if}
<a href="#" onclick="return addNotification();" id="mailalert_link">{l s='Notify me when available' mod='mailalerts'}</a>
<span id="oos_customer_email_result" style="display:none;"></span>
+1
View File
@@ -47,6 +47,7 @@ $_MODULE['<{moneybookers}prestashop>moneybookers_d5086eeb1bc1994c5abf945fd79d424
$_MODULE['<{moneybookers}prestashop>moneybookers_68db2cda800ddb2ae307c60b0a96252f'] = 'Solution de Paiement en ligne Moneybookers';
$_MODULE['<{moneybookers}prestashop>moneybookers_b9c758264b134743b13a85ca4055c629'] = 'Estimation du volume mensuel passant par Moneybookers';
$_MODULE['<{moneybookers}prestashop>moneybookers_7d294d4900ff1a38f5b0a89612916eac'] = 'Pour les marchands au-dessus de €100,000 des tarifs sur mesure peuvent être mis en place.';
$_MODULE['<{moneybookers}prestashop>moneybookers_936ccdb97115e9f35a11d35e3d5b5cad'] = 'Cliquez ici';
$_MODULE['<{moneybookers}prestashop>moneybookers_11c8ff1cde03aa19406dfe5971b92553'] = 'Porte-monnaie électronique Moneybookers';
$_MODULE['<{moneybookers}prestashop>moneybookers_223b661f7b13d33498a9274bb10e3538'] = 'Portail de Paiements Directs Moneybookers ';
$_MODULE['<{moneybookers}prestashop>moneybookers_f284fe53995a4cc2e1e099cb1e511ec8'] = 'Validation de votre compte';
+1 -1
View File
@@ -391,7 +391,7 @@ class MoneyBookers extends PaymentModule
$output .= '
</select>
<p>'.$this->l('Change youpr logo position in the Front Office. Works with').'
<p>'.$this->l('Change your logo position in the Front Office. Works with').'
<a href="'.$link->getPageLink('index.php').'?live_edit&ad='.$admin_dir.'&liveToken='.sha1($admin_dir._COOKIE_KEY_).'">'.$this->l(' Live edit.').'</a></p>
</div>
<div style="text-align:center;">
+1 -1
View File
@@ -208,7 +208,7 @@ class Ogone extends PaymentModule
public function validate($id_cart, $id_order_state, $amount, $message = '', $secure_key)
{
$this->validateOrder((int)$id_cart, $id_order_state, $amount, $this->displayName, $message, NULL, NULL, true, pSQL($secure_key));
if ($amount > 0 AND class_exists('PaymentCC'))
if ($amount > 0 AND file_exists('../../classes/PaymentCC.php'))
{
$pcc = new PaymentCC();
$order = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'orders WHERE id_cart = '.(int)$id_cart);
+1 -1
View File
@@ -88,7 +88,7 @@ $_MODULE['<{referralprogram}prestashop>referralprogram_edf7f0a17b8a8f1732f12856f
$_MODULE['<{referralprogram}prestashop>referralprogram_8465d83b5c1b569299af284c14d957bb'] = 'Description du bon :';
$_MODULE['<{referralprogram}prestashop>referralprogram_b17f3f4dcf653a5776792498a9b44d6a'] = 'Mettre à jour les paramètres';
$_MODULE['<{referralprogram}prestashop>referralprogram_562ad64cf21ac2da656134355115133d'] = 'Vous devez spécifier un texte.';
$_MODULE['<{referralprogram}prestashop>referralprogram_01705c0177ebf5fbcbf4e882bc454405'] = 'Conditions du programme de parrainage';
$_MODULE['<{referralprogram}prestashop>referralprogram_6b719c160f9b08dad4760bcc4b52ed48'] = 'Conditions du programme de parrainage';
$_MODULE['<{referralprogram}prestashop>referralprogram_c5afb9c76a7880978cba32872d01f068'] = 'Mise à jour du texte';
$_MODULE['<{referralprogram}prestashop>referralprogram_6b31baf25848e7a6563ecc3946626c80'] = 'Programme de parrainage';
$_MODULE['<{referralprogram}prestashop>referralprogram_7790d51a3d62c85aae65464dee12ee8b'] = 'Parrain du client :';
+2 -2
View File
@@ -311,7 +311,7 @@ class ReferralProgram extends Module
// TinyMCE
$isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en');
$ad = dirname($_SERVER["PHP_SELF"]);
echo '
$this->_html .= '
<script type="text/javascript">
var iso = \''.$isoTinyMCE.'\' ;
var pathCSS = \''._THEME_CSS_DIR_.'\' ;
@@ -322,7 +322,7 @@ class ReferralProgram extends Module
<script language="javascript">id_language = Number('.$defaultLanguage.');</script>
<form method="post" action="'.$_SERVER['REQUEST_URI'].'" enctype="multipart/form-data">
<fieldset>
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" /> '.$this->l('Referral program rules').'</legend>';
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" /> '.$this->l('Conditions of the referral program').'</legend>';
foreach ($languages AS $language)
{
$this->_html .= '
+3
View File
@@ -46,6 +46,9 @@ function updateAddress(phone)
var fields = data.split(',');
$(fields).each(function(){
var field = this.split(':');
if (orderProcess == 'order-opc')
$('form#opc_account_form input[name=\''+ field[0] +'\']').val(field[1]);
else
$('form#account-creation_form input[name=\''+ field[0] +'\']').val(field[1]);
});
}
@@ -68,6 +68,7 @@
<div class="clear"></div>
</div>
<div id="opc_account_form">
{$HOOK_CREATE_ACCOUNT_TOP}
<script type="text/javascript">
// <![CDATA[
idSelectedCountry = {if isset($guestInformations) && $guestInformations.id_state}{$guestInformations.id_state|intval}{else}false{/if};
@@ -407,6 +408,7 @@
</p>
<input type="hidden" name="alias_invoice" id="alias_invoice" value="{l s='My Invoice address'}" />
</div>
{$HOOK_CREATE_ACCOUNT_FORM}
<p style="float: right;">
<input type="submit" class="exclusive button" name="submitAccount" id="submitAccount" value="{l s='Save'}" />
</p>