Created
August 30, 2023 07:56
-
-
Save unlocomqx/8e3b38e2b9ddc7cdd5cc34e1ac39bd22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// path: /override/classes/order/Order.php | |
class Order extends OrderCore | |
{ | |
public function __construct($id = null, $id_lang = null) | |
{ | |
$this->webserviceParameters['associations']['order_rows']['fields']['additional_content'] = ['required' => false, 'xlink_resource' => 'customizations']; | |
parent::__construct($id, $id_lang); | |
} | |
public function getWsOrderRows() | |
{ | |
$result = parent::getWsOrderRows(); | |
foreach ($result as &$item) { | |
if ((int) $item['id_customization']) { | |
$item['additional_content'] = $this->getCustomizationSummary((int) $item['id_customization']); | |
} | |
} | |
return $result; | |
} | |
public function getCustomizationSummary($id_customization) | |
{ | |
return "<b>Test {$id_customization}</b>" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment