Closed smockensturm closed 4 months ago
Hi @smockensturm, I'll take a look at this on Monday first thing.
@smockensturm, by default the order export uses the order reference number which is a user-defined field. Commerce sets it to {{number[:7]}}
by default. Shortening the order number drastically increases the chance of a collision with higher order counts.
There are 2 possibilities to resolve this.
The first is to update the reference field in your store config so that you can guarantee its uniqueness.
Alternatively, if you have a site module on that site, you can add an event listener to override the value with the full order number:
use yii\base\Event;
use fostercommerce\shipstationconnect\services\Xml;
use fostercommerce\shipstationconnect\events\OrderFieldEvent;
Event::on(
Xml::class,
Xml::ORDER_FIELD_EVENT,
function (OrderFieldEvent $e) {
if ($e->fieldName === OrderFieldEvent::FIELD_ORDER_NUMBER) {
$e->value = $e->order->number;
}
}
);
Hey there, we have a situation with order numbers.
ShipStation Connect (I think) sees these as the same number and won't process the second one. How can we get ShipStation to process these seemingly duplicate numbers.
Weird, huh?