Post by sandraolt » Fri Aug 21, 2020 6:27 am

How can I make the customer group price stay the same when a "guest" customer adds a shipping address to checkout?
Right now it changes from the customer group price (assigned to store) to default price.

New member

Posts

Joined
Thu Aug 01, 2013 2:51 am

Post by by mona » Fri Aug 21, 2020 6:40 am

I am a little confused about this, maybe its me, it has been along day ..
How are they logged in to get a customer group price, but checking out as guest?
Surely the default is guests and the logged in is the customer group?
Am I missing something here?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by sandraolt » Fri Aug 21, 2020 11:07 pm

I have several stores, and each store has it's own customer group for prices.
It works great if there is no shipping address entered, but if the product requires shipping, and the shipping address is different from the payment address the prices changes to the price in the default customer group, instead of remaining the store/customer group price.

New member

Posts

Joined
Thu Aug 01, 2013 2:51 am

Post by by mona » Fri Aug 21, 2020 11:18 pm

Hi,

So the customer is still logged in and just uses a different shipping address?
I have just tested that and nope - different address / country the price stays.

Which OC version and checkout / theme?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by sandraolt » Fri Aug 21, 2020 11:31 pm

Hi ,
The customer rarely logs in, and may visit a different store each time he purchases so logging in and being locked into a single customer group doesn't really work for us.
I am in Version 3.0.3.2
Here is an example of one of my stores/products with this issue.
https://polk.oltraining.com/index.php?r ... duct_id=14
When you add the product to cart the price is $300, if you add a shipping address (on our site we call it a student address) the price goes up.
(Uncheck to see what I mean) [] I am the student and this billing address is also my home address.

New member

Posts

Joined
Thu Aug 01, 2013 2:51 am

Post by sandraolt » Sat Aug 22, 2020 12:11 am

The price seems to be controlled by this code which and be found

Code: Select all

	if ($this->customer->isLogged() || !$this->config->get('config_customer_price')) {
			$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
				} else {
					$price = false;
					
in all of these files
/catalog/controller/blog/article.php
/catalog/controller/extension/module/bestseller.php
/catalog/controller/extension/module/latest.php
/catalog/controller/extension/module/special.php
/catalog/controller/product/category.php
/catalog/controller/product/manufacturer.php
/catalog/controller/product/product.php
/catalog/controller/product/quickview.php
/catalog/controller/product/search.php
/catalog/controller/product/special.php
/catalog/controller/search/autocomplete.php

New member

Posts

Joined
Thu Aug 01, 2013 2:51 am

Post by letxobnav » Sat Aug 22, 2020 12:22 am

all that code does is show prices only if a customer is signed in or if you allow prices to show for guests, nothing more.
as in:

Attachments

Capture.JPG

Capture.JPG (9.77 KiB) Viewed 392 times

Last edited by letxobnav on Sat Aug 22, 2020 12:26 am, edited 1 time in total.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by by mona » Sat Aug 22, 2020 12:23 am

Contact theme developer / quick checkout developer
alternatively post for someone to quote in the commercial section viewforum.php?f=88

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by sandraolt » Sat Aug 22, 2020 12:46 am

And if I am reading this right on controller/settings/store.php

Code: Select all

		if (isset($this->request->post['config_customer_price'])) {
			$data['config_customer_price'] = $this->request->post['config_customer_price'];
		} elseif (isset($store_info['config_customer_price'])) {
			$data['config_customer_price'] = $store_info['config_customer_price'];
		} else {
			$data['config_customer_price'] = '';
		}
		
Should be telling whether to use the store price, or the customer group price.
But I can't seem to make it always use the store price.

New member

Posts

Joined
Thu Aug 01, 2013 2:51 am

Post by letxobnav » Sat Aug 22, 2020 2:05 pm

that code is just part of the logic to adjust the switch in admin which determines whether to display prices only for signed in customers or for everybody.

You can post code snipplets from now till christmas, but it is futile if you do not know what the code actually does or whether it is even relevant.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: Bing [Bot], daniil_oc, OSWorX, pprmkr and 480 guests