mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-24 14:16:07 +03:00
parent
7cdab05aa2
commit
08df9043fa
@ -330,9 +330,10 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
||||
'entry_code',
|
||||
'entry_status',
|
||||
'text_retailcrm_discount',
|
||||
'text_label_retailcrm_discount',
|
||||
'label_retailcrm_discount',
|
||||
'default_label_retailcrm_discount'
|
||||
'text_retailcrm_label_discount',
|
||||
'default_retailcrm_label_discount',
|
||||
'sum_payment',
|
||||
'text_sum_payment'
|
||||
);
|
||||
|
||||
$_data = &$data;
|
||||
|
@ -83,6 +83,8 @@ $_['text_retailcrm_discount'] = 'RetailCRM discount';
|
||||
$_['text_retailcrm_label_discount'] = 'Label of RetailCRM discount in section total of order';
|
||||
$_['default_retailcrm_label_discount'] = 'Discount in RetailCRM';
|
||||
|
||||
$_['sum_payment'] = 'Sum payment';
|
||||
$_['text_sum_payment'] = 'Do not upload the sum payment to RetailCRM';
|
||||
|
||||
$_['article'] = 'Article';
|
||||
$_['color'] = 'Color';
|
||||
|
@ -83,6 +83,9 @@ $_['text_retailcrm_discount'] = 'RetailCRM descuento';
|
||||
$_['text_retailcrm_label_discount'] = 'Etiqueta de descuento de RetailCRM en la sección total del pedido';
|
||||
$_['default_retailcrm_label_discount'] = 'Descuento en RetailCRM';
|
||||
|
||||
$_['sum_payment'] = 'Suma de pago';
|
||||
$_['text_sum_payment'] = 'No transferir suma de pago a RetailCRM';
|
||||
|
||||
$_['article'] = 'Artículo';
|
||||
$_['color'] = 'Color';
|
||||
$_['weight'] = 'Peso';
|
||||
|
@ -83,6 +83,9 @@ $_['text_retailcrm_discount'] = 'Скидка RetailCRM';
|
||||
$_['text_retailcrm_label_discount'] = 'Подпись для скидки, установленной в RetailCRM, в итоговой секции заказа';
|
||||
$_['default_retailcrm_label_discount'] = 'Скидка в RetailCRM';
|
||||
|
||||
$_['sum_payment'] = 'Сумма платежа';
|
||||
$_['text_sum_payment'] = 'Не передавать сумму платежа в RetailCRM';
|
||||
|
||||
$_['article'] = 'Артикул';
|
||||
$_['color'] = 'Цвет';
|
||||
$_['weight'] = 'Вес';
|
||||
|
@ -222,6 +222,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $sum_payment; ?></legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="retailcrm_sum_payment"><?php echo $text_sum_payment?></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="retailcrm_sum_payment" value="1" <?php if (isset($saved_settings['retailcrm_sum_payment']) &&
|
||||
$saved_settings['retailcrm_sum_payment'] == 1) :
|
||||
echo 'checked'; endif;?> />
|
||||
<?php echo $text_yes; ?>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="retailcrm_sum_payment" value="0" <?php if (!isset($saved_settings['retailcrm_sum_payment']) ||
|
||||
$saved_settings['retailcrm_sum_payment'] == 0) :
|
||||
echo 'checked'; endif;?> />
|
||||
<?php echo $text_no; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-references">
|
||||
<fieldset>
|
||||
|
@ -229,6 +229,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ sum_payment }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="module_retailcrm_sum_payment">{{ text_sum_payment }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="control-label radio-inline">
|
||||
<input type="radio" name="module_retailcrm_sum_payment" value="1"
|
||||
{% if saved_settings.module_retailcrm_sum_payment is defined and saved_settings.module_retailcrm_sum_payment == 1 %}
|
||||
checked
|
||||
{% endif %} >
|
||||
{{ text_yes }}
|
||||
</label>
|
||||
<label class="control-label radio-inline">
|
||||
<input type="radio" name="module_retailcrm_sum_payment" value="0"
|
||||
{% if saved_settings.module_retailcrm_sum_payment is not defined or saved_settings.module_retailcrm_sum_payment == 0 %}
|
||||
checked
|
||||
{% endif %} >
|
||||
{{ text_no }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-references">
|
||||
<fieldset>
|
||||
|
@ -293,6 +293,12 @@ class ModelExtensionRetailcrmOrder extends Model {
|
||||
'amount' => $totals['total']
|
||||
);
|
||||
|
||||
if (isset($this->settings[$this->moduleTitle . '_sum_payment']) &&
|
||||
$this->settings[$this->moduleTitle . '_sum_payment'] == 1
|
||||
) {
|
||||
unset($payment['amount']);
|
||||
}
|
||||
|
||||
if (!$create) {
|
||||
$payment['order'] = array(
|
||||
'externalId' => $order_id
|
||||
|
@ -113,6 +113,11 @@ class RetailcrmOrderConverter {
|
||||
'amount' => $this->getTotal('total')
|
||||
);
|
||||
|
||||
if ($this->settingsManager->getSetting('sum_payment') &&
|
||||
$this->settingsManager->getSetting('sum_payment') == 1) {
|
||||
unset($payment['amount']);
|
||||
}
|
||||
|
||||
if (!empty($payment_type)) {
|
||||
$payment['type'] = $payment_type;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user