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

CommentFileSizeAuthor
uc_ajax_cart-jquery_ui-highlight.diff1.78 KBj0rd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skh’s picture

Thanks - worked great.

OFF’s picture

do not work for me

PieterDC’s picture

I 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.

j0rd’s picture

@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)

tunic’s picture

Status: Patch (to be ported) » Closed (won't fix)

Closing 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).

PieterDC’s picture

Version: 6.x-1.0-rc9 » 6.x-2.x-dev
Status: Closed (won't fix) » Needs work

Then 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...

tunic’s picture

Sure, 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.

PieterDC’s picture

The 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...