@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | if (count($errors)) { |
| 130 | - \SS_Log::log('setCurrentStore errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 130 | + \SS_Log::log('setCurrentStore errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $errors = array_merge($errors, $client->getErrors($result)); |
| 144 | 144 | if (count($errors)) { |
| 145 | - \SS_Log::log('updateStore errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 145 | + \SS_Log::log('updateStore errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | $errors = array_merge($errors, $client->getErrors($result)); |
| 171 | 171 | if (count($errors)) { |
| 172 | - \SS_Log::log('setItemCategoriesURL errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 172 | + \SS_Log::log('setItemCategoriesURL errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | $errors = array_merge($errors, $client->getErrors($result)); |
| 196 | 196 | if (count($errors)) { |
| 197 | - \SS_Log::log('setItemCategories errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 197 | + \SS_Log::log('setItemCategories errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 198 | 198 | } |
| 199 | 199 | } |
| 200 | 200 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | $errors = array_merge($errors, $client->getErrors($result)); |
| 219 | 219 | if (count($errors)) { |
| 220 | - \SS_Log::log('getCategory errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 220 | + \SS_Log::log('getCategory errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | } |
@@ -234,12 +234,12 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | if ($category = $this->getCategory($data['code'])) { |
| 236 | 236 | $result = $client->patch($category, $data); |
| 237 | - } else { |
|
| 237 | + }else { |
|
| 238 | 238 | $result = $client->post($this->getItemCategoriesURL(), $data); |
| 239 | 239 | } |
| 240 | 240 | $errors = array_merge($errors, $client->getErrors($result)); |
| 241 | 241 | if (count($errors)) { |
| 242 | - \SS_Log::log('putCategory errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 242 | + \SS_Log::log('putCategory errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | $errors = array_merge($errors, $client->getErrors($result)); |
| 258 | 258 | if (count($errors)) { |
| 259 | - \SS_Log::log('deleteCategory errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 259 | + \SS_Log::log('deleteCategory errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Dynamic\FoxyStripe\Model\FoxyStripeClient; |
| 4 | 4 | |
| 5 | -class FoxyStripeSiteConfig extends DataExtension{ |
|
| 5 | +class FoxyStripeSiteConfig extends DataExtension { |
|
| 6 | 6 | |
| 7 | 7 | private static $db = array( |
| 8 | 8 | 'StoreTitle' => 'Varchar(255)', |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | 'ProductLimit' => 10 |
| 39 | 39 | ); |
| 40 | 40 | |
| 41 | - public function updateCMSFields(FieldList $fields){ |
|
| 41 | + public function updateCMSFields(FieldList $fields) { |
|
| 42 | 42 | |
| 43 | 43 | // set TabSet names to avoid spaces from camel case |
| 44 | 44 | $fields->addFieldToTab('Root', new TabSet('FoxyStripe', 'FoxyStripe')); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | ]); |
| 123 | 123 | |
| 124 | 124 | // configuration warning |
| 125 | - if(FoxyCart::store_name_warning()!==null){ |
|
| 125 | + if (FoxyCart::store_name_warning() !== null) { |
|
| 126 | 126 | $fields->insertBefore(LiteralField::create( |
| 127 | 127 | "StoreSubDomainHeaderWarning", |
| 128 | 128 | _t( |
@@ -213,14 +213,14 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | $siteConfig = SiteConfig::current_site_config(); |
| 215 | 215 | |
| 216 | - if(!$siteConfig->StoreKey) { |
|
| 216 | + if (!$siteConfig->StoreKey) { |
|
| 217 | 217 | $key = FoxyCart::setStoreKey(); |
| 218 | - while(!ctype_alnum($key)){ |
|
| 218 | + while (!ctype_alnum($key)) { |
|
| 219 | 219 | $key = FoxyCart::setStoreKey(); |
| 220 | 220 | } |
| 221 | 221 | $siteConfig->StoreKey = $key; |
| 222 | 222 | $siteConfig->write(); |
| 223 | - DB::alteration_message($siteConfig->ClassName.": created FoxyCart Store Key " . $key, 'created'); |
|
| 223 | + DB::alteration_message($siteConfig->ClassName.": created FoxyCart Store Key ".$key, 'created'); |
|
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | 226 | |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | $errors = array_merge($errors, $client->getErrors($result)); |
| 287 | 287 | if (count($errors)) { |
| 288 | - \SS_Log::log('FoxyStripeSiteConfig::onBeforeWrite errors - ' . json_encode($errors), \SS_Log::WARN); |
|
| 288 | + \SS_Log::log('FoxyStripeSiteConfig::onBeforeWrite errors - '.json_encode($errors), \SS_Log::WARN); |
|
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | 291 | } |