I noticed that there is a jquery_ui option in the blocks setting for this module. I also noticed it didn't do anything. Since I needed this feature for my site (it's hard for the end user to tell that their cart has been updated) I re-enabled the code and finished it off to make it work. I also changed the highlight from .5 second flash to a 2 second ebb, as the .5 was too slow for mine. Perhaps this should be configurable in the admin as well.
To enable this feature users will require the jquery_ui module. I've made this clear in the block admin. If this module is not install and enabled, they will not get the effects even if the option is chosen.
Included is my diff/patch
Comment | File | Size | Author |
---|---|---|---|
uc_ajax_cart-jquery_ui-highlight.diff | 1.78 KB | j0rd |
Comments
Comment #1
skh CreditAttribution: skh commentedThanks - worked great.
Comment #2
OFF CreditAttribution: OFF commenteddo not work for me
Comment #3
PieterDCI like the idea, but your patch can't be applied to the version I'm using; 6.x-2.0-rc3.
I patched js/uc_ajax_cart.js as follows
in function ajaxCartInitCartBlock()
add:
Drupal.uc_ajax_cart.update_container.fadeTo('slow',1);
after:
ajaxCartCartBlockBehaviors(Drupal.uc_ajax_cart.cart_wrapper);
in function ajaxCartUpdateBlockCart()
replace:
Drupal.uc_ajax_cart.update_container.load(Drupal.settings.uc_ajax_cart.SHOW_CALLBACK, '', ajaxCartInitCartBlock);
with:
Drupal.uc_ajax_cart.update_container.fadeTo('fast',0).load(Drupal.settings.uc_ajax_cart.SHOW_CALLBACK, '', ajaxCartInitCartBlock);
It gives the module enough time to reload the content of the cart.
But it lacks an administration setting.
That would've need to be worked on.
Comment #4
j0rd CreditAttribution: j0rd commented@PeiterDC Create a patch and add it in to the issue queue for others to download & use. My patch was made almost 2 years ago and while there are few comments, I'm sure some people have used the old one, and would like a new patch to continue to use (even if it doesn't get added to uc_ajax_cart)
Comment #5
tunicClosing as 6.x-1.0 branch is not developped anymore. All develop is done in 6.x-2.0 branch. If you need this feature please craete a new issue for the 6.x branch explaining the desired effect (I'm sure what's done with that highlight effect and what's highlighted).
Comment #6
PieterDCThen please don't close this feature request, but simply move it to the dev version of this module and mark as 'needs work'. We're just trying to contribute to this module...
Comment #7
tunicSure, no problem, I was just trying to clean a little bit the issue queue. One of the reasons of closing it was because I don't undestand exactly what effect you want to add.
Comment #8
PieterDCThe goal is to draw attention to the AJAX Cart as it gets updated (or loaded).
Several visual effects can be used, such as "highlight", cfr. http://docs.jquery.com/UI/Effects/Highlight
I achieved the same goal by fading out the cart block, directly followed by fading back in...