Post by mikeinterserv » Mon Jan 23, 2023 11:09 pm

As above I have someone who has set up customer groups for trade and distributors as well as the default group.
Everything seems OK however the default group can see trade and distributor options on GUEST CHEKOUT BILLING DETAILS.
They are then able to select one of these and get the pricing of those two trade groups.

Did I miss something obvious.
The default group should NOT be able to see or select these options here.

OC 3.0.3.6 - Default theme, hardly any extensions, certainly none that would affect this.
Paypal standard and bank transfer are the ONLY payment options.
Any pointers before I trawl through would be appreciated.
Last edited by mikeinterserv on Wed Jan 25, 2023 11:34 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ADD Creative » Tue Jan 24, 2023 12:07 am

Are the trade groups unticked in the Customer Groups section of the setting under the Option tab?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Tue Jan 24, 2023 12:08 am

You'd probably have to modify the catalog/view/theme/<your-theme>/checkout/guest.twig file, e.g. to have amongst others this in there:

Code: Select all

      <div class="form-group" style="display:none;">
        <input type="hidden" name="customer_group_id" value="{{ config_customer_group_id }}" />
      </div>
And in the corresponding controller at catalog/controller/checkout/guest.php add this:

Code: Select all

$data['config_customer_group_id'] = $this->config->get('config_customer_group_id');
I'd do these modifications via event handlers, though you could also use OCmod for this.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by mikeinterserv » Tue Jan 24, 2023 4:16 am

ADD Creative wrote:
Tue Jan 24, 2023 12:07 am
Are the trade groups unticked in the Customer Groups section of the setting under the Option tab?
Well if they are unchecked then the option is no longer available in REGISTRATION for those groups. Which it obviously needs to be.
Like I say I get the feeling I am missing something stupidly obvious here.
The groups DO NOT show up when LOGGED IN as a user. They only appear in guest checkout.
I can't believe this didn't come up before but I had no luck searching.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by mikeinterserv » Tue Jan 24, 2023 4:19 am

JNeuhoff wrote:
Tue Jan 24, 2023 12:08 am
You'd probably have to modify the catalog/view/theme/<your-theme>/checkout/guest.twig file, e.g. to have amongst others this in there:
Thanks for that
As I have said I was hoping it was something obvious I had missed, I can't believe it works this way as is.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ADD Creative » Tue Jan 24, 2023 8:17 am

mikeinterserv wrote:
Tue Jan 24, 2023 4:16 am
Well if they are unchecked then the option is no longer available in REGISTRATION for those groups. Which it obviously needs to be.
Like I say I get the feeling I am missing something stupidly obvious here.
The groups DO NOT show up when LOGGED IN as a user. They only appear in guest checkout.
I can't believe this didn't come up before but I had no luck searching.
Yes, the option does affect both guest checkout and registration. So you would either manually set the customer group for a trade customer after they have registered or modify the guest checkout form to remove the customer group option.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Tue Jan 24, 2023 9:03 pm

mikeinterserv wrote:
Tue Jan 24, 2023 4:19 am
As I have said I was hoping it was something obvious I had missed, I can't believe it works this way as is.
So is the issue fixed?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by mikeinterserv » Wed Jan 25, 2023 11:28 pm

paulfeakins wrote:
Tue Jan 24, 2023 9:03 pm
So is the issue fixed?
Yes - just used the code provided by J Neuhoff as is.
Cut the customer group code that was there in each file and pasted the new.
I still can't believe it would work this way though.

Thanks for the input from everybody.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by ADD Creative » Thu Jan 26, 2023 5:39 am

mikeinterserv wrote:
Wed Jan 25, 2023 11:28 pm
I still can't believe it would work this way though.
It's needed it some situations for tax calculations, such as a VAT registered customer group being needed at the guest checkout. What is probably needed is the option to select which groups appear at which checkout.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 102 guests