Colorbox height to fit content?

RevConceptRevConcept Member
in Help edited June 2012
Is there a simple way to adjust the Cart's colorbox to fit the height of the content? We have a special disclosure that needs to be seen, but depending on the number of items in the cart, it's getting pushed down so that users have to scroll to see it. Suggestions?

  • fc_adamfc_adam FoxyCart Team

    Currently with the way things are handled, that's not possible. There is actually a way to know how tall the contents of an iFrame is, but as there are safety restrictions from communicating between iframes on different domains, it's not possible for the FoxyCart cart.

    There are a couple options.

    If you can display the disclosure on the checkout, that would be an easier way to make sure customers see it.

    If you require it on the cart, you could have it actually display over the cart contents. And to prevent it from loading every time the customer loads the cart, you could have a dismiss button for the disclosure that hooks into the JSON and adds a custom session attribute to the customers cart JSON object and then if that is present, the disclosure isn't shown to the customer.

    Could that type of setup work?

    For what it's worth, we know the modal window can be a little restrictive, and we have plans to have the cart displayed as part of the actual website rather than through an iFrame as it is now - which will not only load quicker, but give you more control over how it's displayed.
Sign In or Register to comment.