From 2e033d42698f6e0811c9b99249dc759c7a77dc0f Mon Sep 17 00:00:00 2001 From: timoj Date: Tue, 31 Aug 2021 10:04:59 +0200 Subject: [PATCH 1/2] weight times quantity --- wuunderconnector/controllers/admin/AdminWuunderConnector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wuunderconnector/controllers/admin/AdminWuunderConnector.php b/wuunderconnector/controllers/admin/AdminWuunderConnector.php index 18039eb..2c8cc06 100644 --- a/wuunderconnector/controllers/admin/AdminWuunderConnector.php +++ b/wuunderconnector/controllers/admin/AdminWuunderConnector.php @@ -108,7 +108,7 @@ private function getOrdersInfo() private function getOrderInfo($order_id) { - $sql = 'SELECT O.*, AD.*, CL.iso_code, C.email, SUM(OD.product_weight) as weight, MIN(OD.product_id) as id_product, GROUP_CONCAT(OD.product_name SEPARATOR ". ") as description + $sql = 'SELECT O.*, AD.*, CL.iso_code, C.email, SUM(OD.product_quantity * OD.product_weight) as weight, MIN(OD.product_id) as id_product, GROUP_CONCAT(OD.product_name SEPARATOR ". ") as description FROM ' . _DB_PREFIX_ . 'orders AS O, ' . _DB_PREFIX_ . 'carrier AS CA, ' . _DB_PREFIX_ . 'customer AS C, From 71f12b60d69693bb2e41265130e1dd963cbd07ac Mon Sep 17 00:00:00 2001 From: timoj Date: Tue, 31 Aug 2021 12:12:05 +0200 Subject: [PATCH 2/2] upd version and changelog --- CHANGELOG.md | 5 +++++ wuunderconnector/config.xml | 2 +- wuunderconnector/controllers/admin/AdminWuunderConnector.php | 2 +- wuunderconnector/wuunderconnector.php | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f89ff9..6cc4b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## Released +## [1.3.8](https://github.com/kabisa/wuunder-webshopplugin-prestashop/releases/tag/1.3.8) + +### Fixed +- Fixed weight calculation for orders. Added quantity per line for calculation of total weight, not just the lines itself + ## [1.3.7](https://github.com/kabisa/wuunder-webshopplugin-prestashop/releases/tag/1.3.7) ### Fixed diff --git a/wuunderconnector/config.xml b/wuunderconnector/config.xml index edf637d..2055044 100644 --- a/wuunderconnector/config.xml +++ b/wuunderconnector/config.xml @@ -2,7 +2,7 @@ wuunderconnector - + diff --git a/wuunderconnector/controllers/admin/AdminWuunderConnector.php b/wuunderconnector/controllers/admin/AdminWuunderConnector.php index 2c8cc06..70b0e25 100644 --- a/wuunderconnector/controllers/admin/AdminWuunderConnector.php +++ b/wuunderconnector/controllers/admin/AdminWuunderConnector.php @@ -42,7 +42,7 @@ public function __construct() $this->logger->setFilename(_PS_ROOT_DIR_ . ((_PS_VERSION_ < '1.7') ? "/log/wuunder.log" : "/app/logs/wuunder.log")); $this->bootstrap = true; $this->override_folder = ""; - $this->sourceObj = array("product" => "Prestashop extension", "version" => array("build" => "1.3.7", "plugin" => "1.0")); + $this->sourceObj = array("product" => "Prestashop extension", "version" => array("build" => "1.3.8", "plugin" => "1.0")); } private function setBookingToken($order_id, $booking_url, $booking_token) diff --git a/wuunderconnector/wuunderconnector.php b/wuunderconnector/wuunderconnector.php index dedfb03..dc11f07 100644 --- a/wuunderconnector/wuunderconnector.php +++ b/wuunderconnector/wuunderconnector.php @@ -52,7 +52,7 @@ public function __construct() $this->name = 'wuunderconnector'; $this->tab = 'shipping_logistics'; - $this->version = '1.3.7'; + $this->version = '1.3.8'; $this->author = 'Wuunder'; $this->need_instance = 0;