Ejemplo n.º 1
0
 public function createOrder()
 {
     $paymentStatusOpen = $this->em->getReference('\\Shopware\\Models\\Order\\Status', 17);
     $orderStatusOpen = $this->em->getReference('\\Shopware\\Models\\Order\\Status', 0);
     $paymentDebit = $this->em->getReference('\\Shopware\\Models\\Payment\\Payment', 2);
     $dispatchDefault = $this->em->getReference('\\Shopware\\Models\\Dispatch\\Dispatch', 9);
     $defaultShop = $this->em->getReference('\\Shopware\\Models\\Shop\\Shop', 1);
     $partner = new \Shopware\Models\Partner\Partner();
     $partner->setCompany("Dummy");
     $partner->setIdCode("Dummy");
     $partner->setDate(new \DateTime());
     $partner->setContact('Dummy');
     $partner->setStreet('Dummy');
     $partner->setZipCode('Dummy');
     $partner->setCity('Dummy');
     $partner->setPhone('Dummy');
     $partner->setFax('Dummy');
     $partner->setCountryName('Dummy');
     $partner->setEmail('Dummy');
     $partner->setWeb('Dummy');
     $partner->setProfile('Dummy');
     $this->em->persist($partner);
     $order = new \Shopware\Models\Order\Order();
     $order->setNumber('abc');
     $order->setPaymentStatus($paymentStatusOpen);
     $order->setOrderStatus($orderStatusOpen);
     $order->setPayment($paymentDebit);
     $order->setDispatch($dispatchDefault);
     $order->setPartner($partner);
     $order->setShop($defaultShop);
     $order->setInvoiceAmount(5);
     $order->setInvoiceAmountNet(5);
     $order->setInvoiceShipping(5);
     $order->setInvoiceShippingNet(5);
     $order->setTransactionId(5);
     $order->setComment('Dummy');
     $order->setCustomerComment('Dummy');
     $order->setInternalComment('Dummy');
     $order->setNet(true);
     $order->setTaxFree(false);
     $order->setTemporaryId(5);
     $order->setReferer('Dummy');
     $order->setTrackingCode("Dummy");
     $order->setLanguageIso("Dummy");
     $order->setCurrency("EUR");
     $order->setCurrencyFactor(5);
     $order->setRemoteAddress("127.0.0.1");
     return $order;
 }