fix conflict in css

This commit is contained in:
Marion Muszynski 2016-05-03 15:40:01 +02:00
commit 2a10c6a2fe
4 changed files with 35 additions and 5 deletions

View File

@ -67,8 +67,13 @@ class BlockUserInfo extends Module
$display_credits = false;
}
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql);
$smarty->assign(array(
'display_credits' => $display_credits,
'loyalties' => ($loyalties)?$loyalties:0,
'cart' => $cart,
'cart_qties' => $cart->nbProducts(),
'logged' => $cookie->isLogged(),

View File

@ -41,8 +41,14 @@ Tools::addCSS(_PS_CSS_DIR_.'jquery.cluetip.css', 'all');
Tools::addJS(array(_PS_JS_DIR_.'jquery/jquery.dimensions.js',_PS_JS_DIR_.'jquery/jquery.cluetip.js'));
$displayorders = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), false, true, ((int)(Tools::getValue('n')) > 0 ? (int)(Tools::getValue('n')) : 10), ((int)(Tools::getValue('p')) > 0 ? (int)(Tools::getValue('p')) : 1));
$orderToConvert = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), true, false, $nb = 10, $page = 1);
$total_discount = LoyaltyModule::getVoucherValueByPercentOfOrder($orderToConvert, (int)($cookie->id_currency));
//$orderToConvert = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), true, false, $nb = 10, $page = 1);
//$total_discount = LoyaltyModule::getVoucherValueByPercentOfOrder($orderToConvert, (int)($cookie->id_currency));
$total_discount = Db::getInstance()->getValue('
SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty`
WHERE `id_loyalty_state`=2
AND `id_discount`=0
AND `id_customer` = ' .(int) $cookie->id_customer
);
/* transform point into voucher if needed */
if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0)
@ -106,6 +112,7 @@ if (Tools::getValue('transform-points') == 'true' AND $total_discount > 0)
$voucher->add();
/* Register order(s) which contributed to create this voucher */
$orderToConvert = LoyaltyModule::getAllByIdCustomerCustom((int)($cookie->id_customer), (int)($cookie->id_lang), true, false, $nb = 10, $page = 1);
LoyaltyModule::registerDiscountCustom($voucher, $orderToConvert);
Tools::redirect('modules/loyalty/loyalty-program.php');

View File

@ -6026,6 +6026,11 @@ div#giftvoucher_ask_infos_block .gv_customization > .gv_param input {
background: #F3F3F3;
}
#loyalty_cart{
background: url("../img/fidelite.png") no-repeat left center;
}
@keyframes slideInDown {
0% {
-webkit-transform: translateY(-500px);

View File

@ -55,9 +55,22 @@
</div>
{if $display_credits}
<div class="inner">
<a href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
</a>
<ul>
<li class="account_hover">
<a class="submenu_top_btn" href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Sponsor your friends' mod='blockuserinfo'}">{l s='Your credit:' mod='blockuserinfo'}</a>
<ul class="submenu_top">
<li>
<a href="{$base_dir_ssl}modules/invite/invite-program.php" title="{l s='Orders' mod='blockuserinfo'}">
<span class="desc">{l s='Your credit:' mod='blockuserinfo'} <span class="green">{$customer_credit}</span></span>
</a>
</li>
<li>
<a href="{$base_dir_ssl}modules/loyalty/loyalty-program.php" title="{l s='Loyalty program' mod='blockuserinfo'}">
<span class="desc">{l s='Loyalty:' mod='blockuserinfo'} <span class="green">{convertPrice price=$loyalties}</span></span>
</a>
</li>
</ul>
</li>
</div>
{/if}
</div>