Post by dony_b » Tue Sep 09, 2014 1:52 am

Im looking to only show the discounted price if a customer group(wholesale) is logged in.

Current OC setup is like this:

Code: Select all

<span class="price-old">$119.50</span> <span class="price-new">$107.75</span>
Im looking to achieve this but only for certain logged in customer group:

Code: Select all

<span class="price-new">$107.75</span>
If [wholesale customer group] is [logged in] show prices discounted but not for the retail group.

Thanks in advance.
Last edited by dony_b on Wed Sep 10, 2014 1:44 am, edited 1 time in total.

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA

Post by SXGuy » Tue Sep 09, 2014 2:30 am

Something like

Code: Select all

<?php if ($this->customer->IsLogged && $this->customer->group['group_name']) { ?>
<span class="price-new">$107.75</span>
<?php  } else { ?>
<span class="price-old">$119.50</span> <span class="price-new">$107.75</span> 
<?php } ?>
Just a theory, would need to test and maybe make some alterations.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by dony_b » Tue Sep 09, 2014 4:10 am

So is this just an idea or it can be implemented ?

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA

Post by SXGuy » Tue Sep 09, 2014 11:18 pm

Its an idea, that should work, if you give it a little help. I don't have time to help you other than give you an idea.

However the above script is wrong its more likely to work if it looked like this

Code: Select all

<?php if ($this->customer->IsLogged && $data['customer_group_id'] = 'Group Name') { ?>
<span class="price-new">$107.75</span>
<?php  } else { ?>
<span class="price-old">$119.50</span> <span class="price-new">$107.75</span> 
<?php } ?>
$data['customer_group_id'] = ''Group Name' is the part that would need altering if it doesn't work. Someone else really needs to butt in here and help as I don't have time to work out a correct method for you, I can only give you ideas.

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by dony_b » Wed Sep 10, 2014 1:44 am

Great thanks

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA
Who is online

Users browsing this forum: No registered users and 143 guests