Merge branch 'master' of github.com:iyzoer/opencart-module

изменено:      admin/controller/extension/module/retailcrm.php
	изменено:      admin/language/en-gb/extension/module/retailcrm.php
	изменено:      admin/view/template/extension/module/retailcrm.tpl
	изменено:      catalog/model/extension/retailcrm/order.php
This commit is contained in:
Dmitry Akolzin 2017-04-12 11:30:56 +03:00
commit d308996fed
4 changed files with 7 additions and 12 deletions

View File

@ -78,6 +78,7 @@ class ControllerExtensionModuleRetailcrm extends Controller
*/ */
public function index() public function index()
{ {
$this->load->model('localisation/country'); $this->load->model('localisation/country');
$this->load->model('setting/setting'); $this->load->model('setting/setting');
$this->load->model('extension/module'); $this->load->model('extension/module');

View File

@ -12,7 +12,6 @@ $_['retailcrm_base_settings'] = 'Connection settings';
$_['retailcrm_dict_settings'] = 'Dictionary settings'; $_['retailcrm_dict_settings'] = 'Dictionary settings';
$_['retailcrm_countries_settings'] = 'Trading zones setting'; $_['retailcrm_countries_settings'] = 'Trading zones setting';
$_['retailcrm_upload_order'] = 'Unload single order'; $_['retailcrm_upload_order'] = 'Unload single order';
$_['retailcrm_url'] = 'RetailCRM URL'; $_['retailcrm_url'] = 'RetailCRM URL';
$_['retailcrm_apikey'] = 'RetailCRM API Key'; $_['retailcrm_apikey'] = 'RetailCRM API Key';

View File

@ -49,6 +49,7 @@
<label for="retailcrm_apikey"><?php echo $retailcrm_apikey; ?></label><br> <label for="retailcrm_apikey"><?php echo $retailcrm_apikey; ?></label><br>
<input id="retailcrm_apikey" type="text" name="retailcrm_apikey" value="<?php if (isset($saved_settings['retailcrm_apikey'])): echo $saved_settings['retailcrm_apikey']; endif;?>"> <input id="retailcrm_apikey" type="text" name="retailcrm_apikey" value="<?php if (isset($saved_settings['retailcrm_apikey'])): echo $saved_settings['retailcrm_apikey']; endif;?>">
</div> </div>
<h3><?php echo $retailcrm_countries_settings; ?></h3> <h3><?php echo $retailcrm_countries_settings; ?></h3>
<div class="retailcrm_unit"> <div class="retailcrm_unit">
<div class="well well-sm" style="height: 150px; overflow: auto; width: 30%;"> <div class="well well-sm" style="height: 150px; overflow: auto; width: 30%;">
@ -97,10 +98,6 @@
<h3><?php echo $retailcrm_dict_settings; ?></h3> <h3><?php echo $retailcrm_dict_settings; ?></h3>
<h4><?php echo $retailcrm_dict_delivery; ?></h4> <h4><?php echo $retailcrm_dict_delivery; ?></h4>
<<<<<<< HEAD:admin/view/template/extension/module/retailcrm.tpl
=======
>>>>>>> 82e6d620766d6f21f0041e8744d92bbfc84da472:admin/view/template/extension/module/retailcrm.tpl
<?php foreach($delivery['opencart'] as $value): ?> <?php foreach($delivery['opencart'] as $value): ?>
<div class="pm"><?php echo $value['title'].':'; ?></div> <div class="pm"><?php echo $value['title'].':'; ?></div>
@ -163,7 +160,7 @@
var token = '<?php echo $token; ?>'; var token = '<?php echo $token; ?>';
$('#icml').on('click', function() { $('#icml').on('click', function() {
$.ajax({ $.ajax({
url: '<?php echo $catalog; ?>'+'system/cron/icml.php', url: '<?php echo $catalog; ?>' + 'admin/index.php?route=extension/module/retailcrm/icml&token=' + token,
beforeSend: function() { beforeSend: function() {
$('#icml').button('loading'); $('#icml').button('loading');
}, },
@ -180,7 +177,7 @@
$('#export').on('click', function() { $('#export').on('click', function() {
$.ajax({ $.ajax({
url: '<?php echo $catalog; ?>'+'system/cron/export.php', url: '<?php echo $catalog; ?>' + 'admin/index.php?route=extension/module/retailcrm/export&token=' + token,
beforeSend: function() { beforeSend: function() {
$('#export').button('loading'); $('#export').button('loading');
}, },
@ -199,7 +196,7 @@
var order_id = $('input[name=\'order_id\']').val(); var order_id = $('input[name=\'order_id\']').val();
if (order_id && order_id > 0) { if (order_id && order_id > 0) {
$.ajax({ $.ajax({
url: '<?php echo $catalog; ?>'+'admin/index.php?route=extension/module/retailcrm/exportOrder&token=' + token + '&order_id=' + order_id, url: '<?php echo $catalog; ?>' + 'admin/index.php?route=extension/module/retailcrm/exportOrder&token=' + token + '&order_id=' + order_id,
beforeSend: function() { beforeSend: function() {
$('#export_order').button('loading'); $('#export_order').button('loading');
}, },
@ -225,8 +222,5 @@
$('#export_order').button('reset'); $('#export_order').button('reset');
} }
}); });
<<<<<<< HEAD:admin/view/template/extension/module/retailcrm.tpl
</script> </script>
=======
</script>
>>>>>>> 82e6d620766d6f21f0041e8744d92bbfc84da472:admin/view/template/extension/module/retailcrm.tpl

View File

@ -59,6 +59,7 @@ class ModelExtensionRetailcrmOrder extends Model {
if ($totals['code'] == 'shipping') { if ($totals['code'] == 'shipping') {
$deliveryCost = $totals['value']; $deliveryCost = $totals['value'];
} }
if ($totals['code'] == 'coupon') { if ($totals['code'] == 'coupon') {
$couponTotal = abs($totals['value']); $couponTotal = abs($totals['value']);
} }