From 406e21cc04b3696eb20658b395d34f364c70ec53 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 20 Aug 2014 00:19:54 +0400 Subject: [PATCH] round weight & size, fix install doc --- admin/controller/module/intarocrm.php | 10 ++++++++-- doc/Install.md | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/admin/controller/module/intarocrm.php b/admin/controller/module/intarocrm.php index d6cce08..6e29ec2 100644 --- a/admin/controller/module/intarocrm.php +++ b/admin/controller/module/intarocrm.php @@ -553,7 +553,7 @@ class ControllerModuleIntarocrm extends Controller { if ($offer['weight'] != '') { $weight = $this->dd->createElement('param'); $weight->setAttribute('name', 'weight'); - $weightValue = (isset($offer['weight_class'])) ? $offer['weight'] . ' ' . $offer['weight_class'] : $offer['weight']; + $weightValue = (isset($offer['weight_class'])) ? round($offer['weight'], 3) . ' ' . $offer['weight_class'] : round($offer['weight'], 3); $weight->appendChild($this->dd->createTextNode($weightValue)); $e->appendChild($weight); } @@ -561,7 +561,13 @@ class ControllerModuleIntarocrm extends Controller { if ($offer['length'] != '' && $offer['width'] != '' && $offer['height'] != '') { $size = $this->dd->createElement('param'); $size->setAttribute('name', 'size'); - $size->appendChild($this->dd->createTextNode($offer['length'] .'x'. $offer['width'] .'x'. $offer['height'])); + $size->appendChild( + $this->dd->createTextNode( + round($offer['length'], 2) .'x'. + round($offer['width'], 2) .'x'. + round($offer['height'], 2) + ) + ); $e->appendChild($size); } } diff --git a/doc/Install.md b/doc/Install.md index a0a77d7..830570f 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -27,7 +27,7 @@ Go to Modules -> Intstall module. Before running exchange you must configure mod Setup cron job for periodically catalog export ``` -0 */12 0 0 0 /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_export.log 2>&1 +* */12 * * * /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_export.log 2>&1 ``` ### Exchange setup @@ -70,5 +70,5 @@ protected function crmOrderAction($order, $order_id, $action=null) Setup cron job for exchange between CRM & your shop ``` -*/5 0 0 0 0 /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_history.log 2>&1 +*/5 * * * * /usr/bin/php /path/to/opencart/cli/cli_export.php >> /path/to/opencart/system/logs/cronjob_history.log 2>&1 ```