No Gross Price on product after 2.3.5 upgrade

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186289

-- HikaShop version -- : 2.3.5 Business edition
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : No errormessage

Hi,

A few month ago you helped me with displaying multiple prices ( www.hikashop.com/forum/customers/871006-...-product-prices.html ). Gross price for All users and nett price for logged in partners.
This worked great untill I upgraded from Hikashop 2.3.4 to 2.3.5. After the upgrade the presentation of the Gross price disappeared (see attached files (before and after)





How can I solve this???

Regards,

Benny

Attachments:
Last edit: 10 years 4 months ago by bp54.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #186290

Hi,

Please give us more details about what were done to display this gross price before.

We don't think we changed anything about that in the 2.3.5. I you made some view overrides, you have maybe lost them.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186391

Hi Xavier,

As far as I find in my documentation both prices were presented from the beginning. The Gross Price has access level All and the Nett Price has access level Partners. On the product page both prices were presented then without any override as far as I can find.
The override was created only for the text before the Nett Price 'Uw nettoprijs: '
This override was made in the frontend>product > listing_price
In this file line 45 was commented out;

//echo JText::_('PRICE_BEGINNING');
Line 57 was inserted;
if($price->price_access != 'all' && $this->params->get('from','content') != module)  echo '<br/>Uw nettoprijs: ';
This override still exist.

So I do not understand why the Gross price is not shown after the upgrade, where in the 2.3.4 version it was okay.
Did you maybe change something in the access control that can be causing this issue?
We did not make any other changes. Only the upgrade to 2.3.5.

Regards,

Benny.

Last edit: 10 years 4 months ago by bp54. Reason: extra info

Please Log in or Create an account to join the conversation.

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
10 years 4 months ago #186398

Hi,

HikaShop automatically calculate the net price out of the gross price based on your tax rules. So there is no need to enter both in your products. If you do, it's normal that it doesn't work properly and we can't guarantee that the behavior won't change in the future as it is not supposed to be like that.
Normally, you set the gross price in your product and select your tax category. You have tax rule on that tax category and HikaShop calculates automatically the net price out of all this.
And then, on the product page, it will display, one or the other, or both, based on how you configured the "show taxed prices" option of the HikaShop configuration.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186437

Very sorry Nicolas, I think I used the wrong terms Gross and Nett. It has notthing to do with Tax.

We have two prices configured for each product. One price that is presented to ALL and a second price for logged in users from the Joomla group Partners.
When a Partner was logged in (version 2.3.4) he used to see the product layout with both prices as shown in the first attached screenshot.
After the ugrade, only the reduced price for Partners is shown (second screenshot).

I hope I did explain it correct now.

Regards, Benny

Last edit: 10 years 4 months ago by bp54.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186456

Hi,

Just to be sure, I made a clean install of Joomla 3.3.6 with a default Joomla template and installed Hikashop 2.3.3 Business on it with standard products from Hikashop.
In Joomla I created a group Partners.
On the product Macbook pro i configured an extra price with acces for the Partner group only. (attachment 1)
Now I see two prices on the product Macbook pro (attachment 2)
Then I upgraded version 2.3.3 to 2.3.5
Now on the Macbook pro you only find one price (the price for the Partners).
The price for ALL is missing. (attachment 3)

How come?

Regards,

Benny.

Attachments:
Last edit: 10 years 4 months ago by bp54.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 4 months ago #186476

Hello,
Your issue is probably coming from how you configured your "Price display method" option via "Hikashop->System->Configuration->Display".

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186609

Hi Mohamed,

Did you read my previous message where I explained that I reproduced the issue with a clean install of Hikashop on a clean Joomla environment with all Hikashop settings default. The price presentation changed after the upgrade without touching the configuration.
So if something has to be reconfigured after the upgrade to 2.3.5 then please let me know what has changed and how to reconfigure things after the upgrade.

Regards, Benny.

Please Log in or Create an account to join the conversation.

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
10 years 4 months ago #186650

Hi,

Thank you for your explanations. Indeed, it's not gross/net prices but access level restricted prices.
When you restrict a price to a user group, the price will be displayed/usable only by customers of that user group.
That's how it should be and always has been as far as I remember.
Maybe it was a bug of the 2.3.3 which made it display the prices for a user group which shouldn't see it (probably because the user groups have a parent/child relation that wasn't taken into account properly before).
But in that case, if you want the same behavior with the 2.3.5, you should select only one user group for one of the prices and the two user groups for the other price.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186753

Thanks Nicolas,

