Viewing File: /usr/local/cpanel/base/frontend/jupiter/store/purchase_product_build_cart.html.tt
[%
USE Uapi;
USE Dumper;
SET CPANEL.CPVAR.dprefix = "../";
SET completion_url_result = execute(
'Market',
'get_completion_url',
{
product_name => CPANEL.FORM.product_name,
domain => CPANEL.FORM.domain,
}
);
SET completion_url = completion_url_result.data.completion_url;
SET result = execute(
'Market',
'create_shopping_cart_non_ssl',
{
access_token => FORM.code,
url_after_checkout => completion_url,
product_name => CPANEL.FORM.product_name,
domain => CPANEL.FORM.domain,
}
);
SET redirect_url = result.data.checkout_url;
%]
[% WRAPPER '_assets/master.html.tt'
app_key = 'store'
include_legacy_stylesheets = 0
include_legacy_scripts = 0
include_cjt = 0
use_master_bootstrap = 0
-%]
[% IF result.status %]
<meta http-equiv="refresh" content="1;url=[% redirect_url -%]">
[% END %]
<div class="row">
<div class="col-xs-12 col-sm-6">
[% IF result.status %]
<div class="alert alert-info">
<span class="glyphicon glyphicon-info-sign"></span>
<div class="alert-message">
<i id="spinner" class="fas fa-sync fa-spin"></i>
[% locale.maketext('The system is redirecting you.') %]
<span id="redirect-link" style="display:none;">
<br>
[% locale.maketext('If the system does not redirect you, [output,url,_1,click here,target,_parent].',redirect_url) %]
</span>
</div>
</div>
[% ELSE %]
<div class="alert alert-danger">
<span class="glyphicon glyphicon-remove-sign"></span>
<div class="alert-message">
<strong>[% locale.maketext('Error:') %]</strong>
[% locale.maketext('The system could not create your shopping cart.') %]
<br><br>
[% locale.maketext('Error:') %] [% result.errors_as_string %]
</div>
</div>
[% END %]
</div>
</div>
<script>
var redirectLink = document.getElementById("redirect-link");
var five_seconds = 5000;
if (redirectLink) {
setTimeout(function() {
redirectLink.style.display = "block";
}, five_seconds);
}
</script>
</html>
[% END #wrapper -%]
Back to Directory
File Manager