Untitled diff

Created Diff never expires
{if $econt_error == 0}
{if $econt_error == 0}
<style>
<style>
#econt_form input:disabled {
#econt_form input:disabled {
background-color: rgb(235, 235, 228) !important;
background-color: rgb(235, 235, 228) !important;
color: rgb(84, 84, 84) !important;
color: rgb(84, 84, 84) !important;
}
}
.customClass1{
.customClass1{
width: 49% !important;
width: 49% !important;
padding: 10px 5px 10px 5px !important;
padding: 10px 5px 10px 5px !important;
display: block;
display: block;
float: left;
float: left;
border: 1px solid #ccc;
border: 1px solid #ccc;
margin-right: 10px;
margin-right: 10px;
background-color: #f9f9f9;
background-color: #f9f9f9;
text-align: left;
text-align: left;
}
}
.customClass2{
.customClass2{
width: 49% !important;
width: 49% !important;
padding: 10px 5px 10px 5px !important;
padding: 10px 5px 10px 5px !important;
display: block;
display: block;
float: left;
float: left;
background-color: #f9f9f9;
background-color: #f9f9f9;
border: 1px solid #ccc;
border: 1px solid #ccc;
text-align: left;
text-align: left;
}
}
.ac_results{
.ac_results{
width: 21% !important;
width: 21% !important;
}
}
@media (min-width: 320px) and (max-width: 1200px){
@media (min-width: 320px) and (max-width: 1200px){
.customClass1, .customClass2{
.customClass1, .customClass2{
width: 100% !important;
width: 100% !important;
margin-bottom: 10px;
margin-bottom: 10px;
}
}
}
}
</style>
</style>
<div id="econt_form"> <!-- class="block" OSC -->
<div id="econt_form"> <!-- class="block" OSC -->
<div class="econt_delivery_options">
<div class="econt_delivery_options">
<!-- <h4>{$econt_title}</h4> -->
<!-- <h4>{$econt_title}</h4> -->
<div class="block_content">
<div class="block_content">
<div class="content"> <!-- style="padding:5px 10px;"> OSC -->
<div class="content"> <!-- style="padding:5px 10px;"> OSC -->
<div id="econt_methods" {if empty($econt_methods)}style="display: none;"{/if}>
<div id="econt_methods" {if empty($econt_methods)}style="display: none;"{/if}>
{if !empty($econt_methods)}
{if !empty($econt_methods)}


<div id="psection">
<div id="psection">
{foreach $econt_methods as $method}
{foreach $econt_methods as $method}
<div class="{if $method.code == "econt_door"}customClass2 col-sm-12 col-xs-12{/if} {if $method.code == "econt_office"}customClass1 col-sm-12 col-xs-12{/if}">
<div class="{if $method.code == "econt_door"}customClass2 col-sm-12 col-xs-12{/if} {if $method.code == "econt_office"}customClass1 col-sm-12 col-xs-12{/if}">
<input type="radio" name="shipping_method" id="{$method.code}" value="{$method.code}" {if $method.code == $shipping_method}checked="checked"{/if} /> {if $method.code == "econt_office"} <i class="fa-pts fa-pts-truck"></i>{/if}{if $method.code == "econt_door"}<i class="fa-pts fa-pts-child"></i>{/if} <label for="{$method.code}">{$method.title}</label>
<input type="radio" name="shipping_method" id="{$method.code}" value="{$method.code}" {if $method.code == $shipping_method}checked="checked"{/if} /> {if $method.code == "econt_office"} <i class="fa-pts fa-pts-truck"></i>{/if}{if $method.code == "econt_door"}<i class="fa-pts fa-pts-child"></i>{/if} <label for="{$method.code}">{$method.title}</label>
<input type="hidden" name="shipping_method_price" id="econt_price_{$method.code}" value="{$method.bg_cost}" disabled="disabled" />
<input type="hidden" name="shipping_method_price" id="econt_price_{$method.code}" value="{$method.bg_cost}" disabled="disabled" />
<div style="float:right;">{$method.text}</div>
<div style="float:right;">{$method.text}</div>
<div style="clear: both"></div>
<div style="clear: both"></div>
</div>
</div>
{*<tr>
{*<tr>
<td>
<td>
<input type="radio" name="shipping_method" id="{$method.code}" value="{$method.code}" {if $method.code == $shipping_method}checked="checked"{/if} /> <label for="{$method.code}">{$method.title}</label>
<input type="radio" name="shipping_method" id="{$method.code}" value="{$method.code}" {if $method.code == $shipping_method}checked="checked"{/if} /> <label for="{$method.code}">{$method.title}</label>
<input type="hidden" name="shipping_method_price" id="econt_price_{$method.code}" value="{$method.bg_cost}" disabled="disabled" />
<input type="hidden" name="shipping_method_price" id="econt_price_{$method.code}" value="{$method.bg_cost}" disabled="disabled" />
</td>
</td>
<td class="right">{$method.text}</td>
<td class="right">{$method.text}</td>
</tr>*}
</tr>*}
{/foreach}
{/foreach}
<div style="clear: both;"></div></div>
<div style="clear: both;"></div></div>
{/if}
{/if}
</div>
</div>


