[+] Project : default theme added
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10862 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
@@ -33,7 +33,6 @@ require_once(dirname(__FILE__).'/../../init.php');
|
||||
|
||||
include_once(dirname(__FILE__).'/LoyaltyModule.php');
|
||||
include_once(dirname(__FILE__).'/LoyaltyStateModule.php');
|
||||
include_once(dirname(__FILE__).'/loyalty.php');
|
||||
|
||||
$context = Context::getContext();
|
||||
if (!$context->customer->isLogged())
|
||||
@@ -60,20 +59,20 @@ if (Tools::getValue('transform-points') == 'true' AND $customerPoints > 0)
|
||||
$cartRule->reduction_amount = LoyaltyModule::getVoucherValue((int)$customerPoints);
|
||||
$cartRule->quantity = 1;
|
||||
$cartRule->quantity_per_user = 1;
|
||||
|
||||
/* If merchandise returns are allowed, the voucher musn't be usable before this max return date */
|
||||
|
||||
/* If merchandise returns are allowed, the voucher musn't be usable before this max return date */
|
||||
$dateFrom = Db::getInstance()->getValue('
|
||||
SELECT UNIX_TIMESTAMP(date_add) n
|
||||
FROM '._DB_PREFIX_.'loyalty
|
||||
FROM '._DB_PREFIX_.'loyalty
|
||||
WHERE id_cart_rule = 0 AND id_customer = '.(int)$cookie->id_customer.'
|
||||
ORDER BY date_add DESC');
|
||||
|
||||
|
||||
if (Configuration::get('PS_ORDER_RETURN'))
|
||||
$dateFrom += 60 * 60 * 24 * (int)Configuration::get('PS_ORDER_RETURN_NB_DAYS');
|
||||
|
||||
$cartRule->date_from = date('Y-m-d H:i:s', $dateFrom);
|
||||
$cartRule->date_to = date('Y-m-d H:i:s', $dateFrom + 31536000); // + 1 year
|
||||
|
||||
|
||||
$cartRule->minimum_amount = (float)Configuration::get('PS_LOYALTY_MINIMAL');
|
||||
$cartRule->active = 1;
|
||||
|
||||
@@ -85,13 +84,13 @@ if (Tools::getValue('transform-points') == 'true' AND $customerPoints > 0)
|
||||
|
||||
$languages = Language::getLanguages(true);
|
||||
$default_text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)Configuration::get('PS_LANG_DEFAULT'));
|
||||
|
||||
|
||||
foreach ($languages AS $language)
|
||||
{
|
||||
$text = Configuration::get('PS_LOYALTY_VOUCHER_DETAILS', (int)$language['id_lang']);
|
||||
$cartRule->name[(int)$language['id_lang']] = $text ? strval($text) : strval($default_text);
|
||||
}
|
||||
|
||||
|
||||
if (is_array($categories) AND sizeof($categories))
|
||||
$cartRule->add(true, false, $categories);
|
||||
else
|
||||
@@ -153,14 +152,13 @@ else
|
||||
$categoriesNames = Tools::truncate(implode(', ', $categoriesNames), 100).'.';
|
||||
else
|
||||
$categoriesNames = null;
|
||||
}
|
||||
}
|
||||
$smarty->assign(array(
|
||||
'nbDiscounts' => (int)$nbDiscounts,
|
||||
'discounts' => $discounts,
|
||||
'minimalLoyalty' => (float)Configuration::get('PS_LOYALTY_MINIMAL'),
|
||||
'categories' => $categoriesNames));
|
||||
|
||||
$loyalty = new Loyalty();
|
||||
echo $loyalty->display(dirname(__FILE__).'/loyalty.php', 'loyalty.tpl');
|
||||
echo Module::display(dirname(__FILE__).'/loyalty.php', 'loyalty.tpl');
|
||||
|
||||
include(dirname(__FILE__).'/../../footer.php');
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7310 $
|
||||
* @version Release: $Revision: 8084 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
@@ -194,6 +194,6 @@ $(document).ready(function()
|
||||
{/if}
|
||||
|
||||
<ul class="footer_links">
|
||||
<li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /></a><a href="{$link->getPageLink('my-account', true)}">{l s='Back to Your Account' mod='loyalty'}</a></li>
|
||||
<li><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /></a><a href="{$base_dir}">{l s='Home' mod='loyalty'}</a></li>
|
||||
<li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /></a><a href="{$link->getPageLink('my-account.php', true)}">{l s='Back to Your Account' mod='loyalty'}</a></li>
|
||||
<li class="f_right"><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /></a><a href="{$base_dir}">{l s='Home' mod='loyalty'}</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6844 $
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- MODULE Loyalty -->
|
||||
<li><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='My loyalty points' mod='loyalty'}"><img src="{$module_template_dir}loyalty.gif" alt="{l s='My loyalty points' mod='loyalty'}" class="icon" /></a><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='My loyalty points' mod='loyalty'}">{l s='My loyalty points' mod='loyalty'}</a></li>
|
||||
<li class="loyalty"><a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='My loyalty points' mod='loyalty'}"><img src="{$module_template_dir}images/loyalty.gif" alt="{l s='My loyalty points' mod='loyalty'}" class="icon" /> {l s='My loyalty points' mod='loyalty'}</a></li>
|
||||
<!-- END : MODULE Loyalty -->
|
||||
@@ -19,13 +19,12 @@
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6844 $
|
||||
* @version Release: $Revision: 6594 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<p id="loyalty" class="align_justify">
|
||||
<img src="{$module_template_dir}loyalty.gif" alt="{l s='Loyalty program' mod='loyalty'}" class="icon" />
|
||||
{if $points}
|
||||
{l s='By buying this product you can collect up to' mod='loyalty'} <b><span id="loyalty_points">{$points}</span>
|
||||
{if $points > 1}{l s='loyalty points' mod='loyalty'}{else}{l s='loyalty point' mod='loyalty'}{/if}</b>.
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 6844 $
|
||||
* @version Release: $Revision: 7208 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<!-- MODULE Loyalty -->
|
||||
<p id="loyalty">
|
||||
<img src="{$module_template_dir}loyalty.gif" alt="{l s='loyalty' mod='loyalty'}" class="icon" />
|
||||
<img src="{$module_template_dir}images/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>
|
||||
|
||||
Reference in New Issue
Block a user