Skip to main content

Shopping Cart emptying

More
8 years 2 months ago #297307 by mad-q
Replied by mad-q on topic Re: Shopping Cart emptying
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.

More
8 years 2 months ago #297371 by nicolas
Replied by nicolas on topic Re: Shopping Cart emptying
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:
Code:
'text' => JText::_('PRODUCT_SUCCESSFULLY_ADDED_TO_CART'),
to something like that:
Code:
'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.

More
8 years 1 month ago #297646 by mad-q
Replied by mad-q on topic Re: Shopping Cart emptying
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.

More
8 years 1 month ago #297647 by nicolas
Replied by nicolas on topic Re: Shopping Cart emptying
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.130 seconds
Powered by Kunena Forum