<table class="econt_shipping">
<table class="econt_shipping">
<tr style="display: none;">
<tr style="display: none;">
<td><label>{l s='Наложен платеж:' mod='econt'}</label></td>
<td><label>{l s='Наложен платеж:' mod='econt'}</label></td>
<td><input type="radio" id="cd_yes" name="cd_payment" value="1" {if $cd_payment}checked="checked"{/if} />
<td><input type="radio" id="cd_yes" name="cd_payment" value="1" {if $cd_payment}checked="checked"{/if} />
<label for="cd_yes">{l s='Да' mod='econt'}</label>
<label for="cd_yes">{l s='Да' mod='econt'}</label>
<input type="radio" id="cd_no" name="cd_payment" value="0" {if !$cd_payment}checked="checked"{/if} />
<input type="radio" id="cd_no" name="cd_payment" value="0" {if !$cd_payment}checked="checked"{/if} />
<label for="cd_no">{l s='Не' mod='econt'}</label>
<label for="cd_no">{l s='Не' mod='econt'}</label>
<span style="color: red; display:none;" id="error_cd_payment_aps">{l s='При доставка до АПС единствената възможна услуга е наложен платеж и е нужно заплащане на сумата и разходите за доставка с карта!' mod='econt'}</span>
<span style="color: red; display:none;" id="error_cd_payment_aps">{l s='При доставка до АПС единствената възможна услуга е наложен платеж и е нужно заплащане на сумата и разходите за доставка с карта!' mod='econt'}</span>
</td>
</td>
</tr>
</tr>
<tr style="display: none;">
<tr style="display: none;">
<td><label>{l s='Доставка:' mod='econt'}</label></td>
<td><label>{l s='Доставка:' mod='econt'}</label></td>
<td><input type="radio" id="to_door" name="shipping_to" value="DOOR" {if $shipping_to == 'DOOR'}checked="checked"{/if} onclick="$('#econt_office_city_id,#econt_office_city_aps_id,#econt_office_id,#econt_office_aps_id,#econt_office_code,#econt_office_aps_code,#econt_office_locator,#aps_info,#content_services_aps,#city_select_office').hide();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#content_services,#city_select_door').show();" />
<td><input type="radio" id="to_door" name="shipping_to" value="DOOR" {if $shipping_to == 'DOOR'}checked="checked"{/if} onclick="$('#econt_office_city_id,#econt_office_city_aps_id,#econt_office_id,#econt_office_aps_id,#econt_office_code,#econt_office_aps_code,#econt_office_locator,#aps_info,#content_services_aps,#city_select_office').hide();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#content_services,#city_select_door').show();" />
<label for="to_door">{l s='до врата' mod='econt'}</label>
<label for="to_door">{l s='до врата' mod='econt'}</label>
<input type="radio" id="to_office" name="shipping_to" value="OFFICE" {if $shipping_to == 'OFFICE'}checked="checked"{/if} onclick="$('#econt_office_city_id,#econt_office_id,#econt_office_code,#econt_office_locator,#content_services,#city_select_office').show();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_city_aps_id,#econt_office_aps_id,#econt_office_aps_code,#aps_info,#content_services_aps,#city_select_door').hide();loadChosen();" />
<input type="radio" id="to_office" name="shipping_to" value="OFFICE" {if $shipping_to == 'OFFICE'}checked="checked"{/if} onclick="$('#econt_office_city_id,#econt_office_id,#econt_office_code,#econt_office_locator,#content_services,#city_select_office').show();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_city_aps_id,#econt_office_aps_id,#econt_office_aps_code,#aps_info,#content_services_aps,#city_select_door').hide();loadChosen();" />
<label for="to_office">{l s='до офис' mod='econt'}</label>
<label for="to_office">{l s='до офис' mod='econt'}</label>
<input type="radio" id="to_aps" name="shipping_to" value="APS" {if $shipping_to == 'APS'}checked="checked"{/if} onclick="$('#econt_office_city_aps_id,#econt_office_aps_code,#econt_office_aps_id,#aps_info,#content_services_aps,#city_select_door').show();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_locator,#econt_office_city_id,#econt_office_id,#econt_office_code,#content_services,#city_select_office').hide();" />
<input type="radio" id="to_aps" name="shipping_to" value="APS" {if $shipping_to == 'APS'}checked="checked"{/if} onclick="$('#econt_office_city_aps_id,#econt_office_aps_code,#econt_office_aps_id,#aps_info,#content_services_aps,#city_select_door').show();$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_locator,#econt_office_city_id,#econt_office_id,#econt_office_code,#content_services,#city_select_office').hide();" />
<label for="to_aps">{l s='до АПС' mod='econt'}</label></td>
<label for="to_aps">{l s='до АПС' mod='econt'}</label></td>
</tr>
</tr>
<tr style="display:none">
<tr style="display:none">
<td><label for="company">{l s='Фирма (незадължително):' mod='econt'}</label></td>
<td><label for="company">{l s='Фирма (незадължително):' mod='econt'}</label></td>
<td><input type="text" id="company" name="company" value="{$company}" /></td>
<td><input type="text" id="company" name="company" value="{$company}" /></td>
</tr>
</tr>
<tr>
<tr>
<td id="econt_city">
<td id="econt_city">
<label for="city">{l s='Населено място:' mod='econt'}</label><br>
<label for="city">{l s='Населено място:' mod='econt'}</label><br>
<div id="city_select_office"{if $shipping_to != 'OFFICE' || !$to_office} style="display: none;"{/if}>
<div id="city_select_office"{if $shipping_to != 'OFFICE' || !$to_office} style="display: none;"{/if}>
<select id="city_select">
<select id="city_select">
<option>{l s=' --- Населено място --- ' mod='econt'}</option>
<option>{l s=' --- Населено място --- ' mod='econt'}</option>
{foreach $cities as $c}
{foreach $cities as $c}
<option value="{$c.city_id}" data-post-code="{$c.post_code}"{if $c.city_id == $city_id}{assign var=addessOfficeLocator value=$c.name} selected="selected"{/if}>{$c.name}</option>
<option value="{$c.city_id}" data-post-code="{$c.post_code}"{if $c.city_id == $city_id}{assign var=addessOfficeLocator value=$c.name} selected="selected"{/if}>{$c.name}</option>
{/foreach}
{/foreach}
</select>
</select>
</div>
</div>
<div id="city_select_door"{if $shipping_to == 'OFFICE' && $to_office} style="display: none;"{/if}>
<div id="city_select_door"{if $shipping_to == 'OFFICE' && $to_office} style="display: none;"{/if}>
<input type="text" id="city" name="city" value="{$city}" />
<input type="text" id="city" name="city" value="{$city}" />
</div>
</div>
<input type="hidden" id="city_id" name="city_id" value="{$city_id}" />
<input type="hidden" id="city_id" name="city_id" value="{$city_id}" />
<input type="hidden" id="office_city_id" name="office_city_id" value="{$city_id}">
<input type="hidden" id="office_city_id" name="office_city_id" value="{$city_id}">
<input type="hidden" id="office_city_aps_id" name="office_city_aps_id" value="{$city_id}">
<input type="hidden" id="office_city_aps_id" name="office_city_aps_id" value="{$city_id}">
</td>
</td>
<td id="econt_post_code">
<td id="econt_post_code">
<label for="post_code">{l s='Пощенски код:' mod='econt'}</label><br>
<label for="post_code">{l s='Пощенски код:' mod='econt'}</label><br>
<input type="text" id="post_code" style="width: 50px;" name="postcode" value="{$postcode}" size="3" disabled="disabled" />
<input type="text" id="post_code" style="width: 50px;" name="postcode" value="{$postcode}" size="3" disabled="disabled" />
</td>
</td>
</tr>
</tr>


