View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007954 | module PayPal Checkout | module PayPal checkout - sub | public | 2026-05-21 13:13 | 2026-06-25 13:09 |
| Reporter | Spritje | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | acknowledged | Resolution | reopened | ||
| Product Version | 2.9.1 / 3.8.1 | ||||
| Summary | 0007954: For PayPal orders, the oxtrackcode is not saved in the oxorder table | ||||
| Description | If you enter the oxtrackcode in the admin panel, it is not saved in the oxorder_oxtrackcode table for PayPal orders. As a result, the tracking ID is no longer displayed to the customer in the frontend -> Order History. | ||||
| Steps To Reproduce | 1. Make a Paypal oder 2. In shop admin -> administer orders -> orders -> Tab "Main" -> enter tracking code and save 3. Go to order history -> no tracking id link ist shown -> tracking code is not stored in oxorder_oxtrackcode | ||||
| Additional Information | QA - ES - | ||||
| Tags | No tags attached. | ||||
|
|
- ES #139425 - If you enter a tracking code and a shipping provider for a PayPal order, this information is stored in the “oxtrackcode” column of the “oxorder” table, but only if the order status is set to “Shipped.” This differs from the Oxid default, where the tracking link is displayed as soon as a tracking code is entered, regardless of whether the order has already been marked as shipped. Similarly, the tracking code can no longer be changed once it has been entered. It updates in the backend and in the PayPal table, but not in the “oxorder” table and therefore not in the shop customer’s order history. This is because the system checks whether there has been a “change.” In the module's Order model, the “save” method contains the following section. if ($changed) { try { $this->doProvidePayPalTrackingCarrier(); } catch (\Throwable $exception) { $logger->log(‘warning’, sprintf( ‘PayPal tracking auto-push during Order::save failed for order %s (nr: %s): %s’, $this->getId(), $this->getFieldData(‘oxordernr’), $exception->getMessage() ), [$exception]); } } To do this, the data is compared there and after saving (the logic section is omitted). $oldSnapshot = $this->readPayPalTrackingSnapshot(); ... $newSnapshot = $this->readPayPalTrackingSnapshot(); $changed = $newSnapshot !== $oldSnapshot; Unfortunately, “$oldSnapshot” is always the same as “$newSnapshot” because in the “OrderMain” admin controller—whose “save” method is called— the data for the PayPal table has already been saved. Since “readPayPalTrackingSnapshot” only retrieves the data from the database, there are no differences between the two calls. In the Admin Main Controller, the following code ensures that both the data and the Order object are saved. if ($trackingCarrier && $trackingCode) { $this->getOrder()->setPayPalTracking( $trackingCarrier, $trackingCode ); } Below is the corresponding method: public function setPayPalTracking(string $trackingCarrier, string $trackingCode): void { $payPalOrder = $this->getPayPalRepository(); $payPalOrder->setTrackingCode($trackingCode); $payPalOrder->setTrackingCarrier($trackingCarrier); $payPalOrder->save(); } At this point, it might have been better to populate or modify the corresponding column in the “order” table. However, that isn’t the only problem. Another issue is that once a tracking code has been entered for a PayPal order, it can no longer be removed. If you try to do so, you will always receive the following message: If the tracking provider or tracking code is entered, all three PayPal tracking fields (Country, Provider, Code) must be filled out completely. |