Jump to content

Gateway colorbox element js ?


NiteFox

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');
        });
    }

 

Link to comment
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.

Link to comment
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..

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...