<tr>
<tr>
<td id="econt_street">
<td id="econt_street">
<label for="street">{l s='Улица:' mod='econt'}</label><br>
<label for="street">{l s='Улица:' mod='econt'}</label><br>
<input type="text" id="street" name="street" value="{$street}" />
<input type="text" id="street" name="street" value="{$street}" />
</td>
</td>
<td id="econt_street_num">
<td id="econt_street_num">
<label for="street_num">{l s='Номер:' mod='econt'}</label><br>
<label for="street_num">{l s='Номер:' mod='econt'}</label><br>
<input type="text" id="street_num" name="street_num" value="{$street_num}" />
<input type="text" id="street_num" name="street_num" value="{$street_num}" />
</td>
</td>
</tr>
</tr>


<tr>
<tr>
<td id="econt_quarter">
<td id="econt_quarter">
<label for="quarter">{l s='Квартал:' mod='econt'}</label><br>
<label for="quarter">{l s='Квартал:' mod='econt'}</label><br>
<input type="text" id="quarter" name="quarter" value="{$quarter}" />
<input type="text" id="quarter" name="quarter" value="{$quarter}" />
</td>
</td>
<td id="econt_other">
<td id="econt_other">
<label for="other">{l s='Друго:' mod='econt'}</label><br>
<label for="other">{l s='Друго:' mod='econt'}</label><br>
<input type="text" id="outher" name="outher" value="{$other}" />
<input type="text" id="outher" name="outher" value="{$other}" />
</td>
</td>
</tr>
</tr>


<tr>
<tr>
<td></td>
<td></td>
<td>
<td>
<span style="color: red; display:none;" id="error_address">{l s='Адресът е невалиден!' mod='econt'}</span>
<span style="color: red; display:none;" id="error_address">{l s='Адресът е невалиден!' mod='econt'}</span>
</td>
</td>
</tr>
</tr>


