- Posts: 112
- Thank you received: 7
Changed notification system?
- karendunne
-
Topic Author
- Offline
Less
More
8 years 7 months ago #288241
by karendunne
Changed notification system? was created by karendunne
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.5
Hi There!
I have an override on the remove from wishlist method so that it shows a notification when an item is removed from the wishlist. When I developed this override HikaShop was using jQuery notify to show notifications and I just had to add this code to my javascript:
It's been sometime and I remember this was working fine, but currently the site does not load jQuery notify plugin and notifications seem to be using a different (and nicer system) with this call to update the cart:
Can you please point out the code to show a notification about product removed so that I can use the new notification system?
Thank you!!
Carlos.
-- Joomla version -- : 3.8.5
Hi There!
I have an override on the remove from wishlist method so that it shows a notification when an item is removed from the wishlist. When I developed this override HikaShop was using jQuery notify to show notifications and I just had to add this code to my javascript:
Code:
jQuery.notify({title:"Removed From Wishlist",text: jQuery(this).data('productName'),image:"<img src=\""+jQuery(this).data('productImage')+"\" alt=\"\"/>"},{className:'info'});
It's been sometime and I remember this was working fine, but currently the site does not load jQuery notify plugin and notifications seem to be using a different (and nicer system) with this call to update the cart:
Code:
window.Oby.fireAjax(cart_type+'.updated', {id: cart_id, el: el, product_id: product_id, type: cart_type, resp: resp});
Can you please point out the code to show a notification about product removed so that I can use the new notification system?
Thank you!!
Carlos.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #288248
by nicolas
Replied by nicolas on topic Changed notification system?
Hi,
Well, it's basically the same as the adding.
HikaShop has the HikaShop cart notify plugin which handles the notifications for product adding.
So you can base yourself on it. The code you want to look at is the unobfuscated code in plugins/hikashop/cartnotify/media/notify.min.js
Well, it's basically the same as the adding.
HikaShop has the HikaShop cart notify plugin which handles the notifications for product adding.
So you can base yourself on it. The code you want to look at is the unobfuscated code in plugins/hikashop/cartnotify/media/notify.min.js
The following user(s) said Thank You: karendunne
Please Log in or Create an account to join the conversation.
- karendunne
-
Topic Author
- Offline
Less
More
- Posts: 112
- Thank you received: 7
8 years 7 months ago #288410
by karendunne
Replied by karendunne on topic Changed notification system?
Hi nicolas,
I'm afraid that does not look quite right to me. I just need a simple way to handle the notification after calling:
Previously I was using this:
Which is pretty close to what you have in the referred function for using notifications, but I get this message in console:
Can you please provide any other clue? I see you are loading notification libraries and don't want to load any more libraries to make it work
Thank you!!
Carlos.
I'm afraid that does not look quite right to me. I just need a simple way to handle the notification after calling:
Code:
window.hikashop.deleteFromCart(this,'wishlist','');
Previously I was using this:
Code:
jQuery.notify({title:"Removed From Wishlist",text: jQuery(this).data('productName'),image:"<img src=\""+jQuery(this).data('productImage')+"\" alt=\"\"/>"},{className:'info'});
Which is pretty close to what you have in the referred function for using notifications, but I get this message in console:
TypeError: jQuery.notify is not a function
Can you please provide any other clue? I see you are loading notification libraries and don't want to load any more libraries to make it work
Thank you!!
Carlos.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #288449
by nicolas
Replied by nicolas on topic Changed notification system?
Hi,
I was not talking about the jQuery.notify.
If you get the error that jQuery.notify is not a function, it means that jQuery and/or the notify system of jQuery you're trying to use are not loaded where you have your code.
Since we don't know how and where exactly you added your javascript code, we can't help much on that.
What I would recommend is to load jQuery and/or the notify system of jQuery just before trying to call jQuery.notify and that will work.
I was not talking about the jQuery.notify.
If you get the error that jQuery.notify is not a function, it means that jQuery and/or the notify system of jQuery you're trying to use are not loaded where you have your code.
Since we don't know how and where exactly you added your javascript code, we can't help much on that.
What I would recommend is to load jQuery and/or the notify system of jQuery just before trying to call jQuery.notify and that will work.
Please Log in or Create an account to join the conversation.
- karendunne
-
Topic Author
- Offline
Less
More
- Posts: 112
- Thank you received: 7
8 years 7 months ago #288494
by karendunne
Replied by karendunne on topic Changed notification system?
Hi nicholas,
that was my first thought, but if you go to any product as a user and try to add it to your wishlist, the notification works with no problem. The problem is when you try to call jQuery.notify outside of hikashop javascript.
This was working before one of the past updates, so something has changed in how you handle notifications or load jQuery that is making not possible for me to use the libraries Hikashop loads.
that was my first thought, but if you go to any product as a user and try to add it to your wishlist, the notification works with no problem. The problem is when you try to call jQuery.notify outside of hikashop javascript.
This was working before one of the past updates, so something has changed in how you handle notifications or load jQuery that is making not possible for me to use the libraries Hikashop loads.
Please Log in or Create an account to join the conversation.
8 years 7 months ago #288496
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Changed notification system?
Hello,
To call jQuery.notify you need to include the jQuery library which provide that "notify".
It's not related to HikaShop or else ; it's just that you're using some JS lib which has not been included.
Regards,
To call jQuery.notify you need to include the jQuery library which provide that "notify".
It's not related to HikaShop or else ; it's just that you're using some JS lib which has not been included.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- karendunne
-
Topic Author
- Offline
Less
More
- Posts: 112
- Thank you received: 7
8 years 7 months ago #288804
by karendunne
Replied by karendunne on topic Changed notification system?
Hi Jerome,
as I stated, I am using the same javascript methods you use in hikashop.js but since last (or previous) update the javascript system stopped to work.
I see in your code you are using jQuery.notify, but weird enough it only works inside your javascript as if you are not loading jquery or jquery.notify globally.
I only demand a bit of help on the javascript method I need to use to show a message using your message system. That's all I need. please!!
Carlos
as I stated, I am using the same javascript methods you use in hikashop.js but since last (or previous) update the javascript system stopped to work.
I see in your code you are using jQuery.notify, but weird enough it only works inside your javascript as if you are not loading jquery or jquery.notify globally.
I only demand a bit of help on the javascript method I need to use to show a message using your message system. That's all I need. please!!
Carlos
Please Log in or Create an account to join the conversation.
8 years 7 months ago #288805
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Changed notification system?
Hello,
Before using jQuery notify ; we load jQuery and we also load the "notify" lib.
If you do want to use the notifyjs lib ; best for you would be to download it and use it manually.
CF : notifyjs.com/
And don't forget to also include jQuery via the Joomla core before.
Please understand that you're asking for help for elements which are outside the limit of our support.
And, right now it's not that we don't want to help you a bit but...
How could we help you with the JavaScript if we do not know anything regarding what you have done nor we can see your plugin in action ?
Before using jQuery notify ; we load jQuery and we also load the "notify" lib.
If you do want to use the notifyjs lib ; best for you would be to download it and use it manually.
CF : notifyjs.com/
And don't forget to also include jQuery via the Joomla core before.
Please understand that you're asking for help for elements which are outside the limit of our support.
And, right now it's not that we don't want to help you a bit but...
How could we help you with the JavaScript if we do not know anything regarding what you have done nor we can see your plugin in action ?
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.258 seconds