No matter how I configure the acces for the prices, In version 2.3.5 I cannot manage to see both prices when logged in as a partner.
I set access level on the highest price (for everyone) to ALL. So that includes partners.
I set the acces level on the lowest price (only visible for partners) to Partners.
I also tested with Guest and Partners on the highest price.
In these cases Partners should see both prices I presume. But partners only see the lowest price and the rest of the world (not logged in) sees the highest price.

Also when I set access on both prices to ALL only one price (lowest) is shown.

It looks like the default Hikashop configuration version 2.3.5 does not detect that there are several prices on a product or cannot handle the hikashop_product_several_prices class that I see in 2.3.3

Do you have the possibility to reproduce this with a clean installation of 2.3.5 without changing the configuration.

Thanks for your help in advance.

Regards, Benny.

Please Log in or Create an account to join the conversation.

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
10 years 4 months ago #186775

Hi,

It's not a matter of HikaShop not seeing several prices. It's matter that this is a trick that you're using so far which is not normal so the behavior can potentially change.
You should never have several prices displayed for a product because then HikaShop doesn't know which one should be chosen. If you have price X and price Y for the same product then once the add the product to the cart, HikaShop will have to pick one of them randomly to use for the calculations. So normally, you should not setup several prices with the same currency/minimum quantity/user group as you are not guaranteed to know which one will be displayed/used.
If you want to display one price for a user group and a reduced one to be used for another user group, the proper method is to have only one price in the product without any access level configured in it and then create one discount limited to the partners user group so that only them have the discount applied to the price of the product. And finally, you can set the "show discounted prices" option of the HikaShop configuration to display the price before discount. That way, you'll get two prices on the product page for the users from the partner user group, the system will automatically used the discounted price for the calculations for them, and everyone else will only see the original price.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 8
10 years 4 months ago #186822

Okay Nicolas, thats a clear statement. We will discuss how we will proceed.
I think the best way is to create discount categories and add the relevant products to this categories. Then we will create discounts for each of these categories and restrict access to partners.
Can you please confirm that this is a safe way to go.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 4 months ago #186824

Hi,

That sounds like a good plan.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 0
10 years 4 months ago #187296

Hi,

This change surprised me too! I have two sets of customers on my site, retail and wholesale. Retailers only see and buy using one price. For wholesalers I used to display 2 prices up to now (using ACLs as you had told me in another post). I wanted them to see what the retail price is. The system would then always use the lower wholesale price in the cart. This was working well.

I then upgraded to 2.3.5 and I hadn't realised that the system was not showing the two prices anymore! And the upgrade had also changed the setting of Price Display Method from all to cheapest.

I see your suggestion for using discounts but I like my prices rounded up. Is there any way I could have the field "Retail price" (mspr) only showing for one user group, my wholesale users?

Please advise as we are in high season.

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 83894
  • Thank you received: 13581
  • MODERATOR
10 years 4 months ago #187342

Hi,

Yes, that would be a solution as it only requires a slight modification of the code in the product view.
Change the code:
isset($this->row->product_msrp)
to:
isset($this->row->product_msrp) && !empty($msrp_display)

in the file "listing_price" of the view "product" via the menu Display>Views and add the code below at the beginning of the same file:

<?php $user = JFactory::getUser();
jimport('joomla.access.access');
$userGroups = JAccess::getGroupsByUser($user->id, true);
$key = array_search($retailers_group_id, $userGroups);
if(is_int($key)){ $msrp_display = true; }
?>
where $retailers_group_id should be replaced by the id of the user group for which the retail price should be displayed.

Last edit: 10 years 4 months ago by Jerome. Reason: code fix
The following user(s) said Thank You: boussog1

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 0
10 years 4 months ago #187450

Thanks for this. The first part works (price display) but the when trying to get the user group, the $key does not return anything. Double checked id's and user.

Please Log in or Create an account to join the conversation.

  • Posts: 26243
  • Thank you received: 4038
  • MODERATOR
10 years 4 months ago #187478

Hi,

Are you sure that the variable

$retailers_group_id
Is right defined (with the ID (number) of the user group you want to check) ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 64
  • Thank you received: 0
10 years 4 months ago #187718

It should be $user->id not $user->user_id.

Please Log in or Create an account to join the conversation.

  • Posts: 26243
  • Thank you received: 4038
  • MODERATOR
10 years 4 months ago #187721

Hi,

You're totally right !
"user_id" is used in HikaShop ; "id" (or "user_cms_id" in HikaShop) contain the Joomla user id.
I've update the Nicolas post to fix his code.

Thanks !


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 10 years 4 months ago by Jerome.

Please Log in or Create an account to join the conversation.

Time to create page: 0.204 seconds
Powered by Kunena Forum