Jump to content
Sign in to follow this  
NiteFox

Gateway colorbox element js ?

Recommended Posts

Hey,

I've noticed the following bit of js in the foundation skin (2.cubecart.js) but can't seem to pin point what it's actually for.

Clearly it's for something during the gateway process when checking out..

So wondered if anyone here knew what it's actually for??

Cheers

 

    if($('.gateway_wrapper .colorbox').length) {
        var colorbox = $('.colorbox');
        var href = colorbox.attr('href');
        var title = colorbox.attr('title');

        colorbox.attr('href', '#').attr('data-reveal-id', 'colorbox');

        $('.colorbox').after(
            $('<div>').attr('id', 'colorbox').addClass('reveal-modal').addClass('tiny').attr('data-reveal','').attr('aria-labelledby',title).attr('aria-hidden','true').attr('role', 'dialog').html('<h3>'+title+'</h3><img src="'+href+'"><a class="close-reveal-modal">&#215;</a>')
        );
        $(".gateway_wrapper .colorbox").click(function() {
            $('#colorbox').foundation('reveal', 'open');
        });
    }

 

Share this post


Link to post
Share on other sites

This is a handler for when more information is requested. A 'colorbox' is a pop-over containing that info.

For example, when checking out, and the customer chooses a payment gateway that then displays a form to fill out (see Card_Capture, for example), there would be a link (or some other clickable trigger) that indicates "What is this?" for the CVV entry. Clicking the link will bring a pop-over that shows an image of the back-side of a credit card with the CVV highlighted. There may also be some explanatory text in the pop-over.

The colorbox is used at numerous locations in admin as well. For example, clicking the Test button on the page where you fill in the Send Email parameters will pop-over the results of the test.

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, bsmither said:

This is a handler for when more information is requested. A 'colorbox' is a pop-over containing that info.

For example, when checking out, and the customer chooses a payment gateway that then displays a form to fill out (see Card_Capture, for example), there would be a link (or some other clickable trigger) that indicates "What is this?" for the CVV entry. Clicking the link will bring a pop-over that shows an image of the back-side of a credit card with the CVV highlighted. There may also be some explanatory text in the pop-over.

The colorbox is used at numerous locations in admin as well. For example, clicking the Test button on the page where you fill in the Send Email parameters will pop-over the results of the test.

 

Cheers, converted it to bootstrap modal. Obviously using bootstrap i expect some compatibility issues with extensions that output foundation content in the frontend but luckily anyone who faces those can get support from me if the extension developer will not assist.

Might tackle foundation next..

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...