- Posts: 66
- Thank you received: 1
Add to cart notification click to checkout
5 years 11 months ago #326919
by yanliom
Add to cart notification click to checkout was created by yanliom
-- url of the page with the problem -- :
liomas.eu/havellas-eshop/krani
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
Hello,
I would like the add to cart notification to be clickable in order to get you quickly to the checkout (cart).
I can see the cursor changes when I hover the mouse but clicking on it does nothing.
Thank you in advance!
Yannis
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
Hello,
I would like the add to cart notification to be clickable in order to get you quickly to the checkout (cart).
I can see the cursor changes when I hover the mouse but clicking on it does nothing.
Thank you in advance!
Yannis
Please Log in or Create an account to join the conversation.
5 years 11 months ago #326925
by nicolas
Replied by nicolas on topic Add to cart notification click to checkout
Hi,
The library we use to generate that notification box doesn't allow us to make it clickable.
What you could try is to do a translation override of the text displayed there to add a "a" HTML tag around the text.
www.hikashop.com/download/languages.html#modify
That way, you could click on the link.
Another solution would be to change the notification box with the settings of the HikaShop cart notification plugin via the Joomla plugins manager. There, you can change it to use a popup and in that case, the popup will contain a button to go to the checkout.
The library we use to generate that notification box doesn't allow us to make it clickable.
What you could try is to do a translation override of the text displayed there to add a "a" HTML tag around the text.
www.hikashop.com/download/languages.html#modify
That way, you could click on the link.
Another solution would be to change the notification box with the settings of the HikaShop cart notification plugin via the Joomla plugins manager. There, you can change it to use a popup and in that case, the popup will contain a button to go to the checkout.
Please Log in or Create an account to join the conversation.
5 years 11 months ago - 5 years 11 months ago #326951
by yanliom
Replied by yanliom on topic Add to cart notification click to checkout
Hello,
the text method is not optimal as I cannot click the whole "notification".
I wouldn't use the popup as it is too obtrusive.
Can I make it clickable with some extra Javascript?
Yannis
the text method is not optimal as I cannot click the whole "notification".
I wouldn't use the popup as it is too obtrusive.
Can I make it clickable with some extra Javascript?
Yannis
Last edit: 5 years 11 months ago by yanliom.
Please Log in or Create an account to join the conversation.
5 years 11 months ago #326967
by nicolas
Replied by nicolas on topic Add to cart notification click to checkout
You could try something like that:
where xxx is the URL of the checkout page.
Code:
$(document).on("click", ".notifyjs-hidable", function(e) {
window.location='xxx';
});
Please Log in or Create an account to join the conversation.
5 years 11 months ago #327016
by yanliom
Replied by yanliom on topic Add to cart notification click to checkout
Thank you,
this is quite a simple fix. Why don't you include this simple patch in the notification plugin?
...just for others who may use this code, in my template (T4 Framework) I had to replace $ with jQuery:
this is quite a simple fix. Why don't you include this simple patch in the notification plugin?
...just for others who may use this code, in my template (T4 Framework) I had to replace $ with jQuery:
Code:
jQuery(document).on("click", ".notifyjs-hidable", function(e) {
window.location='xxx';
});
Please Log in or Create an account to join the conversation.
5 years 11 months ago #327041
by nicolas
Replied by nicolas on topic Add to cart notification click to checkout
Hi,
Adding an option for it is a a good idea yes.
This code will make the box clickable to access the checkout even when the box is used to display an error message because the add to cart didn't work.
Knowing if the error message is a success or not is not available actually in the notifyjs library. So it will require a more complex solution if we want to make it truly usable in all cases and be able to add that as a standard solution.
Adding an option for it is a a good idea yes.
This code will make the box clickable to access the checkout even when the box is used to display an error message because the add to cart didn't work.
Knowing if the error message is a success or not is not available actually in the notifyjs library. So it will require a more complex solution if we want to make it truly usable in all cases and be able to add that as a standard solution.
Please Log in or Create an account to join the conversation.
5 years 11 months ago #327122
by yanliom
Replied by yanliom on topic Add to cart notification click to checkout
Hello,
the class off the notification box changes when it displays an error message.
Maybe the decision regarding link availability can be made using that CSS class (to keep it simple). That's a stable solution, the notifyjs library does not update any more.
Best,
Yannis
the class off the notification box changes when it displays an error message.
Maybe the decision regarding link availability can be made using that CSS class (to keep it simple). That's a stable solution, the notifyjs library does not update any more.
Best,
Yannis
Please Log in or Create an account to join the conversation.
5 years 11 months ago #327123
by nicolas
Replied by nicolas on topic Add to cart notification click to checkout
Hi,
Yes. We'll see what we can do.
Yes. We'll see what we can do.
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds