// MERGE with 1.4 r7770

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-28 09:20:57 +00:00
parent df255f66c1
commit a875fecb20
968 changed files with 26082 additions and 3937 deletions
+10 -10
View File
@@ -63,7 +63,7 @@ class LoyaltyModule extends ObjectModel
$this->historize();
}
static public function getByOrderId($id_order)
public static function getByOrderId($id_order)
{
if (!Validate::isUnsignedId($id_order))
return false;
@@ -76,14 +76,14 @@ class LoyaltyModule extends ObjectModel
return isset($result['id_loyalty']) ? $result['id_loyalty'] : false;
}
static public function getOrderNbPoints($order)
public static function getOrderNbPoints($order)
{
if (!Validate::isLoadedObject($order))
return false;
return self::getCartNbPoints(new Cart((int)$order->id_cart));
}
static public function getCartNbPoints($cart, $newProduct = NULL)
public static function getCartNbPoints($cart, $newProduct = NULL)
{
$total = 0;
if (Validate::isLoadedObject($cart))
@@ -118,7 +118,7 @@ class LoyaltyModule extends ObjectModel
return self::getNbPointsByPrice($total);
}
static public function getVoucherValue($nbPoints, $id_currency = NULL)
public static function getVoucherValue($nbPoints, $id_currency = NULL)
{
global $cookie;
@@ -128,7 +128,7 @@ class LoyaltyModule extends ObjectModel
return (int)$nbPoints * (float)Tools::convertPrice(Configuration::get('PS_LOYALTY_POINT_VALUE'), new Currency((int)$id_currency));
}
static public function getNbPointsByPrice($price)
public static function getNbPointsByPrice($price)
{
global $cookie;
@@ -147,7 +147,7 @@ class LoyaltyModule extends ObjectModel
return (int)$points;
}
static public function getPointsByCustomer($id_customer)
public static function getPointsByCustomer($id_customer)
{
return
Db::getInstance()->getValue('
@@ -163,7 +163,7 @@ class LoyaltyModule extends ObjectModel
AND f.id_loyalty_state = '.(int)LoyaltyStateModule::getCancelId().' AND points < 0');
}
static public function getAllByIdCustomer($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1)
public static function getAllByIdCustomer($id_customer, $id_lang, $onlyValidate = false, $pagination = false, $nb = 10, $page = 1)
{
$query = '
SELECT f.id_order AS id, f.date_add AS date, (o.total_paid - o.total_shipping) total_without_shipping, f.points, f.id_loyalty, f.id_loyalty_state, fsl.name state
@@ -179,7 +179,7 @@ class LoyaltyModule extends ObjectModel
return Db::getInstance()->ExecuteS($query);
}
static public function getDiscountByIdCustomer($id_customer, $last=false)
public static function getDiscountByIdCustomer($id_customer, $last=false)
{
$query = '
SELECT f.id_discount AS id_discount, f.date_upd AS date_add
@@ -195,7 +195,7 @@ class LoyaltyModule extends ObjectModel
return Db::getInstance()->ExecuteS($query);
}
static public function registerDiscount($discount)
public static function registerDiscount($discount)
{
if (!Validate::isLoadedObject($discount))
die(Tools::displayError('Incorrect object Discount.'));
@@ -216,7 +216,7 @@ class LoyaltyModule extends ObjectModel
}
}
static public function getOrdersByIdDiscount($id_discount)
public static function getOrdersByIdDiscount($id_discount)
{
$items = Db::getInstance()->ExecuteS('
SELECT f.id_order AS id_order, f.points AS points, f.date_upd AS date
+8 -8
View File
@@ -59,20 +59,20 @@ class LoyaltyStateModule extends ObjectModel
return parent::getTranslationsFields(array('name'));
}
static public function getDefaultId() { return 1; }
static public function getValidationId() { return 2; }
static public function getCancelId() { return 3; }
static public function getConvertId() { return 4; }
static public function getNoneAwardId() { return 5; }
public static function getDefaultId() { return 1; }
public static function getValidationId() { return 2; }
public static function getCancelId() { return 3; }
public static function getConvertId() { return 4; }
public static function getNoneAwardId() { return 5; }
static public function insertDefaultData()
public static function insertDefaultData()
{
$loyaltyModule = new Loyalty();
$languages = Language::getLanguages();
$defaultTranslations = array('default' => array('id_loyalty_state' => (int)LoyaltyStateModule::getDefaultId(), 'default' => $loyaltyModule->getL('Awaiting validation'), 'en' => 'Awaiting validation', 'fr' => 'En attente de validation'));
$defaultTranslations['validated'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getValidationId(), 'id_order_state' => _PS_OS_DELIVERED_, 'default' => $loyaltyModule->getL('Available'), 'en' => 'Available', 'fr' => 'Disponible');
$defaultTranslations['cancelled'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getCancelId(), 'id_order_state' => _PS_OS_CANCELED_, 'default' => $loyaltyModule->getL('Cancelled'), 'en' => 'Cancelled', 'fr' => 'Annulés');
$defaultTranslations['validated'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getValidationId(), 'id_order_state' => Configuration::get('PS_OS_DELIVERED'), 'default' => $loyaltyModule->getL('Available'), 'en' => 'Available', 'fr' => 'Disponible');
$defaultTranslations['cancelled'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getCancelId(), 'id_order_state' => Configuration::get('PS_OS_CANCELED'), 'default' => $loyaltyModule->getL('Cancelled'), 'en' => 'Cancelled', 'fr' => 'Annulés');
$defaultTranslations['converted'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getConvertId(), 'default' => $loyaltyModule->getL('Already converted'), 'en' => 'Already converted', 'fr' => 'Déjà convertis');
$defaultTranslations['none_award'] = array('id_loyalty_state' => (int)LoyaltyStateModule::getNoneAwardId(), 'default' => $loyaltyModule->getL('Unavailable on discounts'), 'en' => 'Unavailable on discounts', 'fr' => 'Non disponbile sur produits remisés');
+38 -40
View File
@@ -2,44 +2,6 @@
global $_MODULE;
$_MODULE = array();
$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mein Konto';
$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'Meine Treuepunkte';
$_MODULE['<{loyalty}prestashop>loyalty_a240fa27925a635b08dc28c9e4f9216d'] = 'Bestellung';
$_MODULE['<{loyalty}prestashop>loyalty_44749712dbec183e983dcd78a7736c41'] = 'Datum';
$_MODULE['<{loyalty}prestashop>loyalty_75dd5f1160a3f02b6fae89c54361a1b3'] = 'Punkte';
$_MODULE['<{loyalty}prestashop>loyalty_1026e44f047fb9da36a62c0a8846baac'] = 'Punkte-Status';
$_MODULE['<{loyalty}prestashop>loyalty_66c2c90ea9f6f4a12854195085781d7f'] = 'Gesamtpunktezahl zur Verfügung:';
$_MODULE['<{loyalty}prestashop>loyalty_01abfc750a0c942167651c40d088531d'] = 'Nr.';
$_MODULE['<{loyalty}prestashop>loyalty_5acc2ceeb883ba07cef2d02ea382f242'] = 'Sie haben keine Bestellungen vorgenommen.';
$_MODULE['<{loyalty}prestashop>loyalty_dd1f775e443ff3b9a89270713580a51b'] = 'Zurück';
$_MODULE['<{loyalty}prestashop>loyalty_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Weiter';
$_MODULE['<{loyalty}prestashop>loyalty_e0aa021e21dddbd6d8cecec71e9cf564'] = 'OK';
$_MODULE['<{loyalty}prestashop>loyalty_6c583afb157e33bfb5b7c3d4114c4dd5'] = 'Artikel:';
$_MODULE['<{loyalty}prestashop>loyalty_c48105520852bbd0fa692e4c9fd61628'] = 'Hier generierte Gutscheine sind in den folgenden Kategorien anwendbar:';
$_MODULE['<{loyalty}prestashop>loyalty_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Alle';
$_MODULE['<{loyalty}prestashop>loyalty_5b7d558a20e8bcb6d9355a012becb1eb'] = 'Sind Sie sicher, dass Sie Ihre Punkte in Gutscheine umwandeln wollen?';
$_MODULE['<{loyalty}prestashop>loyalty_4db04271e368fe3d4e1aa7332a18fa9d'] = 'Meine Punkte in einen Gutschein im Wert von umwandeln';
$_MODULE['<{loyalty}prestashop>loyalty_b39cba8836db01a04888aef6ba386420'] = 'Meine Gutscheine aus Treuepunkten';
$_MODULE['<{loyalty}prestashop>loyalty_0eceeb45861f9585dd7a97a3e36f85c6'] = 'Erstellt';
$_MODULE['<{loyalty}prestashop>loyalty_689202409e48743b914713f96d93947c'] = 'Wert';
$_MODULE['<{loyalty}prestashop>loyalty_ca0dbad92a874b2f69b549293387925e'] = 'Code';
$_MODULE['<{loyalty}prestashop>loyalty_eb902cf204f3e4dfffeb56d92a9b5c26'] = 'Gültig ab';
$_MODULE['<{loyalty}prestashop>loyalty_b2844b8e17ecaaeae68d018fe9418af0'] = 'Gültig bis';
$_MODULE['<{loyalty}prestashop>loyalty_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{loyalty}prestashop>loyalty_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details';
$_MODULE['<{loyalty}prestashop>loyalty_29aa46cc3d2677c7e0f216910df600ff'] = 'Kostenloser Versand';
$_MODULE['<{loyalty}prestashop>loyalty_cec73b5ce095a59305ad92a0d47495cb'] = 'So verwenden Sie';
$_MODULE['<{loyalty}prestashop>loyalty_019d1ca7d50cc54b995f60d456435e87'] = 'Gebraucht';
$_MODULE['<{loyalty}prestashop>loyalty_2af3bf4c82c5b33875d532820a959799'] = 'Durch diese Befehle erstellt';
$_MODULE['<{loyalty}prestashop>loyalty_d1228f5476d15142b1358ae4b5fa2454'] = 'Bestellung Nr.';
$_MODULE['<{loyalty}prestashop>loyalty_d5797f3bbadc278f756576dafc6ab4b8'] = 'Punkte.';
$_MODULE['<{loyalty}prestashop>loyalty_a149e85a44aeec9140e92733d9ed694e'] = 'Abgebrochen';
$_MODULE['<{loyalty}prestashop>loyalty_1f67ea7a0b26e9eacc70523bde28df0c'] = 'mehr ...';
$_MODULE['<{loyalty}prestashop>loyalty_a16cf3ec5200cc519f4fe48e34b1df83'] = 'Die Mindestbestellmenge zur Verwendung dieser Gutscheine beträgt:';
$_MODULE['<{loyalty}prestashop>loyalty_8e69341aca5dbf9f55c2e75a2ed5df3c'] = 'Noch keine Gutscheine.';
$_MODULE['<{loyalty}prestashop>loyalty_00d56a5e37c19c59d521530fc8e7f337'] = 'Noch keine Bonuspunkte.';
$_MODULE['<{loyalty}prestashop>loyalty_0b3db27bc15f682e92ff250ebb167d4b'] = 'Zurück zu Ihrem Konto';
$_MODULE['<{loyalty}prestashop>loyalty_8cf04a9734132302f96da8e113e80ce5'] = 'Start';
$_MODULE['<{loyalty}prestashop>loyalty_30146a132c2aa28808a8411ed74c12ed'] = 'Kundentreue und Belohnungen';
$_MODULE['<{loyalty}prestashop>loyalty_f8763c754ba455aa6e8ddf0e62911eb7'] = 'Bieten Sie Ihren Kunden ein Treueprogramm';
$_MODULE['<{loyalty}prestashop>loyalty_f0338d5a7bbd642cc188ca69c8a97b12'] = 'Dies löscht alle Treuepunkte und die Verlaufsgeschichte Ihrer Kunden, sind Sie sicher?';
@@ -70,17 +32,55 @@ $_MODULE['<{loyalty}prestashop>loyalty_4f2a91e15af2631ff9424564b8a45fb2'] = 'Urs
$_MODULE['<{loyalty}prestashop>loyalty_453e6aa38d87b28ccae545967c53004f'] = 'Nicht verfügbar';
$_MODULE['<{loyalty}prestashop>loyalty_6366c60fc5b4f4fce0e3dd146494a4f4'] = 'Eingelöst';
$_MODULE['<{loyalty}prestashop>loyalty_13148717f8faa9037f37d28971dfc219'] = 'Bestätigung';
$_MODULE['<{loyalty}prestashop>loyalty_a149e85a44aeec9140e92733d9ed694e'] = 'Abgebrochen';
$_MODULE['<{loyalty}prestashop>loyalty_38fb7d24e0d60a048f540ecb18e13376'] = 'Speichern';
$_MODULE['<{loyalty}prestashop>loyalty_f67fb9d4e53cbac558e2735a7503ce92'] = 'Treuepunkte';
$_MODULE['<{loyalty}prestashop>loyalty_0aab81de5c4c87021772015efc184d67'] = 'Punkte';
$_MODULE['<{loyalty}prestashop>loyalty_309cd9f5437d1bb06a7fdab1811afe1a'] = 'Dieser Kunde hat keine Punkte';
$_MODULE['<{loyalty}prestashop>loyalty_a240fa27925a635b08dc28c9e4f9216d'] = 'Bestellung';
$_MODULE['<{loyalty}prestashop>loyalty_44749712dbec183e983dcd78a7736c41'] = 'Datum';
$_MODULE['<{loyalty}prestashop>loyalty_aa7f22f84f7be784055a3e7e7d22c519'] = 'Insgesamt (ohne Versandkosten)';
$_MODULE['<{loyalty}prestashop>loyalty_75dd5f1160a3f02b6fae89c54361a1b3'] = 'Punkte';
$_MODULE['<{loyalty}prestashop>loyalty_1026e44f047fb9da36a62c0a8846baac'] = 'Punkte-Status';
$_MODULE['<{loyalty}prestashop>loyalty_01abfc750a0c942167651c40d088531d'] = 'Nr.';
$_MODULE['<{loyalty}prestashop>loyalty_66c2c90ea9f6f4a12854195085781d7f'] = 'Gesamtpunktezahl zur Verfügung:';
$_MODULE['<{loyalty}prestashop>loyalty_928666bdf20510dfa5c58393b77f1798'] = 'Gutschein-Wert:';
$_MODULE['<{loyalty}prestashop>loyalty_a9be824aae4f2381a27b7c699b1e041e'] = 'Warten auf Bestätigung';
$_MODULE['<{loyalty}prestashop>loyalty_78945de8de090e90045d299651a68a9b'] = 'Verfügbar';
$_MODULE['<{loyalty}prestashop>loyalty_4cb08bf5ad3d3c7b010dde725a078b28'] = 'Bereits eingelöst';
$_MODULE['<{loyalty}prestashop>loyalty_df05c2db84dacb19b599b489bf3963db'] = 'Nicht auf Gutscheine anwendbar';
$_MODULE['<{loyalty}prestashop>loyalty_01371a1d58e9234c0b9dbc08cf54fa8b'] = 'Nicht für Rabatte zur Verfügung';
$_MODULE['<{loyalty}prestashop>loyalty_d95cf4ab2cbf1dfb63f066b50558b07d'] = 'Mein Konto';
$_MODULE['<{loyalty}prestashop>loyalty_c540093e64d84440025b2d8201f04336'] = 'Meine Treuepunkte';
$_MODULE['<{loyalty}prestashop>loyalty_5acc2ceeb883ba07cef2d02ea382f242'] = 'Sie haben keine Bestellungen vorgenommen.';
$_MODULE['<{loyalty}prestashop>loyalty_dd1f775e443ff3b9a89270713580a51b'] = 'Zurück';
$_MODULE['<{loyalty}prestashop>loyalty_10ac3d04253ef7e1ddc73e6091c0cd55'] = 'Weiter';
$_MODULE['<{loyalty}prestashop>loyalty_e0aa021e21dddbd6d8cecec71e9cf564'] = 'OK';
$_MODULE['<{loyalty}prestashop>loyalty_6c583afb157e33bfb5b7c3d4114c4dd5'] = 'Artikel:';
$_MODULE['<{loyalty}prestashop>loyalty_c48105520852bbd0fa692e4c9fd61628'] = 'Hier generierte Gutscheine sind in den folgenden Kategorien anwendbar:';
$_MODULE['<{loyalty}prestashop>loyalty_b1c94ca2fbc3e78fc30069c8d0f01680'] = 'Alle';
$_MODULE['<{loyalty}prestashop>loyalty_5b7d558a20e8bcb6d9355a012becb1eb'] = 'Sind Sie sicher, dass Sie Ihre Punkte in Gutscheine umwandeln wollen?';
$_MODULE['<{loyalty}prestashop>loyalty_4db04271e368fe3d4e1aa7332a18fa9d'] = 'Meine Punkte in einen Gutschein im Wert von umwandeln';
$_MODULE['<{loyalty}prestashop>loyalty_b39cba8836db01a04888aef6ba386420'] = 'Meine Gutscheine aus Treuepunkten';
$_MODULE['<{loyalty}prestashop>loyalty_0eceeb45861f9585dd7a97a3e36f85c6'] = 'Erstellt';
$_MODULE['<{loyalty}prestashop>loyalty_689202409e48743b914713f96d93947c'] = 'Wert';
$_MODULE['<{loyalty}prestashop>loyalty_ca0dbad92a874b2f69b549293387925e'] = 'Code';
$_MODULE['<{loyalty}prestashop>loyalty_eb902cf204f3e4dfffeb56d92a9b5c26'] = 'Gültig ab';
$_MODULE['<{loyalty}prestashop>loyalty_b2844b8e17ecaaeae68d018fe9418af0'] = 'Gültig bis';
$_MODULE['<{loyalty}prestashop>loyalty_ec53a8c4f07baed5d8825072c89799be'] = 'Status';
$_MODULE['<{loyalty}prestashop>loyalty_3ec365dd533ddb7ef3d1c111186ce872'] = 'Details';
$_MODULE['<{loyalty}prestashop>loyalty_29aa46cc3d2677c7e0f216910df600ff'] = 'Kostenloser Versand';
$_MODULE['<{loyalty}prestashop>loyalty_cec73b5ce095a59305ad92a0d47495cb'] = 'So verwenden Sie';
$_MODULE['<{loyalty}prestashop>loyalty_019d1ca7d50cc54b995f60d456435e87'] = 'Gebraucht';
$_MODULE['<{loyalty}prestashop>loyalty_2af3bf4c82c5b33875d532820a959799'] = 'Durch diese Befehle erstellt';
$_MODULE['<{loyalty}prestashop>loyalty_d1228f5476d15142b1358ae4b5fa2454'] = 'Bestellung Nr.';
$_MODULE['<{loyalty}prestashop>loyalty_d5797f3bbadc278f756576dafc6ab4b8'] = 'Punkte.';
$_MODULE['<{loyalty}prestashop>loyalty_1f67ea7a0b26e9eacc70523bde28df0c'] = 'mehr ...';
$_MODULE['<{loyalty}prestashop>loyalty_a16cf3ec5200cc519f4fe48e34b1df83'] = 'Die Mindestbestellmenge zur Verwendung dieser Gutscheine beträgt:';
$_MODULE['<{loyalty}prestashop>loyalty_8e69341aca5dbf9f55c2e75a2ed5df3c'] = 'Noch keine Gutscheine.';
$_MODULE['<{loyalty}prestashop>loyalty_00d56a5e37c19c59d521530fc8e7f337'] = 'Noch keine Bonuspunkte.';
$_MODULE['<{loyalty}prestashop>loyalty_0b3db27bc15f682e92ff250ebb167d4b'] = 'Zurück zu Ihrem Konto';
$_MODULE['<{loyalty}prestashop>loyalty_8cf04a9734132302f96da8e113e80ce5'] = 'Start';
$_MODULE['<{loyalty}prestashop>my-account_c540093e64d84440025b2d8201f04336'] = 'Meine Treuepunkte';
$_MODULE['<{loyalty}prestashop>product_ded9088edfbcc1041c3a642b031c8f72'] = 'Treueprogramm';
$_MODULE['<{loyalty}prestashop>product_08ef6b34ab8e7039ef0ee69378f0ac0b'] = 'Sammeln Sie mit dem Kauf dieses Produktes Sie bis zu';
@@ -98,5 +98,3 @@ $_MODULE['<{loyalty}prestashop>shopping-cart_2996152bb442bf98c80c515c6055de5f']
$_MODULE['<{loyalty}prestashop>shopping-cart_b40d5c523ee75453134b1449dd9cd13a'] = 'Treuepunkte';
$_MODULE['<{loyalty}prestashop>shopping-cart_443c3e03e194c2a4cdb107808b051615'] = 'die in einen Gutschein im Wert von umgerechnet werden können';
$_MODULE['<{loyalty}prestashop>shopping-cart_8cec799df06a3f5a026b31fcd95e0172'] = 'Fügen Sie einige Produkte zu Ihrem Warenkorb, um einige Treuepunkte zu sammeln.';
?>
+1
View File
@@ -97,4 +97,5 @@ $_MODULE['<{loyalty}prestashop>shopping-cart_4cd8259257033282f11cc9bbe648dff7']
$_MODULE['<{loyalty}prestashop>shopping-cart_2996152bb442bf98c80c515c6055de5f'] = 'points de fidélité';
$_MODULE['<{loyalty}prestashop>shopping-cart_b40d5c523ee75453134b1449dd9cd13a'] = 'point de fidélité';
$_MODULE['<{loyalty}prestashop>shopping-cart_443c3e03e194c2a4cdb107808b051615'] = 'pouvant être transformé(s) en un bon de réduction de';
$_MODULE['<{loyalty}prestashop>shopping-cart_2d354f4df80bbebf309f184c3953dc1d'] = 'Offre non applicable pour les commandes passées en tant qu\'invité';
$_MODULE['<{loyalty}prestashop>shopping-cart_8cec799df06a3f5a026b31fcd95e0172'] = 'Ajoutez des produits à votre panier pour gagner plus de points de fidélité.';
+36
View File
@@ -0,0 +1,36 @@
<?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$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+17 -14
View File
@@ -324,20 +324,19 @@ class Loyalty extends Module
</div>
<div class="clear"></div>
<label>'.$this->l('Vouchers created by the loyalty system can be used in the following categories :').'</label>';
$html .= '<table cellspacing="0" cellpadding="0" class="table">
<tr>
<th><input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, \'categoryBox[]\', this.checked)" /></th>
<th>'.$this->l('ID').'</th>
<th style="width: 400px">'.$this->l('Name').'</th>
</tr>';
$index = explode(',', Configuration::get('PS_LOYALTY_VOUCHER_CATEGORY'));
$indexedCategories = isset($_POST['categoryBox']) ? $_POST['categoryBox'] : array();
foreach ($indexedCategories AS $k => $row)
$index[] = (int)$row['id_category'];
$html .= $this->recurseCategoryForInclude((int)(Tools::getValue($this->identifier)), $index, $categories, $categories[0][1], 1, NULL);
$html .= ' </table>
$indexedCategories = isset($_POST['categoryBox']) ? $_POST['categoryBox'] : $index;
// Translations are not automatic for the moment ;)
$trads = array(
'Home' => $this->l('Home'),
'selected' => $this->l('selected'),
'Collapse All' => $this->l('Collapse All'),
'Expand All' => $this->l('Expand All'),
'Check All' => $this->l('Check All'),
'Uncheck All' => $this->l('Uncheck All')
);
$html .= '<div class="margin-form">'.Helper::renderAdminCategorieTree($trads, $indexedCategories).'</div>';
$html .= '
<p style="padding-left:200px;">'.$this->l('Mark the box(es) of categories in which loyalty vouchers are usable.').'</p>
<div class="clear"></div>
<h3 style="margin-top:20px">'.$this->l('Loyalty points progression').'</h3>
@@ -527,7 +526,11 @@ class Loyalty extends Module
if (Validate::isLoadedObject($params['cart']))
{
$points = LoyaltyModule::getCartNbPoints($params['cart']);
$smarty->assign(array('points' => (int)$points, 'voucher' => LoyaltyModule::getVoucherValue((int)$points)));
$smarty->assign(array(
'points' => (int)$points,
'voucher' => LoyaltyModule::getVoucherValue((int)$points),
'guest_checkout' => (int)Configuration::get('PS_GUEST_CHECKOUT_ENABLED')
));
}
return $this->display(__FILE__, 'shopping-cart.tpl');
+9 -1
View File
@@ -26,6 +26,14 @@
<!-- MODULE Loyalty -->
<p id="loyalty">
<img src="{$module_template_dir}loyalty.gif" alt="{l s='loyalty' mod='loyalty'}" class="icon" />{if $points > 0}{l s='By checking out of this shopping cart you can collect up to' mod='loyalty'} <b>{$points} {if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b> {l s='that can be converted into a voucher of' mod='loyalty'} {convertPrice price=$voucher}.{else}{l s='Add some products to your shopping cart to collect some loyalty points.' mod='loyalty'}{/if}
<img src="{$module_template_dir}loyalty.gif" alt="{l s='loyalty' mod='loyalty'}" class="icon" />
{if $points > 0}
{l s='By checking out of this shopping cart you can collect up to' mod='loyalty'} <b>{$points}
{if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b>
{l s='that can be converted into a voucher of' mod='loyalty'} {convertPrice price=$voucher}{if isset($guest_checkout) && $guest_checkout}<sup>*</sup>{/if}.<br />
{if isset($guest_checkout) && $guest_checkout}<sup>*</sup> {l s='Not available for Instant checkout order' mod='loyalty'}{/if}
{else}
{l s='Add some products to your shopping cart to collect some loyalty points.' mod='loyalty'}
{/if}
</p>
<!-- END : MODULE Loyalty -->