RealTimeDesigner Support Network
Wiki Forums Libraries Docs Support RealTimeDesigner Home
Welcome! Log In Create A New Profile

Advanced

Simplify RTD checkout process

Posted by danielc 
Simplify RTD checkout process
March 14, 2017 04:23PM
Dear Support,

I had a quick question regarding that if besides using the direct css option, was there any way to remove the whole add to cart flow. I would like that when the user clicks the add to cart, that he/she be redirected automatically to the configured Redirect to this page after order submittal (WITH http:// !!!) for the specified store layout.

I was also wondering if it were possible to configure the external notification on submittal per store layout?
Re: Simplify RTD checkout process
March 14, 2017 04:49PM
Hello there and welcome to the Forums.

DirectCSS is not a good way to do this: it can be used to HIDE things, but you're asking to alter to flow. so, that's not your option.

The external notification: it's a legacy tool, nowdays a better choice would be to build your receiver page by making use of the RTD API and using the final thank you page (which can ALREADY be set different per each store). Or you can redirect internally in your receiver page of the ext notification itself, as one of the returnable fields is "ORDER: Source Store" itself.

And finally, to skip cart you can use the "Silent Order" option, announced here:
http://support.realtimedesigner.com/forum/read.php?1,5137

Simply means you have to enter the url of a php page of yours passing to it the order number. Something like this:
http://www.yourdomain.com/rtd_receiver.php?ordnum=[ORD_ID]

And in that rtd_receiver.php script, using the API, you can query order details using the GetOrderDetails action and create your codes to push its data into Magento. Reference of functions is here:
http://support.realtimedesigner.com/index.php?area=docs&sect=apireference
Re: Simplify RTD checkout process
March 14, 2017 04:57PM
Oh, and if you want to even skip the cart, you can try appending this code in the FOOTER CODE FOR DESIGNER section of your store:
<script type="text/javascript">
function rtd_custom_fixes() {
    if (document.getElementById('cart_view')) document.getElementById('cart_view').style.display='none';
}

var LocalComposeCheck_pre=0;
var LocalComposeCheck=0;

Compose = (function() {
    var cached_function = Compose;
    return function() {
        if (!arguments[0] || arguments[0]=='' || arguments[0]=='setqty') {
            if (LocalComposeCheck_pre==0) {
                var stepcode='';

                stepcode+="<div id='local_step_1' style='display:block;'>\n";
                    stepcode+="<center><h3>Design Confirmation<h3></center>\n";
                    stepcode+="<center><b>Please confirm the following:<b></center>\n";
                    stepcode+="<ul>\n";
                        stepcode+="<li>I have proof read this document for spelling and grammar mistakes</li>\n";
                        stepcode+="<li>I assume full responsibility for the content and layout as it is displayed here</li>\n";
                        stepcode+="<li>I approve this design for production</li>\n";
                        stepcode+="<li>I own the rights to use any photo I used in this design</li>\n";
                    stepcode+="</ul>\n";
                    stepcode+="<center>\n";
                    stepcode+="By proceeding, you will confirm all the points listed above<br><br>\n";
                    stepcode+="<b>Do you confirm them all?</b><br><br><br>\n";
                    stepcode+="<input type='button' class='SizesStyle' OnClick=\"local_CheckFields();\" Value='Yes'>";
                    stepcode+="    \n";
                    stepcode+="<input type='button' class='SizesStyle' OnClick=\"main_display_area('panel_items');document.getElementById('tabs_floatingdiv').style.display='none';\" Value='No'>\n";
                    stepcode+="</center>\n";
                stepcode+="</div>\n";
                WriteInFloating(stepcode,800,800);
            } else {
                cached_function.apply(this, arguments);
            }
        } else {
            cached_function.apply(this, arguments);
            LocalComposeCheck_pre=0;
        }
    };
}());

function local_CheckFields() {
 document.getElementById('tabs_floatingdiv').style.display='none';
    LocalComposeCheck_pre=1;
    Compose();
}

ComposeEnd = (function() {
    var cached_function = ComposeEnd;
    return function() {
        cached_function.apply(this, arguments);
        if (LocalComposeCheck==0) LocalComposeCheck=1;
    };
}());

// ************* when showing cart after composition, automatically place the order
RefreshCartEnd = (function() {
    var cached_function = RefreshCartEnd;
    return function() {
        cached_function.apply(this, arguments);
        if (LocalComposeCheck==1) {
            LocalComposeCheck=0;
            main_display_area('commands');
            var custom_cartID = document.getElementById("cart_commands_submitorder");
            var custom_cartevnt = custom_cartID["onclick"];
            if (typeof(custom_cartevnt) == "function") {
                WriteInFloating = (function() {
                    var cached_function = WriteInFloating;
                    return function() {
                        cached_function.apply(this, arguments);
 document.getElementById('tabs_floatingdiv').style.display='none';
 document.getElementById('panel_commands').style.display='block';
                        if (document.getElementById('generating_progressbar')) document.getElementById('generating_progressbar').style.display='block';
                    };
                }());
                custom_cartevnt.call(custom_cartID);
            }
        }
    };
}());
</script>

When added, it will basically make the RTD cart invisible to users.
It will also show a confirm screen about your design, and when confirmed it will automatically place the order. In short, it will "virtually" click the submit order button on user's behalf.

However, consider that using this and silent order will basically pass to your script nothing but a design ID, and NO DETAILS AT ALL about he user. All of that will have to be done on your end, in such scenario
Re: Simplify RTD checkout process
March 15, 2017 10:13AM
Thanks Alex for your prompt response! This will definitely help out a lot. Going to start testing your recommendations! smileys with beer
Re: Simplify RTD checkout process
March 15, 2017 12:25PM
Take your time and have fun with results! smiling smiley
Sorry, only registered users may post in this forum.

Click here to login