Shadowbox? Anybody want it?

brettbrett FoxyCart Team
in General edited February 2008
Shadowbox is a pretty neat Thickbox/Lightbox/Graybox implementation that's javascript library agnostic. That doesn't really matter, since most of FoxyCart is using jQuery, but it's a nice implementation that actually allows some functionality that Thickbox doesn't. DEMOS here.

Specifically, the way Thickbox/FoxyBox loads the iframe prevents javascript from running on the cart, which would be useful if you wanted to check the JSON object and then display additional information (like a "Buy this other product!" link if product X is in the cart) or hide the checkout button (if qty>1, or if some custom field in the JSON doesn't meet a criteria), etc.

Anyway, I just whipped up a quick replacement for FoxyBox/Thickbox using Shadowbox. PLEASE DON'T USE THIS unless you have a decent handle on javascript and are willing to try something that's currently unsupported and feature incomplete. It DOES NOT WORK WITH FORMS, only links at this point. If there's interest we might finish the implementation, so let me know what you think.

http://wiki.foxycart.com/docs:cart:alternate_display_methods:shadowbox
Comments
  • Interesting. Shadowbox may come in handy for a few other projects I'm working on. Thanks for sharing!

    As far as using it with FoxyCart, I'm willing to try. Sounds like this will work better for me in the end.
  • Wow. That's pretty. I don't know if I see any specific need for it for my cart, but I'm pretty certain I'm gonna nab it for my personal site.
  • myaleighmyaleigh Member
    edited March 2008
    This was easy to implement. Thanks for the instructions! I noticed though that the loading image is broken.
  • brettbrett FoxyCart Team
    Oh yeah, I'd forgotten to mention that you'll probably need to modify the path to that image. I had some trouble with it too. If you need help, let me know, or if you found it already let me know what line it was so we can update the docs.
  • D'oh. The broken image was an easy fix too.

    To fix -

    Open shadowbox.js and edit line 3 where it asks for loading image.
    ... options={assetURL:"",loadingImage:"http://www.YOURDOMAIN.com/images/loading.gif", ....
    

    Note: You may be able to use a relative path too. I didn't test.
  • brettbrett FoxyCart Team
    Cool, thanks. I've updated our wiki page about it.
Sign In or Register to comment.