public function setUp() { parent::setUp(); $this->deliveryZone = DeliveryZone::getNewInstance(); $this->deliveryZone->name->set('test zone'); $this->deliveryZone->save(); }
public function setUp() { parent::setUp(); ActiveRecord::clearPool(); ActiveRecord::executeUpdate('DELETE FROM Tax'); ActiveRecord::executeUpdate('DELETE FROM TaxRate'); ActiveRecord::executeUpdate('DELETE FROM DeliveryZone'); ActiveRecord::executeUpdate('DELETE FROM Currency'); ActiveRecord::executeUpdate('DELETE FROM ShippingService'); ActiveRecord::executeUpdate('DELETE FROM DeliveryZone'); ActiveRecord::executeUpdate('DELETE FROM TaxClass'); $this->deliveryZone = DeliveryZone::getNewInstance(); $this->deliveryZone->setValueByLang('name', 'en', 'test zone'); $this->deliveryZone->isEnabled->set(true); $this->deliveryZone->save(); DeliveryZoneCountry::getNewInstance($this->deliveryZone, 'US')->save(); $this->tax = Tax::getNewInstance('test type'); $this->tax->save(); $this->currency = ActiveRecord::getInstanceByIdIfExists('Currency', 'USD'); $this->currency->isEnabled->set(true); $this->currency->decimalCount->set(2); $this->currency->save(); $this->product = Product::getNewInstance(Category::getRootNode()); $this->product->setPrice('USD', 100); $this->product->isEnabled->set(true); $this->product->save(); $this->user = User::getNewInstance('*****@*****.**'); $this->user->save(); $this->address = UserAddress::getNewInstance(); $this->address->countryID->set('US'); $this->address->save(); $this->getApplication()->getConfig()->setRuntime('DELIVERY_TAX_CLASS', null); }
public function setUp() { parent::setUp(); $this->deliveryZone = DeliveryZone::getNewInstance(); $this->deliveryZone->setValueByLang('name', 'en', 'test zone'); $this->deliveryZone->isEnabled->set(true); $this->deliveryZone->save(); }
public function setUp() { parent::setUp(); $this->zone = DeliveryZone::getNewInstance(); $this->zone->name->set(':TEST_ZONE'); $this->zone->isEnabled->set(1); $this->zone->isFreeShipping->set(1); $this->zone->save(); }
public function setUp() { parent::setUp(); $this->deliveryZone = DeliveryZone::getNewInstance(); $this->deliveryZone->name->set('test zone'); $this->deliveryZone->save(); $this->shippingService = ShippingService::getNewInstance($this->deliveryZone, 'test category', ShippingService::SUBTOTAL_BASED); $this->shippingService->save(); }