Shopping Cart emptying

  • Posts: 234
  • Thank you received: 4
6 years 2 months ago #297307

Hello, thanks for that. If I wanted to add to the current message "Product successfully added to the cart" a link for people to log in could you point me in the right direction of where I would do this?

Cheers
Iain

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
6 years 2 months ago #297371

Hi,

Well, if you do a translation override of the text there, you can add the extra text and link to the translation.
However, it will always appear.
Regardless of whether you're logged in or not.
If you want to display it only if you're not logged in, then you would have to directly edit the PHP file plugins/hikashop/cartnotify/cartnotify.php
There, you would change the line:

'text' => JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_CART'),
to something like that:
'text' => JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_CART'). (JFactory::getUser()->guest? '<a src="link">text</a>'),

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

  • Posts: 234
  • Thank you received: 4
6 years 1 month ago #297646

Hello NIcolas

Thanks for that, I have been trying to get the code to work however, I am not that proficient at coding. Could you help me a bit further. Ideally I would like it so it was only there for people to see when they were not logged in.

Cheers
Iain

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

  • Posts: 82683
  • Thank you received: 13337
  • MODERATOR
6 years 1 month ago #297647

Hi,

We'll, I've given you the exact line to change, the new line to use instead and the file path where you'll find the line. I don't know what else I can tell you ?

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

Time to create page: 0.059 seconds
Powered by Kunena Forum