Special customers

18237596_ml-1280x720

In most of the online stores are different groups that are assigned different discounts. We will create a special group of customers and we will notify you when they login on the website

 

 

And add the part of code yellow, the name and id of the code will depend on the corresponding

Customers   Edit • lonelite
We located this route

modules/blockuserinfo/blockuserinfo.php

 

We add the part of code yellow, the name and id of the code will depend on the corresponding

 

$this->smarty->assign(array(
'cart' => $this->context->cart,
'cart_qties' => $this->context->cart->nbProducts(),
'logged' => $this->context->customer->isLogged(),
'customerName' => ($this->context->customer->logged ? $this->context->customer->
firstname.' '.$this->context->customer->lastname : false),
'firstName' => ($this->context->customer->logged ? $this->context->customer->firstname : false),
'lastName' => ($this->context->customer->logged ? $this->context->customer->lastname : false),
'specialcustomer' =>($this->context->customer->logged AND (Customer::getDefaultGroupId((int)$this->context->customer->id) == 4) ? true : false),
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order'
));
return $this->display(__FILE__, 'blockuserinfo.tpl');

Now we located this route

themes/default-bootstrap/modules/blockuserinfo/nav.tpl

we add the part of code yellow, the name and id of the code will depend on the corresponding

{if $is_logged}
 <div class="header_user_info">
 <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow"><span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span>{if $specialcustomer}<span id="logout_special">{l s='Profesional customer ' mod='blockuserinfo'}</span></span>{/if}</a>
 </div>
{/if}
<div class="header_user_info">
 {if $is_logged}

 <a class="logout" href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Log me out' mod='blockuserinfo'}">
 {l s='Sign out' mod='blockuserinfo'}
 </a>
 {else}
 <a class="login" href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Login to your customer account' mod='blockuserinfo'}">
 {l s='Sign in' mod='blockuserinfo'}
 </a>
 {/if}
</div>

 

A bit of CSS

#logout_special {
    margin-left: 10px;
    color: #ffd600;
   
}

 
And this is the result

Printed Dress   lonelite

Posted on 04/05/2014 in Prestashop

Share the Story

About the Author

Leave a reply

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Back to Top