Fake order to access the Confirmation Page on any SCA site.

There’s a way to make kind of a fake order to access the Confirmation Page on any SCA site.

First you need to log in to the Checkout Page.

Then you open the browser terminal and navigate to Console tab. Once there, you clear console all the code inside there

For New Version

SC.Application.getLayout().currentView.model;
window.triggerConfirmationPage = function() {
    var orderModel = SC.Application.getLayout().currentView.model;
    orderModel.set('confirmation', {
        internalid : 12345,
        confirmationnumber : '12345',
        summary : orderModel.get('summary'),
        lines : _.map(orderModel.get('lines').models, function(model) {
            var item = model.get('item');
            item.set('itemDisplay', item.get('_name'));
            return model;
        })
    });
    Backbone.history.navigate('confirmation', {trigger : true});
};
triggerConfirmationPage();

For elbrus

window.triggerConfirmationPage = function() {
    var orderModel = SC.Application('Checkout').getLayout().currentView.model;

    orderModel.set('confirmation', {
        internalid: 12345,
        confirmationnumber: '12345',
        summary: orderModel.get('summary'),

        lines: _.map(orderModel.get('lines').models, function(model){
            var item = model.get('item');
            item.set('itemDisplay',item.get('_name'));
            return model;
        })
    });
    Backbone.history.navigate('confirmation', {trigger: true});
};

triggerConfirmationPage();

Leave a comment

Your email address will not be published. Required fields are marked *