Hi, can you help me to understand this why the response returns this object format , I made own and its not return html. Thanks
current_url : …
html:
checkout_info_products_281: …
checkout_info_summary_282: …
litecheckout_final_section: …
litecheckout_step_payment: …
shipping_rates_list: …
This is the js
function fn_calculate_total_shipping_cost(is_hidden,flag=true) {
is_hidden = is_hidden || false;
var params = ,
$parents = Tygh.$(‘#shipping_rates_list’),
$radio = Tygh.$(‘input[type=radio]:checked’, $parents),
$shippingInfo = Tygh.$(‘[data-ca-shipping-field]’),
url = fn_url(‘checkout.checkout’),
result_ids = ‘shipping_rates_list,checkout_info_summary_,checkout_info_order_info_’,
$additional_result_ids = Tygh.$(‘input[name=“additional_result_ids”]’, $parents);
Tygh.$.each($radio, function (id, elm) {
params.push({
name: elm.name,
value: elm.value
});
});
Tygh.$.each($shippingInfo, function (id, elm) {
t
params.push({
name: elm.name,
value: elm.value
});
});
Tygh.$.each($additional_result_ids, function (id, elm) {
result_ids += ‘,’ + $(elm).val();
});
for (var i in params) {
url += ‘&’ + params[i][‘name’] + ‘=’ + encodeURIComponent(params[i][‘value’]);
}
alert( result_ids);
Tygh.$.ceAjax(‘request’, url, {
result_ids: result_ids,
method: ‘get’,
full_render: true,
hidden: is_hidden,
callback: function callback(response) {
console.log(response);
$.ceEvent('trigger', 'ce.total-shipping-cost.calculated', [response]);
}
});