@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | if ($order->IsSubmitted()) { |
62 | 62 | return true; |
63 | 63 | } |
64 | - if (! $countryCode) { |
|
64 | + if (!$countryCode) { |
|
65 | 65 | $countryCode = $order->getCountry(); |
66 | 66 | } |
67 | 67 | $currencyObject = CountryPrice_EcommerceCurrency::get_currency_for_country($countryCode); |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | //check if the billing and shipping address have a country so that they will not be overridden by previous Orders |
76 | 76 | //we do this to make sure that the previous address can not change the region and thereby destroy the order in the cart |
77 | 77 | if ($billingAddress = $order->CreateOrReturnExistingAddress('BillingAddress')) { |
78 | - if (! $billingAddress->Country || $force) { |
|
78 | + if (!$billingAddress->Country || $force) { |
|
79 | 79 | $billingAddress->Country = $countryCode; |
80 | 80 | $billingAddress->write(); |
81 | 81 | } |
82 | 82 | } |
83 | 83 | if ($shippingAddress = $order->CreateOrReturnExistingAddress('ShippingAddress')) { |
84 | - if (! $shippingAddress->ShippingCountry || $force) { |
|
84 | + if (!$shippingAddress->ShippingCountry || $force) { |
|
85 | 85 | $shippingAddress->ShippingCountry = $countryCode; |
86 | 86 | $shippingAddress->write(); |
87 | 87 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | //if a country code and currency has been set then all is good |
91 | 91 | //from there we keep it this way |
92 | 92 | if ( |
93 | - $order->OriginatingCountryCode == $countryCode && |
|
93 | + $order->OriginatingCountryCode == $countryCode && |
|
94 | 94 | $order->CurrencyUsedID == $currencyObject->ID |
95 | 95 | ) { |
96 | 96 | return true; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | if ($items) { |
112 | 112 | foreach ($items as $item) { |
113 | 113 | $buyable = $item->Buyable(true); |
114 | - if (! $buyable->canPurchase()) { |
|
114 | + if (!$buyable->canPurchase()) { |
|
115 | 115 | $item->delete(); |
116 | 116 | } |
117 | 117 | } |
@@ -155,10 +155,10 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function onAfterWrite() |
157 | 157 | { |
158 | - if(! $this->owner->DistributorID) { |
|
159 | - if($defaultDistributor = Distributor::get_default_distributor()) { |
|
160 | - if($defaultDistributor->exists()) { |
|
161 | - if($defaultDistributor->ID) { |
|
158 | + if (!$this->owner->DistributorID) { |
|
159 | + if ($defaultDistributor = Distributor::get_default_distributor()) { |
|
160 | + if ($defaultDistributor->exists()) { |
|
161 | + if ($defaultDistributor->ID) { |
|
162 | 162 | $this->owner->DistributorID = $defaultDistributor->ID; |
163 | 163 | $this->owner->write(); |
164 | 164 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | public function canEdit($member = null) |
176 | 176 | { |
177 | - if (! $member) { |
|
177 | + if (!$member) { |
|
178 | 178 | $member = Member::currentUser(); |
179 | 179 | } |
180 | 180 | if ($member) { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $countryMessageObject->CountrySpecificEmailMessage |
286 | 286 | ); |
287 | 287 | } |
288 | - if($step->SendEmailToDistributor) { |
|
288 | + if ($step->SendEmailToDistributor) { |
|
289 | 289 | if ($distributor = $this->owner->Distributor()) { |
290 | 290 | $distributorEmail = $distributor->Email; |
291 | 291 | if ($distributorEmail) { |