mirror of
https://github.com/retailcrm/opencart-module.git
synced 2025-02-01 23:41:43 +03:00
Added option to round order amount (#269)
This commit is contained in:
parent
c5916fc8f2
commit
b1d013dd30
@ -1,3 +1,6 @@
|
||||
## v4.1.19
|
||||
* Added option to round order amount
|
||||
|
||||
## v4.1.18
|
||||
* Fixed constant with version of module.
|
||||
|
||||
|
@ -301,6 +301,8 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
||||
'special_price',
|
||||
'order_number',
|
||||
'text_order_number',
|
||||
'summ_around',
|
||||
'text_summ_around',
|
||||
'icml_settings',
|
||||
'icml_service_enabled_label',
|
||||
'icml_service_description',
|
||||
|
@ -72,6 +72,8 @@ $_['retailcrm_missing_status'] = 'Status of lost orders';
|
||||
|
||||
$_['order_number'] = 'Order number';
|
||||
$_['text_order_number'] = 'Upload the order number to RetailCRM';
|
||||
$_['summ_around'] = 'Around total summ';
|
||||
$_['text_summ_around'] = 'Around the order total summ';
|
||||
$_['icml_settings'] = 'ICML settings';
|
||||
$_['icml_service_enabled_label'] = 'Upload services in ICML';
|
||||
$_['icml_service_description'] = 'When the option is enabled, all products for which delivery is disabled will be considered as services and uploaded to CRM as services';
|
||||
|
@ -72,6 +72,8 @@ $_['retailcrm_missing_status'] = 'Estado de pedidos perdidos';
|
||||
|
||||
$_['order_number'] = 'Número de pedido';
|
||||
$_['text_order_number'] = 'Transferir número de pedido a RetailCRM';
|
||||
$_['summ_around'] = 'Redondeo del costo del pedido';
|
||||
$_['text_summ_around'] = 'Redondear los costos del pedido a RetailCRM';
|
||||
$_['icml_settings'] = 'Ajustes de ICML';
|
||||
$_['icml_service_enabled_label'] = 'Subir servicios de ICML';
|
||||
$_['icml_service_description'] = 'Si habilita la opción, todos los productos para los que la entrega está desactivada se tratarán como servicios y se cargarán en CRM como servicios';
|
||||
|
@ -72,6 +72,8 @@ $_['retailcrm_missing_status'] = 'Статус пропавших заказо
|
||||
|
||||
$_['order_number'] = 'Номер заказа';
|
||||
$_['text_order_number'] = 'Передавать номер заказа в RetailCRM';
|
||||
$_['summ_around'] = 'Округление суммы заказа';
|
||||
$_['text_summ_around'] = 'Округлять сумму заказа';
|
||||
$_['icml_settings'] = 'Настройки ICML';
|
||||
$_['icml_service_enabled_label'] = 'Выгружать услуги в ICML';
|
||||
$_['icml_service_description'] = 'При включении опции все товары, для которых отключена доставка, будут рассматриваться как услуги и загружаться в CRM как услуги';
|
||||
|
@ -225,6 +225,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $summ_around; ?></legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" for="retailcrm_summ_around"><?php echo $text_summ_around; ?></label>
|
||||
<div class="col-sm-10">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="retailcrm_summ_around" value="1" <?php if (isset($saved_settings['retailcrm_summ_around']) &&
|
||||
$saved_settings['retailcrm_summ_around'] == 1) :
|
||||
echo 'checked'; endif; ?> />
|
||||
<?php echo $text_yes; ?>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="retailcrm_summ_around" value="0" <?php if (!isset($saved_settings['retailcrm_summ_around']) ||
|
||||
$saved_settings['retailcrm_summ_around'] == 0) :
|
||||
echo 'checked'; endif; ?> />
|
||||
<?php echo $text_no; ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?php echo $text_retailcrm_discount; ?></legend>
|
||||
<div class="form-group">
|
||||
|
@ -236,6 +236,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ summ_around }}</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label" class="col-sm-2 control-label" for="module_retailcrm_summ_around">{{ text_summ_around }}</label>
|
||||
<div class="col-sm-10">
|
||||
<label class="control-label" class="radio-inline">
|
||||
<input type="radio" name="module_retailcrm_summ_around" value="1"
|
||||
{% if saved_settings.module_retailcrm_summ_around is defined and saved_settings.module_retailcrm_summ_around == 1 %}
|
||||
checked
|
||||
{% endif %} />
|
||||
{{ text_yes }}
|
||||
</label>
|
||||
<label class="control-label" class="radio-inline">
|
||||
<input type="radio" name="module_retailcrm_summ_around" value="0"
|
||||
{% if saved_settings.module_retailcrm_summ_around is not defined or saved_settings.module_retailcrm_summ_around == 0 %}
|
||||
checked
|
||||
{% endif %} />
|
||||
{{ text_no }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{ text_retailcrm_discount }}</legend>
|
||||
<div class="form-group">
|
||||
|
@ -136,6 +136,12 @@ class ModelExtensionRetailcrmOrder extends Model {
|
||||
$order['number'] = $order_data['order_id'];
|
||||
}
|
||||
|
||||
if (isset($this->settings[$this->moduleTitle . '_summ_around'])
|
||||
&& $this->settings[$this->moduleTitle . '_summ_around'] == 1
|
||||
) {
|
||||
$order['applyRound'] = true;
|
||||
}
|
||||
|
||||
$order['externalId'] = $order_id;
|
||||
$order['firstName'] = $order_data['shipping_firstname'];
|
||||
$order['lastName'] = $order_data['shipping_lastname'];
|
||||
|
@ -43,12 +43,14 @@ class RetailcrmOrderConverter {
|
||||
$this->data['countryIso'] = $this->order_data['shipping_iso_code_2'];
|
||||
}
|
||||
|
||||
if ($this->settingsManager->getSetting('order_number')
|
||||
&& $this->settingsManager->getSetting('order_number') == 1
|
||||
) {
|
||||
if ($this->settingsManager->getSetting('order_number') == 1) {
|
||||
$this->data['number'] = $this->order_data['order_id'];
|
||||
}
|
||||
|
||||
if ($this->settingsManager->getSetting('summ_around') == 1) {
|
||||
$this->data['applyRound'] = true;
|
||||
}
|
||||
|
||||
$this->data['externalId'] = $this->order_data['order_id'];
|
||||
$this->data['firstName'] = $this->order_data['shipping_firstname'];
|
||||
$this->data['lastName'] = $this->order_data['shipping_lastname'];
|
||||
|
@ -16,7 +16,7 @@ class Retailcrm {
|
||||
|
||||
const RETAILCRM_DISCOUNT = 'retailcrm_discount';
|
||||
const RETAILCRM_DISCOUNT_SORT_ORDER = 8;
|
||||
const VERSION_MODULE = '4.1.18';
|
||||
const VERSION_MODULE = '4.1.19';
|
||||
|
||||
protected $registry;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user