Display two prices of a product

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
10 years 1 month ago #209043

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4

Hello!

I have two questions

1)First, how can i display two prices of a product? I don't want to use retail price field because the user doesn't have the option to add to cart a product with the retail price.
I have two kinds of users: simple customers and members.
So i want the members to be able to see and purchase products with both prices, but the simple logged or not logged users can see and purchase only with the retail price, the wholesale price will not be visible to a simple user.

2)Is it possible, in the product listing page and in the product page, that the retail price is displayed with tax but the wholesale price without tax?
And when a user (simple or member) checks out, the tax to be added seperately so the every user knows how much is the tax.

Help please with that? Thank you!

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
10 years 1 month ago #209067

Hi,

1. You can add both prices as normal prices and use the "ACL" option of each price to restrict them to different user groups and then have your wholesalers in a different user group than your simple users.

2. There is no option for that. That would require that you modify the file "listing_price" of the view "product" with custom code to change the tax display mode between both price display.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
10 years 1 month ago #209154

Thanks Nicolas, but i have already done that!

1)I have set the acl of each price, I have also set the price display method to "all" but i still see no second price.
Is there some other option that i need to configure?

2)Could you help me with the php code of the listing_price?

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
10 years 1 month ago #209179

Hi,

1. Can you provide screenshots of how you configured the prices and their ACL ?

2. Let's first display the prices with the ACLs. Then we'll look at this point.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
10 years 1 month ago #209280

Hello Nicolas, here are the screenshots of the prices ACL.

Attachments:

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
10 years 1 month ago #209337

Hi,

Thanks
I've checked on my end and I was able to reproduce the issue which comes from special code we had to add for the support of different prices for different sites with JMS multisites.

Add the code:

if(!file_exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_multisites'.DS.'helpers'.DS.'utils.php')){
				continue;
			}
after the code:
if($currency!=$main_currency){
				foreach($currencyPrices as $quantityPrices){
					foreach($quantityPrices as $k){
						unset($prices[$k]);
					}
				}
				continue;
			}
in the file administrator/components/com_hikashop/classes/currency.php and that will avoid the problem.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
10 years 1 month ago #209399

Hi,

it still doesn't work nicolas

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
10 years 1 month ago #209410

Hi,

I've done the test on my end and it worked.
So all I can think of is that the product is not setup properly.
Please provide a backend access, a link to the product page on the frontend and a user access to test the display of the 2 prices, so that we can look at the issue on your website since it now works for us.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
9 years 10 months ago #220570

Hi Nicolas.
I found the problem with the ACL. To work the acl correctly, Retail price must be present. If its not, acl doesnt work properly.
I can bring retail price and a price from the table prices, at the same time. but not two prices from the table prices at the same time. Ill send you cpanel login

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
9 years 10 months ago #220718

Hi,

I've checked your website with the access you provided.
The user account you provided is linked to the user group Πελάτες
I've checked both the product with the id 7185 and 7286 (one display both prices, not the other).
On both, you actually only have one price configured for the user group Πελάτες
So it's normal that you only get one price displayed. And if you set the retail price, then you get the retail price to display as well, which is normal too.

So from what I could see, the system is working properly.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
9 years 9 months ago #221408

Hello Nicolas!

I sent you a private message 4 days ago, I wanted to let you know just in case you haven't seen it.
Please answer back i need your help.

Thank you!

Last edit: 9 years 9 months ago by verzevoul.

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
9 years 9 months ago #222025

Hi,

Here was your redacted message for reference:

When i login as "Πελάτες" i need to see both prices.
When i login as "Guest" i need to see the second price only which is the retail price.
When i m not logged in i need to see a third different price.

So, right now group "Πελάτες" can see only the first price, but if i click on the product i see 2 prices but the second price has no title.

If i login as Guest i see the correct price but the price title is the same for all.
How can i fix that?

The price title of the group "Πελάτες" must be "Τιμή Χονδρικής"
The price title of the group "Guest" must be "Τιμή Λιανικής"
And the third price title must be "Τιμή"


Again, all what you're describing seems to be correct. HikaShop display the correct prices for each user group.
Your problem is apparently with the "price title", but there is no "price title" in HikaShop.
HikaShop doesn't display any "price title" for prices by default.
So this means that this has been added on your end, with some kind of customization or by your template provider.
So displaying different price title for each price will require further customization of the file "listing_price" of the view "product" via the menu Display>Views. You'll have to add your custom code after the line:
foreach($this->row->prices as $k => $price){
in that view file.
Please understand that this is outside user support and falls into the custom development category. Please contact a third party developer if you need someone to work on that for you.

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

  • Posts: 1115
  • Thank you received: 12
  • Hikashop Business
9 years 9 months ago #222191

Hello nicolas!

Thank you for your answer.

Yes each group can see the correct price but the group "Πελάτες" can only see the wholesale price. That is correct but
I need that group to be able to see both wholesale AND retail price at listing products page and at product page.
I have assigned the group via ACL to both prices so why isn't working?

Attachments:
Last edit: 9 years 9 months ago by verzevoul.

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
9 years 9 months ago #222230

Hi,

Well, I already saw both prices on the product page : take.ms/0aDy1
So that was already working and is still working.

If you're problem is about the display of both prices on the listing, then yes, but that's how it is supposed to work.
You won't get several prices for the same minimum quantity for the same product for the same currency on a listing since there is usually no point in doing that.
I've modified the getListingPrices function of the file administrator/components/com_hikashop/classes/currency.php for you with your FTP access so that it works like you want, but you'll loose that modification when you update so make sure that you back it up.

The following user(s) said Thank You: verzevoul

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

  • Posts: 63
  • Thank you received: 1
8 years 11 months ago #250495

Hi Nicolas,

I need the same format, can you show me which code did you modify on the currency.php?

Thanks
Regards

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

  • Posts: 84313
  • Thank you received: 13705
  • MODERATOR
8 years 11 months ago #250559

Hi,

I don't remember what I modified and didn't note it anywhere. Verzevoul must still have the modification so he should be able to provide you with the change.

The following user(s) said Thank You: Yumul

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

Time to create page: 0.080 seconds
Powered by Kunena Forum