<tr id="econt_office_id" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<tr id="econt_office_id" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<td colspan="2">
<td colspan="2">
<label for="office_id">{l s='Офис:' mod='econt'}</label><br>
<label for="office_id">{l s='Офис:' mod='econt'}</label><br>
<select id="office_name_select">
<select id="office_name_select">
<option>{if $city_id|is_numeric and $city_id}{l s=' --- Моля, изберете --- ' mod='econt'}{else}{l s=' --- Офис Еконт --- ' mod='econt'}{/if}</option>
<option>{if $city_id|is_numeric and $city_id}{l s=' --- Моля, изберете --- ' mod='econt'}{else}{l s=' --- Офис Еконт --- ' mod='econt'}{/if}</option>
{foreach $offices as $o}
{foreach $offices as $o}
<option value="{$o.office_id}"{if $o.office_id == $office_id}{assign var=addessOfficeLocator value=$o.address} selected="selected"{/if}>{$o.name}, {$o.office_code}, {$o.address}</option>
<option value="{$o.office_id}"{if $o.office_id == $office_id}{assign var=addessOfficeLocator value=$o.address} selected="selected"{/if}>{$o.name}, {$o.office_code}, {$o.address}</option>
{/foreach}
{/foreach}
</select>
</select>
<input type="hidden" id="office_name" name="office_name" value="{$office_name}">
<input type="hidden" id="office_name" name="office_name" value="{$office_name}">
<input type="hidden" id="office_id" name="office_id" value="{$office_id}">
<input type="hidden" id="office_id" name="office_id" value="{$office_id}">
<span style="color: red; display:none;" id="error_office">{l s='Моля, изберете офис!' mod='econt'}</span>
<span style="color: red; display:none;" id="error_office">{l s='Моля, изберете офис!' mod='econt'}</span>
</td>
</td>
</tr>
</tr>
<tr id="econt_office_aps_id" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<tr id="econt_office_aps_id" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<td colspan="2">
<td colspan="2">
<label for="office_aps_id">{l s='Офис:' mod='econt'}</label><br>
<label for="office_aps_id">{l s='Офис:' mod='econt'}</label><br>
<select id="office_aps_id" name="office_aps_id" onchange="getOffice(1);">
<select id="office_aps_id" name="office_aps_id" onchange="getOffice(1);">
<option value="0">{l s=' --- Моля, изберете --- ' mod='econt'}</option>
<option value="0">{l s=' --- Моля, изберете --- ' mod='econt'}</option>
{foreach $offices_aps as $office_aps}
{foreach $offices_aps as $office_aps}
{if $office_aps.office_id == $office_aps_id}
{if $office_aps.office_id == $office_aps_id}
<option value="{$office_aps.office_id}" selected="selected">{$office_aps.office_code}, {$office_aps.name}, {$office_aps.address}</option>
<option value="{$office_aps.office_id}" selected="selected">{$office_aps.office_code}, {$office_aps.name}, {$office_aps.address}</option>
{else}
{else}
<option value="{$office_aps.office_id}">{$office_aps.office_code}, {$office_aps.name}, {$office_aps.address}</option>
<option value="{$office_aps.office_id}">{$office_aps.office_code}, {$office_aps.name}, {$office_aps.address}</option>
{/if}
{/if}
{/foreach}
{/foreach}
</select>
</select>
<span style="color: red; display:none;" id="error_office_aps">{l s='Моля, изберете офис!' mod='econt'}</span>
<span style="color: red; display:none;" id="error_office_aps">{l s='Моля, изберете офис!' mod='econt'}</span>
</td>
</td>
</tr>
</tr>
<tr id="econt_office_code" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<tr id="econt_office_code" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<td colspan="2" style="display: none;">
<td colspan="2" style="display: none;">
<label for="office_code">{l s='Код на офиса:' mod='econt'}</label><br>
<label for="office_code">{l s='Код на офиса:' mod='econt'}</label><br>
<input type="text" id="office_code" name="office_code" value="{$office_code}" size="3" disabled="disabled" />
<input type="text" id="office_code" name="office_code" value="{$office_code}" size="3" disabled="disabled" />
</td>
</td>
</tr>
</tr>
<tr id="econt_office_aps_code" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<tr id="econt_office_aps_code" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<td colspan="2" style="display: none;">
<td colspan="2" style="display: none;">
<label for="office_aps_code">{l s='Код на офиса:' mod='econt'}</label><br>
<label for="office_aps_code">{l s='Код на офиса:' mod='econt'}</label><br>
<input type="text" id="office_aps_code" name="office_aps_code" value="{$office_aps_code}" size="3" disabled="disabled" />
<input type="text" id="office_aps_code" name="office_aps_code" value="{$office_aps_code}" size="3" disabled="disabled" />
</td>
</td>
</tr>
</tr>
<tr id="econt_office_locator" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<tr id="econt_office_locator" {if $shipping_to != 'OFFICE' || !$to_office}style="display: none;"{/if}>
<td colspan="2"><a href="javascript:;" id="office_locator" class="btn btn-primary"><span>{l s='Офис Локатор' mod='econt'}</span></a></td>
<td colspan="2"><a href="javascript:;" id="office_locator" class="btn btn-primary"><span>{l s='Офис Локатор' mod='econt'}</span></a></td>
</tr>
</tr>
</table>
</table>
<table class="econt_shipping" id="services_door" {if $shipping_to == 'OFFICE' || $shipping_to == 'APS' || !$to_door}style="display: none;"{/if}>
<table class="econt_shipping" id="services_door" {if $shipping_to == 'OFFICE' || $shipping_to == 'APS' || !$to_door}style="display: none;"{/if}>
<tr id="priority_time" {if !$priority_time}style="display: none;"{/if}>
<tr id="priority_time" {if !$priority_time}style="display: none;"{/if}>
<td>
<td>
<input type="checkbox" id="priority_time_cb" name="priority_time_cb" value="1" {if $priority_time_cb} checked="checked"{/if} onclick="checkPriorityTime();" />
<input type="checkbox" id="priority_time_cb" name="priority_time_cb" value="1" {if $priority_time_cb} checked="checked"{/if} onclick="checkPriorityTime();" />
<label for="priority_time_cb">{l s='Час за приоритет:' mod='econt'}</label>
<label for="priority_time_cb">{l s='Час за приоритет:' mod='econt'}</label>
</td>
</td>
<td>
<td>
<select id="priority_time_type_id" name="priority_time_type_id" {if !$priority_time_cb}disabled="disabled"{/if} onchange="setPriorityTime();">
<select id="priority_time_type_id" name="priority_time_type_id" {if !$priority_time_cb}disabled="disabled"{/if} onchange="setPriorityTime();">
{foreach $priority_time_types as $priority_time_type}
{foreach $priority_time_types as $priority_time_type}
{if $priority_time_type.id == $priority_time_type_id}
{if $priority_time_type.id == $priority_time_type_id}
{$priority_time_hours = $priority_time_type.hours}
{$priority_time_hours = $priority_time_type.hours}
<option value="{$priority_time_type.id}" selected="selected">{$priority_time_type.name}</option>
<option value="{$priority_time_type.id}" selected="selected">{$priority_time_type.name}</option>
{else}
{else}
<option value="{$priority_time_type.id}">{$priority_time_type.name}</option>
<option value="{$priority_time_type.id}">{$priority_time_type.name}</option>
{/if}
{/if}
{/foreach}
{/foreach}
</select>
</select>
<select id="priority_time_hour_id" name="priority_time_hour_id" {if !$priority_time_cb}disabled="disabled"{/if}>
<select id="priority_time_hour_id" name="priority_time_hour_id" {if !$priority_time_cb}disabled="disabled"{/if}>
{foreach $priority_time_hours as $priority_time_hour}
{foreach $priority_time_hours as $priority_time_hour}
{if $priority_time_hour == $priority_time_hour_id}
{if $priority_time_hour == $priority_time_hour_id}
<option value="{$priority_time_hour}" selected="selected">{$priority_time_hour}</option>
<option value="{$priority_time_hour}" selected="selected">{$priority_time_hour}</option>
{else}
{else}
<option value="{$priority_time_hour}">{$priority_time_hour}</option>
<option value="{$priority_time_hour}">{$priority_time_hour}</option>
{/if}
{/if}
{/foreach}
{/foreach}
</select>
</select>
<label for="priority_time_hour_id">{l s='ч.' mod='econt'}</label>
<label for="priority_time_hour_id">{l s='ч.' mod='econt'}</label>
<span style="color: red; display:none;" id="error_priority_time">{l s='Моля, въведете час!' mod='econt'}</span>
<span style="color: red; display:none;" id="error_priority_time">{l s='Моля, въведете час!' mod='econt'}</span>
</td>
</td>
</tr>
</tr>
<tr id="express_city_courier" {if !$express_city_courier} style="display: none;"{/if}>
<tr id="express_city_courier" {if !$express_city_courier} style="display: none;"{/if}>
<td>
<td>
<input type="checkbox" id="express_city_courier_cb" name="express_city_courier_cb" value="1" {if $express_city_courier_cb} checked="checked"{/if} onclick="checkExpressCityCourier();" />
<input type="checkbox" id="express_city_courier_cb" name="express_city_courier_cb" value="1" {if $express_city_courier_cb} checked="checked"{/if} onclick="checkExpressCityCourier();" />
<label for="express_city_courier_cb">{l s='Експресен градски куриер:' mod='econt'}</label>
<label for="express_city_courier_cb">{l s='Експресен градски куриер:' mod='econt'}</label>
</td>
</td>
<td>
<td>
<input type="radio" id="express_city_courier_e1" name="express_city_courier_e" value="e1" {if $express_city_courier_e == 'e1'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<input type="radio" id="express_city_courier_e1" name="express_city_courier_e" value="e1" {if $express_city_courier_e == 'e1'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<label for="express_city_courier_e1">{l s='до 60 мин (Е1)' mod='econt'}</label><br>
<label for="express_city_courier_e1">{l s='до 60 мин (Е1)' mod='econt'}</label><br>
<input type="radio" id="express_city_courier_e2" name="express_city_courier_e" value="e2" {if $express_city_courier_e == 'e2'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<input type="radio" id="express_city_courier_e2" name="express_city_courier_e" value="e2" {if $express_city_courier_e == 'e2'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<label for="express_city_courier_e2">{l s='до 120 мин (Е2)' mod='econt'}</label><br>
<label for="express_city_courier_e2">{l s='до 120 мин (Е2)' mod='econt'}</label><br>
<input type="radio" id="express_city_courier_e3" name="express_city_courier_e" value="e3" {if $express_city_courier_e == 'e3'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<input type="radio" id="express_city_courier_e3" name="express_city_courier_e" value="e3" {if $express_city_courier_e == 'e3'} checked="checked"{/if} {if !$express_city_courier_cb} disabled="disabled"{/if} />
<label for="express_city_courier_e3">{l s='в рамките на деня (Е3)' mod='econt'}</label></td>
<label for="express_city_courier_e3">{l s='в рамките на деня (Е3)' mod='econt'}</label></td>
</tr>
</tr>
</table>
</table>
<table>
<table>
<tr {if !$delivery_day || !$delivery_days && !$error_delivery_day} style="display: none;"{/if}>
<tr {if !$delivery_day || !$delivery_days && !$error_delivery_day} style="display: none;"{/if}>
<td><label for="delivery_day_id">{l s='Ден за разнос:' mod='econt'}</label></td>
<td><label for="delivery_day_id">{l s='Ден за разнос:' mod='econt'}</label></td>
<td><select id="delivery_day_id" name="delivery_day_id" onchange="changeDeliveryDay(true);">
<td><select id="delivery_day_id" name="delivery_day_id" onchange="changeDeliveryDay(true);">
{foreach $delivery_days as $delivery_day}
{foreach $delivery_days as $delivery_day}
{if $delivery_day.id == $delivery_day_id}
{if $delivery_day.id == $delivery_day_id}
<option value="{$delivery_day.id}" selected="selected">{$delivery_day.name}</option>
<option value="{$delivery_day.id}" selected="selected">{$delivery_day.name}</option>
{else}
{else}
<option value="{$delivery_day.id}">{$delivery_day.name}</option>
<option value="{$delivery_day.id}">{$delivery_day.name}</option>
{/if}
{/if}
{/foreach}
{/foreach}
</select>
</select>
<span style="color: red; display:none;" id="error_delivery_day">{$error_delivery_day}</span>
<span style="color: red; display:none;" id="error_delivery_day">{$error_delivery_day}</span>
</td>
</td>
</tr>
</tr>
</table>
</table>
<div id="showbtnfun" style="display: block; text-align: center;">
<div id="showbtnfun" style="display: block; text-align: center;">
<button type="button" id="btn_place_order" class="btn btn-primary btn-lg" >
<button type="button" id="btn_place_order" class="btn btn-primary btn-lg" >
{*&raquo; <i class="fa-pts fa-pts-shopping-cart fa-pts-1x"></i>*}
{*&raquo; <i class="fa-pts fa-pts-shopping-cart fa-pts-1x"></i>*}
&raquo; {l s='Checkout' mod='onepagecheckoutps'} &laquo;
&raquo; {l s='Checkout' mod='onepagecheckoutps'} &laquo;
</button>
</button>
</div>
</div>
</div>
</div>
<div class="content" id="content_services" {if $shipping_to == 'APS' || $to_aps}style="display: none;"{/if}>
<div class="content" id="content_services" {if $shipping_to == 'APS' || $to_aps}style="display: none;"{/if}>
{if $dc}
{if $dc}
<p><i>{l s='Добавена е услугата обратна разписка.' mod='econt'}</i></p>
<p><i>{l s='Добавена е услугата обратна разписка.' mod='econt'}</i></p>
{/if}
{/if}
{if $dc_cp}
{if $dc_cp}
<p><i>{l s='Добавена е услугата обратна разписка/стокова разписка.' mod='econt'}</i></p>
<p><i>{l s='Добавена е услугата обратна разписка/стокова разписка.' mod='econt'}</i></p>
{/if}
{/if}
{if $invoice_before_cd}
{if $invoice_before_cd}
<p><i>{l s='Добавена е услугата предай фактура преди плащане на наложения платеж.' mod='econt'}</i></p>
<p><i>{l s='Добавена е услугата предай фактура преди плащане на наложения платеж.' mod='econt'}</i></p>
{/if}
{/if}
{if $pay_after_accept}
{if $pay_after_accept}
<p><i>{l s='Търговецът позволява пратката да се прегледа от получателя и да плати наложения платеж само ако приеме стоката.' mod='econt'}</i></p>
<p><i>{l s='Търговецът позволява пратката да се прегледа от получателя и да плати наложения платеж само ако приеме стоката.' mod='econt'}</i></p>
{/if}
{/if}
{if $pay_after_test}
{if $pay_after_test}
<p><i>{l s='Търговецът позволява пратката да се прегледа и тества от получателя и да плати наложения платеж само ако приеме стоката.' mod='econt'}</i></p>
<p><i>{l s='Търговецът позволява пратката да се прегледа и тества от получателя и да плати наложения платеж само ако приеме стоката.' mod='econt'}</i></p>
{/if}
{/if}
</div>
</div>
<div class="content" id="content_services_aps" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<div class="content" id="content_services_aps" {if $shipping_to != 'APS' || !$to_aps}style="display: none;"{/if}>
<p><i>{l s='При доставка до "24 часа Еконт - Автоматична пощенска станция”(АПС) единствената възможна услуга е наложен платеж, а заплащането на сумата и разходите за доставка става на място с карта.' mod='econt'}</i></p>
<p><i>{l s='При доставка до "24 часа Еконт - Автоматична пощенска станция”(АПС) единствената възможна услуга е наложен платеж, а заплащането на сумата и разходите за доставка става на място с карта.' mod='econt'}</i></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
<script type="text/javascript"><!--
{literal}
{literal}
var officeLocatorAddress = '{/literal}{if isset($addessOfficeLocator)}{$addessOfficeLocator}{/if}{literal}';
var officeLocatorAddress = '{/literal}{if isset($addessOfficeLocator)}{$addessOfficeLocator}{/if}{literal}';
function receiveMessage(event) {
function receiveMessage(event) {
if (event.origin !== '{/literal}{$office_locator_domain}{literal}')
if (event.origin !== '{/literal}{$office_locator_domain}{literal}')
return;
return;


message_array = event.data.split('||');
message_array = event.data.split('||');
getOfficeByOfficeCode(message_array[0]);
getOfficeByOfficeCode(message_array[0]);
$.fancybox.close();
$.fancybox.close();
}
}


if (window.addEventListener) {
if (window.addEventListener) {
window.addEventListener('message', receiveMessage, false);
window.addEventListener('message', receiveMessage, false);
} else if (window.attachEvent) {
} else if (window.attachEvent) {
window.attachEvent('onmessage', receiveMessage);
window.attachEvent('onmessage', receiveMessage);
}
}


function changeOfficeLocatorUrl() {
function changeOfficeLocatorUrl() {
$('a#office_locator').fancybox({
$('a#office_locator').fancybox({
type : 'iframe',
type : 'iframe',
href : '{/literal}{$office_locator}{literal}&{/literal}{$shop_url}{literal}&address=' + encodeURI(officeLocatorAddress),
href : '{/literal}{$office_locator}{literal}&{/literal}{$shop_url}{literal}&address=' + encodeURI(officeLocatorAddress),
width : '1000',
width : '1000',
height : '800'
height : '800'
});
});
}
}


function getOfficeByOfficeCode(office_code) {
function getOfficeByOfficeCode(office_code) {
if (parseInt(office_code)) {
if (parseInt(office_code)) {
$.ajax({
$.ajax({
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=get_office_by_office_code',
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=get_office_by_office_code',
type: 'POST',
type: 'POST',
data: 'office_code=' + parseInt(office_code) + '&delivery_type=to_office',
data: 'office_code=' + parseInt(office_code) + '&delivery_type=to_office',
dataType: 'json',
dataType: 'json',
success: function(data) {
success: function(data) {
if (!data.error) {
if (!data.error) {
$.ajax({
$.ajax({
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=get_offices_by_city_id',
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=get_offices_by_city_id',
type: 'POST',
type: 'POST',
data: 'city_id=' + data.city['city_id'] + '&aps=0',
data: 'city_id=' + data.city['city_id'] + '&aps=0',
dataType: 'json',
dataType: 'json',
success: function(data2) {
success: function(data2) {
$('#office_name_select').empty();
$('#office_name_select').empty();
var textChoose = 'Моля, изберете';
var textChoose = 'Моля, изберете';
if (data2.length === 0) {
if (data2.length === 0) {
textChoose = 'Офис Еконт';
textChoose = 'Офис Еконт';
}
}
$('#office_name_select').append('<option value="0">{/literal}{l s=" --- ' + textChoose + ' --- " mod="econt"}{literal}</option>');
$('#office_name_select').append('<option value="0">{/literal}{l s=" --- ' + textChoose + ' --- " mod="econt"}{literal}</option>');
for (let i = 0; i < data2.length; i++) {
for (let i = 0; i < data2.length; i++) {
$('#office_name_select').append('<option value="' + data2[i].office_id + '">' + data2[i].name + ', ' + data2[i].office_code + ', ' + data2[i].address + '</option>');
$('#office_name_select').append('<option value="' + data2[i].office_id + '">' + data2[i].name + ', ' + data2[i].office_code + ', ' + data2[i].address + '</option>');
}
}
$('#city_select option').removeAttr('selected');
$('#city_select option').removeAttr('selected');
$('#city_select option[value="' + data.city['city_id'] + '"]').prop('selected', 'selected');
$('#city_select option[value="' + data.city['city_id'] + '"]').prop('selected', 'selected');
$('#office_name_select option').removeAttr('selected');
$('#office_name_select option').removeAttr('selected');
$('#office_name_select option[value="' + data.office['office_id'] + '"]').prop('selected', 'selected');
$('#office_name_select option[value="' + data.office['office_id'] + '"]').prop('selected', 'selected');


$('#city_select').trigger('chosen:updated');
$('#city_select').trigger('chosen:updated');
$('#office_name_select').trigger('chosen:updated');
$('#office_name_select').trigger('chosen:updated');


$('#office_id').val(data.office['office_id']);
$('#office_id').val(data.office['office_id']);
$('#office_name').val(data.office['office_code'] + ', ' + data.office['name'] + ', ' + data.office['address']);
$('#office_name').val(data.office['office_code'] + ', ' + data.office['name'] + ', ' + data.office['address']);
$('#city').val(data.city['name']);
$('#city').val(data.city['name']);
$('#city_id').val(data.city['city_id']);
$('#city_id').val(data.city['city_id']);
$('#office_city_id').val(data.city['city_id']);
$('#office_city_id').val(data.city['city_id']);
$('#office_city_aps_id').val(data.city['city_id']);
$('#office_city_aps_id').val(data.city['city_id']);
$('#post_code').val(data.city['post_code']);
$('#post_code').val(data.city['post_code']);


econtSubmit(false);
econtSubmit(false);


$('#express_city_courier').hide();
$('#express_city_courier').hide();


getApsByCityId();
getApsByCityId();
}
}
});
});
}
}
}
}
});
});
}
}
}
}
{/literal}
{/literal}
//--></script>
//--></script>
<script type="text/javascript"><!--
<script type="text/javascript"><!--
var econt_carrier_id = {$econt_carrier_id};
var econt_carrier_id = {$econt_carrier_id};
var calculated_price = '{$calculated_price}';
var calculated_price = '{$calculated_price}';
var priority_time = '{$priority_time}';
var priority_time = '{$priority_time}';
{literal}
{literal}


var refreshTimer;
var refreshTimer;
var chosen_loaded = false;
var chosen_loaded = false;
var timer_update_review;
var timer_update_review;
function loadChosen() {
function loadChosen() {
if (chosen_loaded) {
if (chosen_loaded) {
return;
return;
}
}
chosen_loaded = true;
chosen_loaded = true;
setTimeout(function() {
setTimeout(function() {
$('#city_select').chosen({
$('#city_select').chosen({
disable_search_threshold: 5,
disable_search_threshold: 5,
no_results_text: '{/literal}{l s='Oops, nothing found!' mod='econt'}{literal}',
no_results_text: '{/literal}{l s='Oops, nothing found!' mod='econt'}{literal}',
placeholder_text_single: '{/literal}{l s=" --- Моля, изберете --- " mod="econt"}{literal}',
placeholder_text_single: '{/literal}{l s=" --- Моля, изберете --- " mod="econt"}{literal}',
height: '100px'
height: '100px'
});
});
$('#city_select_chosen').css('width', $('#city_select_chosen').closest('td').width());
$('#city_select_chosen').css('width', $('#city_select_chosen').closest('td').width());


$('#office_name_select').chosen({
$('#office_name_select').chosen({
disable_search_threshold: 5,
disable_search_threshold: 5,
no_results_text: '{/literal}{l s='Oops, nothing found!' mod='econt'}{literal}',
no_results_text: '{/literal}{l s='Oops, nothing found!' mod='econt'}{literal}',
placeholder_text_single: '{/literal}{l s=" --- Моля, изберете --- " mod="econt"}{literal}',
placeholder_text_single: '{/literal}{l s=" --- Моля, изберете --- " mod="econt"}{literal}',
});
});
if($('#office_name_select option').length == 2){
$('#office_name_select option:last-child').attr('selected','selected');
$('#office_name_select').trigger('chosen:updated');
$('#office_name_select').trigger('change');
}
$('#office_name_select_chosen').css('width', $('#office_name_select_chosen').closest('td').width());
$('#office_name_select_chosen').css('width', $('#office_name_select_chosen').closest('td').width());
}, 1);
}, 1);
}
}


$(document).ready(function() {
$(document).ready(function() {
changeOfficeLocatorUrl();
changeOfficeLocatorUrl();
{/literal}{if $shipping_to == 'OFFICE' && $to_office}{literal}
{/literal}{if $shipping_to == 'OFFICE' && $to_office}{literal}
loadChosen();
loadChosen();
{/literal}{/if}{literal}
{/literal}{/if}{literal}
{/literal}{if $cd}{literal}
{/literal}{if $cd}{literal}
$('#cd_yes, #cd_no').on('change',function() {
$('#cd_yes, #cd_no').on('change',function() {
$('input[name=method_payment]').each(function() {
$('input[name=method_payment]').each(function() {
if ($('input[name=cd_payment]:checked').val() == 1) {
if ($('input[name=cd_payment]:checked').val() == 1) {
if ($(this).val() == 'econtpayment') {
if ($(this).val() == 'econtpayment') {
$(this).closest('div.module_payment_container').show();
$(this).closest('div.module_payment_container').show();
} else {
} else {
$(this).closest('div.module_payment_container').hide();
$(this).closest('div.module_payment_container').hide();
}
}
} else {
} else {
if ($(this).val() == 'econtpayment') {
if ($(this).val() == 'econtpayment') {
$(this).closest('div.module_payment_container').hide();
$(this).closest('div.module_payment_container').hide();
} else {
} else {
$(this).closest('div.module_payment_container').show();
$(this).closest('div.module_payment_container').show();
}
}
}
}
});
});
});
});
{/literal}{/if}{literal}
{/literal}{/if}{literal}


if ($('#delivery_day_id').is(':visible')) {
if ($('#delivery_day_id').is(':visible')) {
changeDeliveryDay(false);
changeDeliveryDay(false);
}
}


if ($('input#to_office').is(":checked")) {
if ($('input#to_office').is(":checked")) {
$('#econt_office_city_id,#econt_office_id,#econt_office_code,#econt_office_locator,#content_services').show();
$('#econt_office_city_id,#econt_office_id,#econt_office_code,#econt_office_locator,#content_services').show();
$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_city_aps_id,#econt_office_aps_id,#econt_office_aps_code,#aps_info,#content_services_aps').hide();
$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_city_aps_id,#econt_office_aps_id,#econt_office_aps_code,#aps_info,#content_services_aps').hide();
}
}


if ($('input#to_aps').is(":checked")) {
if ($('input#to_aps').is(":checked")) {
$('#econt_office_city_aps_id,#econt_office_aps_code,#econt_office_aps_id,#aps_info,#content_services_aps').show();
$('#econt_office_city_aps_id,#econt_office_aps_code,#econt_office_aps_id,#aps_info,#content_services_aps').show();
$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_locator,#econt_office_city_id,#econt_office_id,#econt_office_code,#content_services').hide();
$('#econt_post_code,#econt_quarter,#econt_street,#econt_street_num,#econt_other,#services_door,#econt_office_locator,#econt_office_city_id,#econt_office_id,#econt_office_code,#content_services').hide();
}
}


$('#cd_yes').click(function() {
$('#cd_yes').click(function() {
if ($('#HOOK_PAYMENT').length != 0) {
if ($('#HOOK_PAYMENT').length != 0) {
$('.payment_module').not('#econt_payment').hide();
$('.payment_module').not('#econt_payment').hide();
$('#econt_payment').show();
$('#econt_payment').show();
}
}
});
});


$('#cd_no').click(function() {
$('#cd_no').click(function() {
if ($('#HOOK_PAYMENT').length != 0) {
if ($('#HOOK_PAYMENT').length != 0) {
$('.payment_module').not('#econt_payment').show();
$('.payment_module').not('#econt_payment').show();
$('#econt_payment').hide();
$('#econt_payment').hide();
}
}
});
});
});
});




function econtSubmit(next_step) {
function econtSubmit(next_step) {
$('#error_message').remove();
$('#error_message').remove();
$('#error_address').hide();
$('#error_address').hide();
$('#error_office').hide();
$('#error_office').hide();
$('#error_office_aps').hide();
$('#error_office_aps').hide();
$('#error_cd_payment_aps').hide();
$('#error_cd_payment_aps').hide();
$('#error_priority_time').hide();
$('#error_priority_time').hide();


$('#econt_form :input').removeAttr('disabled');
$('#econt_form :input').removeAttr('disabled');


success_status = false;
success_status = false;


$.ajax({
$.ajax({
async: false,
async: false,
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=econt',
url: '{/literal}{$this_path}{literal}ajax.php?ajax_function=econt',
type: 'POST',
type: 'POST',
data: $('#econt_form input, #econt_form textarea, #econt_form select, input#email, input#firstname, input#lastname, input#phone, input#phone_mobile').serialize() + '&next_step=' + (next_step ? 1 : 0),
data: $('#econt_form input, #econt_form textarea, #econt_form select, input#email, input#firstname, input#lastname, input#phone, input#phone_mobile').serialize() + '&next_step=' + (next_step ? 1 : 0),
dataType: 'json',
dataType: 'json',
beforeSend: function() {
beforeSend: function() {
$('button[name=\'confirmDeliveryOption\']').attr('disabled', true);
$('button[name=\'confirmDeliveryOption\']').attr('disabled', true);
},
},
complete: function() {
complete: function() {
$('button[name=\'confirmDeliveryOption\']').attr('disabled', false);
$('button[name=\'confirmDeliveryOption\']').attr('disabled', false);
},
},
success: function(data) {
success: function(data) {
if (data) {
if (data) {
$('#post_code').attr('disabled', 'disabled');
$('#post_code').attr('disabled', 'disabled');
$('#office_code').attr('disabled', 'disabled');
$('#office_code').attr('disabled', 'disabled');
if (!$('#express_city_courier_cb:checked').length) {
if (!$('#express_city_courier_cb:checked').length) {
$('#express_city_courier_e1').attr('disabled', 'disabled');
$('#express_city_courier_e1').attr('disabled', 'disabled');
$('#express_city_courier_e2').attr('disabled', 'disabled');
$('#express_city_courier_e2').attr('disabled', 'disabled');
$('#express_city_courier_e3').attr('disabled', 'disabled');
$('#express_city_courier_e3').attr('disabled', 'disabled');
}
}


if($('input.delivery_option_radio').size() > 1) {
if($('input.delivery_option_radio').size() > 1) {
$('input.delivery_option_radio').each(function( index ) {
$('input.delivery_option_radio').each(function( index ) {
if ($(this).is(':checked') && parseInt($(this).val()) == econt_carrier_id) {
if ($(this).is(':checked') && parseInt($(this).val()) == econt_carrier_id) {
$(this).closest('.delivery_option').find('.delivery_option_price').text('');
$(this).closest('.delivery_option').find('.delivery_option_price').text('');
}
}
});
});
} else if ($('input.delivery_option_radio').size() == 1) {
} else if ($('input.delivery_option_radio').size() == 1) {
var str = $('input.delivery_option_radio').val().trim();
var str = $('input.delivery_option_radio').val().trim();
var exploded = str.split(',');
var exploded = str.split(',');
for (i = 0; i < exploded.length-1; i++) {
for (i = 0; i < exploded.length-1; i++) {
if (exploded[i] == econt_carrier_id) {
if (exploded[i] == econt_carrier_id) {
$('input.delivery_option_radio').closest('.delivery_option').find('.delivery_option_price').text('');
$('input.delivery_option_radio').closest('.delivery_option').find('.delivery_option_price').text('');
}
}
}
}
}
}


if (data.error && !data.error.warning.includes('няма офис на Еконт Експрес')) {
if (data.error && !data.error.warning.includes('няма офис на Еконт Експрес')) {
if (data.error.warning) {
if (data.error.warning) {
html = '<span id="error_message" class="error" style="display:block;"><div class="alert alert-danger"><button class="close" type="button" data-dismiss="alert">X</button>'+data.error.warning+'</div></span>';
html = '<span id="error_message" class="error" style="display:block;"><div class="alert alert-danger"><button class="close" type="button" data-dismiss="alert">X</button>'+data.error.warning+'</div></span>';


$('#econt_form').before(html);
$('#econt_form').before(html);
}
}
$('#btn_place_order').attr('disabled', 'disabled');
$('#btn_place_order').attr('disabled', 'disabled');
} else if (data.error_address || data.error_priority_time || data.error_office || data.error_office_aps || data.error_cd_payment_aps) {
} else if (data.error_address || data.error_priority_time || data.error_office || data.error_office_aps || data.error_cd_payment_aps) {
if (data.error_address) {
if (data.error_address) {
$('#error_address').show();
$('#error_address').show();
}
}
if (data.error_priority_time) {
if (data.error_priority_time) {
$('#error_priority_time').show();
$('#error_priority_time').show();
}
}
if (data.error_office) {
if (data.error_office) {
$('#error_office').show();
$('#error_office').show();
}
}
if (data.error_office_aps) {
if (data.error_office_aps) {
$('#error_office_aps').show();
$('#error_office_aps').show();
}
}
if (data.error_cd_payment_aps) {
if (data.error
$('#error_cd_payment_aps').show();
}
$('#btn_place_order').attr('disabled', 'disabled');
} else if (data.methods) {
if (!next_step) {
if (typeof window.Review !== 'undefined') {
cle