Show "login to see pricing" when no price is shown

  • Posts: 75
  • Thank you received: 12
9 years 1 month ago #246831

-- url of the page with the problem -- : cilsposana.com
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6
-- PHP version -- : 5.6.23
-- Browser(s) name and version -- : Chrome (but that is irrelevant here)

Hello
Is there a way to have the product list and detail interface show a "login to see pricing" message instead of showing a product as free or not showing it at all when no pricing has been set for a specific ACL level ?
Thanks
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca

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

  • Posts: 26275
  • Thank you received: 4045
  • MODERATOR
9 years 1 month ago #246832

Hi,

You can change the translation in order to display a different text that "free".
www.hikashop.com/download/languages.html#modify

When HikaShop loads the prices, it load them depending the current user ACL ; so you won't have any information regarding the other prices for other user groups.
So in the view "listing_price" which display the prices ; instead of displaying the "free" text, you can check if the user is logged or not and display a different text depending that.
www.hikashop.com/support/documentation/1...-display.html#layout

You can also put some code directly in the product listing but that's not something I can recommend because it will break the pagination, cause you will still have X products but if you skip some, the result might be different that the user would expect.

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: 75
  • Thank you received: 12
9 years 1 month ago #246897

Hi Jerome
Thanks for the suggestion
Will that not still allow a visitor to add this item to the cart at 0$ (presuming I translate the "free" variable) ?
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 1 month ago #246898

Hi,

If you have the "display add to cart button for free products" setting of the HikaShop configuration turned off, then no, they won't be able to.

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

  • Posts: 75
  • Thank you received: 12
9 years 1 month ago #246920

But even if I turn it on, then the visitor will be able to add the product to the cart for free even is the message was translate to "login to see prices" ?

Also, can the translation be a hyperlink ?

Thanks
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca

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

  • Posts: 84313
  • Thank you received: 13702
  • MODERATOR
9 years 1 month ago #246923

Hi,

Yes, that's why I said that you should turn it OFF not on.
And yes, you can add HTML in the translation overrides. Make sure you use simple quotes for the attributes in your HTML instead of the double quotes and it will work.

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

  • Posts: 75
  • Thank you received: 12
9 years 1 month ago #246983

OK cool !
This works perfectly :-)
Thanks !
Danny


Danny Malouin
BeNu - Digital success agency
benu.ca

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

Time to create page: 0.065 seconds
Powered by Kunena Forum