Show group price and normal price to all users

  • Posts: 51
  • Thank you received: 1
11 years 11 months ago #81369

I have set up a product with two prices. One restricted to group 'Club Member'.

How do I have both prices display but only people in group 'Club Member' able to purchase the product with their price?

Normal Price: 18.00
Member Price: 15.00

listing_price.php product view only provides the 'normal price' in $this->row->prices array if not logged in as 'Club Member'
If I remove the access control on the second price, add-to-cart automatically adds the lowest price.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #81390

What you could do is use the custom fields to display the two prices.
Else you will have to load all the products informations in the function "listing_price()" of the file "components/com_hikashop/views/product/view.html.php".
But it require a good PHP and Joomla knowledge.

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

  • Posts: 51
  • Thank you received: 1
11 years 11 months ago #81495

I was of the understanding that the business edition allowed this by default.

My PHP and joomla skills are decent. I think putting prices in custom fields instead of the prices section would confuse the client.

What do I need to do to allow this functionality using overrides (so hikashop can still be updated?)

Switching to magebridge at this point would probably push development past the deadline.

At a minimum how can I:

  • load all prices for the product (even those restricted by ACL), then check the pice_access for 'Club Member' and output that as member price
  • choose which price will be added to cart when outputting the two prices based on the user's group (probably just don't output the form?)

Last edit: 11 years 11 months ago by Dorgo.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #81633

Hi,

By default, if you have a price with the acl "all" and a price with acl on the group, in the product page you can display several prices for users who have access to these prices.
Some threads already talk about it like:
www.hikashop.com/en/forum/2-general-talk...e-display.html#78541
Or, with other kind of customization:
www.hikashop.com/en/forum/4-how-to/76039...ice-range.html#78100

After that, for guest users who have only one accessible price, it's currently not possible.
As Xavier said, using a custom field could be easier without making a lot of new SQL queries.

If you want to override the price loading by removing the ACL, there are three ways:
- Write into HikaShop core files (class currency) and at this moment, you wouldn't be able to update HikaShop without loosing your modifications (but it should be two lines to comment).
- Write new queries into views (using view override) and at this moment, you would be able to update HikaShop. It would be an inclusion of the "getListingPrices" of the currency class into your view.

Modifying the display would not modifying the rest of the process so, if the user have the access to the price, the lower price would be always chosen by HikaShop.

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.

Time to create page: 0.074 seconds
Powered by Kunena Forum