@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | public static function localise_order($countryCode = null, $force = false, $runAgain = false) |
| 52 | 52 | { |
| 53 | 53 | if(self::$_number_of_times_we_have_run_localise_order > 0) { |
| 54 | - $runAgain = false; |
|
| 54 | + $runAgain = false; |
|
| 55 | 55 | } |
| 56 | 56 | if ($runAgain) { |
| 57 | 57 | self::$_number_of_times_we_have_run_localise_order = 0; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | 'Root.Country', |
| 153 | 153 | DropdownField::create( |
| 154 | 154 | 'DistributorID', |
| 155 | - _t('Distributor.SINGULAR_NAME', 'Distributor'), |
|
| 155 | + _t('Distributor.SINGULAR_NAME', 'Distributor'), |
|
| 156 | 156 | array(''=> '--- Please select ---') + Distributor::get()->map()->toArray() |
| 157 | 157 | ) |
| 158 | 158 | ); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public static function localise_order($countryCode = null, $force = false, $runAgain = false) |
| 52 | 52 | { |
| 53 | - if(self::$_number_of_times_we_have_run_localise_order > 0) { |
|
| 53 | + if (self::$_number_of_times_we_have_run_localise_order > 0) { |
|
| 54 | 54 | $runAgain = false; |
| 55 | 55 | } |
| 56 | 56 | if ($runAgain) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($order->IsSubmitted()) { |
| 67 | 67 | return true; |
| 68 | 68 | } |
| 69 | - if (! $countryCode) { |
|
| 69 | + if (!$countryCode) { |
|
| 70 | 70 | $countryCode = $order->getCountry(); |
| 71 | 71 | } |
| 72 | 72 | $currencyObject = CountryPrice_EcommerceCurrency::get_currency_for_country($countryCode); |
@@ -80,13 +80,13 @@ discard block |
||
| 80 | 80 | //check if the billing and shipping address have a country so that they will not be overridden by previous Orders |
| 81 | 81 | //we do this to make sure that the previous address can not change the region and thereby destroy the order in the cart |
| 82 | 82 | if ($billingAddress = $order->CreateOrReturnExistingAddress('BillingAddress')) { |
| 83 | - if (! $billingAddress->Country || $force) { |
|
| 83 | + if (!$billingAddress->Country || $force) { |
|
| 84 | 84 | $billingAddress->Country = $countryCode; |
| 85 | 85 | $billingAddress->write(); |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | if ($shippingAddress = $order->CreateOrReturnExistingAddress('ShippingAddress')) { |
| 89 | - if (! $shippingAddress->ShippingCountry || $force) { |
|
| 89 | + if (!$shippingAddress->ShippingCountry || $force) { |
|
| 90 | 90 | $shippingAddress->ShippingCountry = $countryCode; |
| 91 | 91 | $shippingAddress->write(); |
| 92 | 92 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | //if a country code and currency has been set then all is good |
| 96 | 96 | //from there we keep it this way |
| 97 | 97 | if ( |
| 98 | - $order->OriginatingCountryCode == $countryCode && |
|
| 98 | + $order->OriginatingCountryCode == $countryCode && |
|
| 99 | 99 | $order->CurrencyUsedID == $currencyObject->ID |
| 100 | 100 | ) { |
| 101 | 101 | return true; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if ($items) { |
| 118 | 118 | foreach ($items as $item) { |
| 119 | 119 | $buyable = $item->Buyable(true); |
| 120 | - if (! $buyable->canPurchase()) { |
|
| 120 | + if (!$buyable->canPurchase()) { |
|
| 121 | 121 | $item->delete(); |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function onAfterWrite() |
| 166 | 166 | { |
| 167 | - if (! $this->owner->DistributorID) { |
|
| 167 | + if (!$this->owner->DistributorID) { |
|
| 168 | 168 | if ($defaultDistributor = Distributor::get_default_distributor()) { |
| 169 | 169 | if ($defaultDistributor->exists()) { |
| 170 | 170 | if ($defaultDistributor->ID) { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | |
| 184 | 184 | public function canEdit($member = null) |
| 185 | 185 | { |
| 186 | - if (! $member) { |
|
| 186 | + if (!$member) { |
|
| 187 | 187 | $member = Member::currentUser(); |
| 188 | 188 | } |
| 189 | 189 | if ($member) { |