I would like to make a modification and I'm not sure how to do it.
I have two customer groups: Retail and Wholesale. Retail is normal pricing, Wholesale is less 25%. All of the prices have been set but when a Wholesale customer is logged in, they only see their discounted pricing, not the retail price.
Is it possible to make is so that both the retail price and wholesale price are displayed when a Wholesale customer is logged in?
I want to do this so it's easy for the Wholesale customer to see their price, plus the retail price without having to do the calculation themselves.
Thanks.
I have two customer groups: Retail and Wholesale. Retail is normal pricing, Wholesale is less 25%. All of the prices have been set but when a Wholesale customer is logged in, they only see their discounted pricing, not the retail price.
Is it possible to make is so that both the retail price and wholesale price are displayed when a Wholesale customer is logged in?
I want to do this so it's easy for the Wholesale customer to see their price, plus the retail price without having to do the calculation themselves.
Thanks.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Just run a check for a customer group when checking to see if logged in:
Here is your login check:
And here is some code to handle the customer groups:
Now you can specify a group by either group ID or group name in your TPL:
Just run a foreach loop to iterate and pull the value you want:
Here is your login check:
Code: Select all
if (!$this->customer->isLogged()) {
Code: Select all
$this->load->model('account/customer_group');
$this->data['customer_groups'] = array();
if (is_array($this->config->get('config_customer_group_display'))) {
$customer_groups = $this->model_account_customer_group->getCustomerGroups();
foreach ($customer_groups as $customer_group) {
if (in_array($customer_group['customer_group_id'], $this->config->get('config_customer_group_display'))) {
$this->data['customer_groups'][] = $customer_group;
}
}
}
Just run a foreach loop to iterate and pull the value you want:
Code: Select all
<?php foreach ($customer_groups as $customer_group) { ?>
Thanks Avvici, I'm sure the info there would do the job but I need a bit more guidance. I'm assuming those first two bits of code are already in in the controller file/s?
And then what exactly do I do with the last piece of code? The customer_group_id is 10.
And then what exactly do I do with the last piece of code? The customer_group_id is 10.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Does it start something like this:
Code: Select all
<?php if ($price) { ?>
<div class="price">
<?php foreach ($customer_groups as $customer_group) { ?>
<?php if ($customer_group['id'] == '10') { ?>
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Following this as I'd be keen to implement this on my site too. It'd be a good feature so trade customers can straight away see how much they're saving at a glance.
Avvici, let me know if you make a vQmod for this. You've got me on Skype already so give me a shout
Avvici, let me know if you make a vQmod for this. You've got me on Skype already so give me a shout
Avvici - thanks, I'll see if I can Skype you today or tomorrow. What's your time zone?
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Who is online
Users browsing this forum: No registered users and 206 guests