The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

"Continue Shopping" in cart window to go to URL

sccr410sccr410 Member
in Bugs & Feature Requests edited November 2011
My client is asking me to make the "Continue Shopping" text link in the popup window go to a specific URL instead of just closing the window. Anyway to make this happen?
  • lukeluke FoxyCart Team
    Hey scc410. You'll have to use some JavaScript to override the value, but it shouldn't be too much trouble. Would that work for you?
  • Perfectly fine, as long as it works
  • brettbrett FoxyCart Team
    Is it just when the "continue shopping" link is clicked, or when the cart is closed in any way (like by pressing Escape or clicking the background overlay?

    I'd use the onClosed Colorbox event:

    Or the cbox_closed event, which is kind of the same thing.

    Here's some untested code:
    Yes, untested. I have no idea if it works, but hopefully it should ;)
    (Ok, since it feels so dirty to share untested code, I tested, and it worked, but I only tested in Firefox, so make sure you give it some testing before you use it in production.)
  • Does this code go in the cart template or my site?
  • So I tried both and it goes on my product page. However, I also use the ColorBox for image pop ups and now the "close" link also sends the user back to the home page. Any way to target this more specifically to just the FoxyCart Cart popup window and not the image popups?
  • fc_adamfc_adam FoxyCart Team

    We've made some changes in the latest version - 0.7.2 - that give the FC colorbox instance a unique ID to allow you to target only that instance. 0.7.2 has just been opened up for public beta, would you be comfortable with upgrading to that version?
  • That would be fine with me, what would I need to do to make this happen?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    You can upgrade in your FoxyCart admin page, then make sure you replace the FoxyCart embed codes with the new ones for 0.7.2. You'll also want to review the upgrade notes at
  • sccr410sccr410 Member
    edited November 2011
    Not sure what happened, but nothing worked when I followed all the upgrade instructions so that doesn't appear to be stable enough to use. Any other way of doing this?

    EDIT: Got 0.7.2 working.

    Now how do I target just the cart popup and not the image popup for this custom close URL?
  • Came up with a solution:

    jQuery(document).bind('cbox_closed', function(){
    if ($('#colorbox').hasClass('fc_cbox')) {
    window.location.href = "";

    Saw that FoxyCart adds the class "fc_cbox" to target just the cart popup windows, other popup windows using colorbox on the page don't have this class.
  • brettbrett FoxyCart Team
    Thanks for updating. Glad you got that going. That's new in v0.7.2 in response to this type of question previously.
  • Does this code have to go on all product pages?
  • lancelance Member, Community Support Member
    @spearheadmm -

    Yes, you would need to place this on any pages where the Colorbox cart is being loaded.

Sign In or Register to comment.