mirror of
https://github.com/retailcrm/opencart-module.git
synced 2025-04-08 19:52:01 +00:00
Compare commits
No commits in common. "master" and "v4.1.17" have entirely different histories.
12 changed files with 8 additions and 75 deletions
|
@ -1,9 +1,3 @@
|
||||||
## v4.1.19
|
|
||||||
* Added option to round order amount
|
|
||||||
|
|
||||||
## v4.1.18
|
|
||||||
* Fixed constant with version of module.
|
|
||||||
|
|
||||||
## v4.1.17
|
## v4.1.17
|
||||||
* Added additional parameters to GET requests.
|
* Added additional parameters to GET requests.
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
4.1.19
|
4.1.17
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use retailcrm\Retailcrm;
|
|
||||||
|
|
||||||
class ControllerExtensionModuleRetailcrm extends Controller
|
class ControllerExtensionModuleRetailcrm extends Controller
|
||||||
{
|
{
|
||||||
|
const VERSION_MODULE = '4.1.17';
|
||||||
|
|
||||||
private $_error = [];
|
private $_error = [];
|
||||||
protected $log, $statuses, $payments, $deliveryTypes, $retailcrmApiClient, $moduleTitle, $tokenTitle;
|
protected $log, $statuses, $payments, $deliveryTypes, $retailcrmApiClient, $moduleTitle, $tokenTitle;
|
||||||
public $children, $template;
|
public $children, $template;
|
||||||
|
@ -301,8 +301,6 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
||||||
'special_price',
|
'special_price',
|
||||||
'order_number',
|
'order_number',
|
||||||
'text_order_number',
|
'text_order_number',
|
||||||
'summ_around',
|
|
||||||
'text_summ_around',
|
|
||||||
'icml_settings',
|
'icml_settings',
|
||||||
'icml_service_enabled_label',
|
'icml_service_enabled_label',
|
||||||
'icml_service_description',
|
'icml_service_description',
|
||||||
|
@ -323,7 +321,7 @@ class ControllerExtensionModuleRetailcrm extends Controller
|
||||||
|
|
||||||
$_data = &$data;
|
$_data = &$data;
|
||||||
|
|
||||||
$_data['module_version'] = Retailcrm::VERSION_MODULE;
|
$_data['module_version'] = self::VERSION_MODULE;
|
||||||
|
|
||||||
foreach ($text_strings as $text) {
|
foreach ($text_strings as $text) {
|
||||||
$_data[$text] = $this->language->get($text);
|
$_data[$text] = $this->language->get($text);
|
||||||
|
|
|
@ -72,8 +72,6 @@ $_['retailcrm_missing_status'] = 'Status of lost orders';
|
||||||
|
|
||||||
$_['order_number'] = 'Order number';
|
$_['order_number'] = 'Order number';
|
||||||
$_['text_order_number'] = 'Upload the order number to RetailCRM';
|
$_['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_settings'] = 'ICML settings';
|
||||||
$_['icml_service_enabled_label'] = 'Upload services in ICML';
|
$_['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';
|
$_['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,8 +72,6 @@ $_['retailcrm_missing_status'] = 'Estado de pedidos perdidos';
|
||||||
|
|
||||||
$_['order_number'] = 'Número de pedido';
|
$_['order_number'] = 'Número de pedido';
|
||||||
$_['text_order_number'] = 'Transferir número de pedido a RetailCRM';
|
$_['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_settings'] = 'Ajustes de ICML';
|
||||||
$_['icml_service_enabled_label'] = 'Subir servicios 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';
|
$_['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,8 +72,6 @@ $_['retailcrm_missing_status'] = 'Статус пропавших заказо
|
||||||
|
|
||||||
$_['order_number'] = 'Номер заказа';
|
$_['order_number'] = 'Номер заказа';
|
||||||
$_['text_order_number'] = 'Передавать номер заказа в RetailCRM';
|
$_['text_order_number'] = 'Передавать номер заказа в RetailCRM';
|
||||||
$_['summ_around'] = 'Округление суммы заказа';
|
|
||||||
$_['text_summ_around'] = 'Округлять сумму заказа';
|
|
||||||
$_['icml_settings'] = 'Настройки ICML';
|
$_['icml_settings'] = 'Настройки ICML';
|
||||||
$_['icml_service_enabled_label'] = 'Выгружать услуги в ICML';
|
$_['icml_service_enabled_label'] = 'Выгружать услуги в ICML';
|
||||||
$_['icml_service_description'] = 'При включении опции все товары, для которых отключена доставка, будут рассматриваться как услуги и загружаться в CRM как услуги';
|
$_['icml_service_description'] = 'При включении опции все товары, для которых отключена доставка, будут рассматриваться как услуги и загружаться в CRM как услуги';
|
||||||
|
|
|
@ -225,26 +225,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</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>
|
<fieldset>
|
||||||
<legend><?php echo $text_retailcrm_discount; ?></legend>
|
<legend><?php echo $text_retailcrm_discount; ?></legend>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -236,28 +236,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</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>
|
<fieldset>
|
||||||
<legend>{{ text_retailcrm_discount }}</legend>
|
<legend>{{ text_retailcrm_discount }}</legend>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -136,12 +136,6 @@ class ModelExtensionRetailcrmOrder extends Model {
|
||||||
$order['number'] = $order_data['order_id'];
|
$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['externalId'] = $order_id;
|
||||||
$order['firstName'] = $order_data['shipping_firstname'];
|
$order['firstName'] = $order_data['shipping_firstname'];
|
||||||
$order['lastName'] = $order_data['shipping_lastname'];
|
$order['lastName'] = $order_data['shipping_lastname'];
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use retailcrm\Retailcrm;
|
|
||||||
|
|
||||||
class RetailcrmHttpClient
|
class RetailcrmHttpClient
|
||||||
{
|
{
|
||||||
const METHOD_GET = 'GET';
|
const METHOD_GET = 'GET';
|
||||||
|
@ -68,7 +66,7 @@ class RetailcrmHttpClient
|
||||||
'cms_source' => 'OpenCart',
|
'cms_source' => 'OpenCart',
|
||||||
'cms_version' => VERSION,
|
'cms_version' => VERSION,
|
||||||
'php_version' => function_exists('phpversion') ? phpversion() : '',
|
'php_version' => function_exists('phpversion') ? phpversion() : '',
|
||||||
'module_version' => Retailcrm::VERSION_MODULE,
|
'module_version' => ControllerExtensionModuleRetailcrm::VERSION_MODULE,
|
||||||
])
|
])
|
||||||
: $parameters = array_merge($this->defaultParameters, $parameters);
|
: $parameters = array_merge($this->defaultParameters, $parameters);
|
||||||
|
|
||||||
|
|
|
@ -43,14 +43,12 @@ class RetailcrmOrderConverter {
|
||||||
$this->data['countryIso'] = $this->order_data['shipping_iso_code_2'];
|
$this->data['countryIso'] = $this->order_data['shipping_iso_code_2'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->settingsManager->getSetting('order_number') == 1) {
|
if ($this->settingsManager->getSetting('order_number')
|
||||||
|
&& $this->settingsManager->getSetting('order_number') == 1
|
||||||
|
) {
|
||||||
$this->data['number'] = $this->order_data['order_id'];
|
$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['externalId'] = $this->order_data['order_id'];
|
||||||
$this->data['firstName'] = $this->order_data['shipping_firstname'];
|
$this->data['firstName'] = $this->order_data['shipping_firstname'];
|
||||||
$this->data['lastName'] = $this->order_data['shipping_lastname'];
|
$this->data['lastName'] = $this->order_data['shipping_lastname'];
|
||||||
|
|
|
@ -16,7 +16,6 @@ class Retailcrm {
|
||||||
|
|
||||||
const RETAILCRM_DISCOUNT = 'retailcrm_discount';
|
const RETAILCRM_DISCOUNT = 'retailcrm_discount';
|
||||||
const RETAILCRM_DISCOUNT_SORT_ORDER = 8;
|
const RETAILCRM_DISCOUNT_SORT_ORDER = 8;
|
||||||
const VERSION_MODULE = '4.1.19';
|
|
||||||
|
|
||||||
protected $registry;
|
protected $registry;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue