@@ -107,11 +107,11 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | $countryObject = CountryPrice_EcommerceCountry::get_real_country($countryCode); |
| 109 | 109 | if ($countryObject) { |
| 110 | - if ($this->debug) {debug::log('found country object: '.$countryObject->Code);} |
|
| 110 | + if ($this->debug) {debug::log('found country object: '.$countryObject->Code); } |
|
| 111 | 111 | $countryCode = $countryObject->Code; |
| 112 | 112 | } |
| 113 | 113 | if ($countryCode == '') { |
| 114 | - if ($this->debug) {debug::log('There is no country Code! ');} |
|
| 114 | + if ($this->debug) {debug::log('There is no country Code! '); } |
|
| 115 | 115 | |
| 116 | 116 | //we can not decide |
| 117 | 117 | return null; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | //easy ... overrules all ... |
| 122 | 122 | if ($this->owner->AllCountries) { |
| 123 | 123 | //is there a valid price ??? |
| 124 | - if ($this->debug) {debug::log('All countries applies - updated ... new price = '.floatval($this->owner->updateCalculatedPrice()));} |
|
| 124 | + if ($this->debug) {debug::log('All countries applies - updated ... new price = '.floatval($this->owner->updateCalculatedPrice())); } |
|
| 125 | 125 | $canSell = true; |
| 126 | 126 | } else { |
| 127 | 127 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | //excluded first... |
| 130 | 130 | $excluded = $this->owner->getManyManyComponents('ExcludedCountries', "\"Code\" = '$countryCode'")->Count(); |
| 131 | 131 | if ($excluded) { |
| 132 | - if ($this->debug) {debug::log('excluded country');} |
|
| 132 | + if ($this->debug) {debug::log('excluded country'); } |
|
| 133 | 133 | |
| 134 | 134 | //no! |
| 135 | 135 | return false; |
@@ -137,12 +137,12 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | //default country is included by default ... |
| 139 | 139 | if ($countryCode == EcommerceConfig::get('EcommerceCountry', 'default_country_code')) { |
| 140 | - if ($this->debug) {debug::log('we are in the default country! exiting now ... ');} |
|
| 140 | + if ($this->debug) {debug::log('we are in the default country! exiting now ... '); } |
|
| 141 | 141 | $canSell = true; |
| 142 | - } elseif($this->owner->IncludedCountries()->count()) { |
|
| 142 | + } elseif ($this->owner->IncludedCountries()->count()) { |
|
| 143 | 143 | $included = $this->owner->getManyManyComponents('IncludedCountries', "\"Code\" = '$countryCode'")->Count(); |
| 144 | 144 | if ($included) { |
| 145 | - if ($this->debug) {debug::log('In included countries');} |
|
| 145 | + if ($this->debug) {debug::log('In included countries'); } |
|
| 146 | 146 | //null basically means - ignore ... |
| 147 | 147 | $canSell = true; |
| 148 | 148 | } else { |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | - if ($this->debug) {debug::log('the product is '.($canSell ? '' : 'NOT ').' for sale - lets check price ... ');} |
|
| 154 | + if ($this->debug) {debug::log('the product is '.($canSell ? '' : 'NOT ').' for sale - lets check price ... '); } |
|
| 155 | 155 | |
| 156 | 156 | //is there a valid price ??? |
| 157 | 157 | $countryPrice = $this->owner->getCalculatedPrice(); |
| 158 | - if ($this->debug) {debug::log('nothing applies, but we have a country price... '.$countryPrice);} |
|
| 158 | + if ($this->debug) {debug::log('nothing applies, but we have a country price... '.$countryPrice); } |
|
| 159 | 159 | |
| 160 | 160 | return floatval($countryPrice) > 0 ? null : false; |
| 161 | 161 | } |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | return null; |
| 219 | 219 | } |
| 220 | 220 | $key = $this->owner->ClassName."___".$this->owner->ID.'____'.$countryCode; |
| 221 | - if (! isset(self::$_buyable_price[$key])) { |
|
| 221 | + if (!isset(self::$_buyable_price[$key])) { |
|
| 222 | 222 | //basics |
| 223 | 223 | $currency = null; |
| 224 | 224 | $currencyCode = null; |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } |
| 307 | 307 | } |
| 308 | 308 | //order must have a country and a currency |
| 309 | - if (! $currencyCode || ! $countryCode) { |
|
| 309 | + if (!$currencyCode || !$countryCode) { |
|
| 310 | 310 | if ($this->debug) { |
| 311 | 311 | debug::log('No currency ('.$currencyCode.') or no country code ('.$countryCode.') for order: '); |
| 312 | 312 | } |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | */ |
| 404 | 404 | public function canEdit($member = null) |
| 405 | 405 | { |
| 406 | - if (! $member) { |
|
| 406 | + if (!$member) { |
|
| 407 | 407 | $member = Member::currentUser(); |
| 408 | 408 | } |
| 409 | 409 | if ($member) { |