round weight & size, fix install doc

This commit is contained in:
Alex Lushpai 2014-08-20 00:19:54 +04:00
parent e937b336ae
commit 406e21cc04
2 changed files with 10 additions and 4 deletions

View File

@ -553,7 +553,7 @@ class ControllerModuleIntarocrm extends Controller {
if ($offer['weight'] != '') { if ($offer['weight'] != '') {
$weight = $this->dd->createElement('param'); $weight = $this->dd->createElement('param');
$weight->setAttribute('name', 'weight'); $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)); $weight->appendChild($this->dd->createTextNode($weightValue));
$e->appendChild($weight); $e->appendChild($weight);
} }
@ -561,7 +561,13 @@ class ControllerModuleIntarocrm extends Controller {
if ($offer['length'] != '' && $offer['width'] != '' && $offer['height'] != '') { if ($offer['length'] != '' && $offer['width'] != '' && $offer['height'] != '') {
$size = $this->dd->createElement('param'); $size = $this->dd->createElement('param');
$size->setAttribute('name', 'size'); $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); $e->appendChild($size);
} }
} }

View File

@ -27,7 +27,7 @@ Go to Modules -> Intstall module. Before running exchange you must configure mod
Setup cron job for periodically catalog export 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 ### Exchange setup
@ -70,5 +70,5 @@ protected function crmOrderAction($order, $order_id, $action=null)
Setup cron job for exchange between CRM & your shop 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
``` ```