Closed aladrach closed 2 years ago
@aladrach currently there's no way to do that without updating the code. However, it is possible to set the CustomeField1, CustomField2 and CustomField3 values: https://github.com/FosterCommerce/shipstation-connect#custom-fields.
Event::on(
Xml::class,
Xml::ORDER_FIELD_EVENT,
function (OrderFieldEvent $e) {
$fieldName = $e->field;
if ($fieldName === OrderFieldEvent::FIELD_CUSTOM_FIELD_1) {
$e->value = "My Custom Field Value";
$e->cdata = true;
}
}
);
Would these custom fields serve your purpose?
I'd actually prefer to remove that event completely and replace it with a single ShipStation Order type which can be completely customized. But that requires us to overhaul a substantial portion of the current logic.
We have a particular client that would like to be able to modify the title and quantity fields that are being sent to ShipStation, as we have custom business logic that modify those values. If that is possible, that would be amazing!
Thank you!