Post by tbl » Thu Feb 01, 2018 4:56 am

I do have a clean installation of OC 3.0.2.0 and did create 2 customer groups.

Group A linked with tax rates, tax classes etc.
Group B without linking it to any tax.

On the catalog side everything is just fine and the order is processed the right way, with or without tax depending on the group the customer is in.

But when I try to create a order on the admin side as a customer in group B the order is processed as a group A customer.

Is anyone experiencing the same problem?

tbl
Newbie

Posts

Joined
Thu Feb 01, 2018 4:24 am

Post by straightlight » Sat Feb 03, 2018 5:56 am

Ensure to configure your customer group default settings in your admin - > systems - > settings - > edit settings page. No idea on why this topic has been created in the bug reports.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by daniGo » Sat Feb 03, 2018 3:46 pm

This is an annoying problem in opencart. If you look the code in https://github.com/opencart/opencart/bl ... er.php#L57:

Code: Select all

// Customer Group
			if (is_array($this->config->get('config_customer_group_display')) && in_array($this->request->post['customer_group_id'], $this->config->get('config_customer_group_display'))) {
				$customer_group_id = $this->request->post['customer_group_id'];
			} else {
				$customer_group_id = $this->config->get('config_customer_group_id');
			}
This should be:

Code: Select all

// Customer Group
			if ($this->request->post['customer_group_id']) {
				$customer_group_id = $this->request->post['customer_group_id'];
			} else {
				$customer_group_id = $this->config->get('config_customer_group_id');
			}
If you have three groups:

A. Regular customer
B. Company
C. Gold customer

A and B are available at registration. Group C is internal, with special discounts and is not shown when registering. When editing or creating new order in the admin side, Opencart overlooks this group because it is not available for registration and uses the default group. This is a restriction on the use of customer groups.

http://www.gombac.si


Active Member

Posts

Joined
Wed Mar 20, 2013 4:49 pm
Location - Slovenia

Post by straightlight » Sat Feb 03, 2018 10:56 pm

if ($this->request->post['customer_group_id']) {
for:

Code: Select all

if (!empty($this->request->post['customer_group_id'])) {

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tbl » Mon Feb 05, 2018 1:26 am

Thank you for quick the support!

This is just a part of the solution because there appearce to be another problem on this page.

I have assigned a required custom field to Customer Group B.
This custom field is filled with the right input but OC says "Custom Field required!".

When I uncheck the required checkbox on the Custom Field page I'm able to continue to step 2 (products) on the Add Order page.

So there seems to be someting wrong with the check of custom fields linked to specific customer groups.

As I can see this is also handled in: api/customer.php

Is someone able to check it for me?
Last edited by tbl on Mon Feb 05, 2018 2:10 am, edited 1 time in total.

tbl
Newbie

Posts

Joined
Thu Feb 01, 2018 4:24 am

Post by straightlight » Mon Feb 05, 2018 1:31 am

This is just a part of the solution because there is another problem on this page.
Please post the complete inquiry all-in-one; all together so to avoid splitting the requests.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tbl » Mon Feb 05, 2018 2:12 am

straightlight wrote:
Mon Feb 05, 2018 1:31 am
This is just a part of the solution because there is another problem on this page.
Please post the complete inquiry all-in-one; all together so to avoid splitting the requests.
This problem just appeared after solving the customer group selection problem.
So I think this is related to the earlier fix.

tbl
Newbie

Posts

Joined
Thu Feb 01, 2018 4:24 am

Post by straightlight » Mon Feb 05, 2018 2:21 am

What are the step-by-step process you're using in order to obtain the results you are implying above when you do not use the provided codes above?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by tbl » Mon Feb 05, 2018 3:50 am

straightlight wrote:
Mon Feb 05, 2018 2:21 am
What are the step-by-step process you're using in order to obtain the results you are implying above when you do not use the provided codes above?
After testing it with a clean install of OC this issue is not related to this topic issue.
So I created a new topic for this required custom field issue: viewtopic.php?f=201&t=201860#p712954

tbl
Newbie

Posts

Joined
Thu Feb 01, 2018 4:24 am
Who is online

Users browsing this forum: gsc1ugs and 44 guests