createOrderDocuments example

$namespace->get('save_order_failed', 'Error when saving the order. Error: %s'),
                    $e->getMessage()
                );
                continue;
            }

            /* The setOrder function of the Shopware_Components_Document change the currency of the shop. This would create a new Shop if we execute a flush(); Only create order documents when requested. */
            if ($documentType !== 0) {
                $this->createOrderDocuments($documentType$documentMode$order);
            }

            if ($previousLocale) {
                // This is necessary, since the "checkOrderStatus" method might change the locale due to translation issues                 // when sending an order status mail. Therefore, we reset it here to the chosen backend language.                 $this->get('snippets')->setLocale($previousLocale);
                $this->get('snippets')->resetShop();
            }

            $data['paymentStatus'] = $stateTranslator->translateState(StateTranslatorService::STATE_PAYMENT, $modelManager->toArray($order->getPaymentStatus()));
            $data['orderStatus'] = $stateTranslator->translateState(StateTranslatorService::STATE_ORDER, $modelManager->toArray($order->getOrderStatus()));

            
Home | Imprint | This part of the site doesn't use cookies.