@@ -187,14 +187,13 @@ discard block |
||
187 | 187 | |
188 | 188 | // allow extensions of ProductPage to override the PreviewImage field description |
189 | 189 | $previewDescription = ($this->config()->get('customPreviewDescription')) ? |
190 | - $this->config()->get('customPreviewDescription') : |
|
191 | - _t( |
|
190 | + $this->config()->get('customPreviewDescription') : _t( |
|
192 | 191 | 'ProductPage.PreviewImageDescription', |
193 | 192 | 'Image used throughout site to represent this product' |
194 | 193 | ); |
195 | 194 | |
196 | 195 | // Cateogry Dropdown field w/ add new |
197 | - $source = function () { |
|
196 | + $source = function() { |
|
198 | 197 | return ProductCategory::get()->map()->toArray(); |
199 | 198 | }; |
200 | 199 | $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source()) |
@@ -328,7 +327,7 @@ discard block |
||
328 | 327 | $product = self::get()->byID($this->ID); |
329 | 328 | if (isset($product->ParentID)) { |
330 | 329 | $origParent = $product->ParentID; |
331 | - } else { |
|
330 | + }else { |
|
332 | 331 | $origParent = null; |
333 | 332 | } |
334 | 333 | $currentParent = $this->ParentID; |
@@ -415,8 +414,7 @@ discard block |
||
415 | 414 | $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName; |
416 | 415 | |
417 | 416 | return (FoxyStripeSetting::current_foxystripe_setting()->CartValidation) |
418 | - ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : |
|
419 | - $optionValue; |
|
417 | + ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue; |
|
420 | 418 | } |
421 | 419 | |
422 | 420 | /** |
@@ -428,7 +426,7 @@ discard block |
||
428 | 426 | { |
429 | 427 | $store = FoxyCart::getFoxyCartStoreName(); |
430 | 428 | |
431 | - return '<script src="https://cdn.foxycart.com/' . $store . '/loader.js" async defer></script>'; |
|
429 | + return '<script src="https://cdn.foxycart.com/'.$store.'/loader.js" async defer></script>'; |
|
432 | 430 | } |
433 | 431 | |
434 | 432 | /** |
@@ -123,8 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | // set variables from Product |
125 | 125 | $productID = ($this->ProductID != 0) ? |
126 | - $this->ProductID : |
|
127 | - Controller::curr()->getRequest()->getSession()->get('CMSMain.currentPage'); |
|
126 | + $this->ProductID : Controller::curr()->getRequest()->getSession()->get('CMSMain.currentPage'); |
|
128 | 127 | |
129 | 128 | /** @var ProductPage $product */ |
130 | 129 | $product = ProductPage::get()->byID($productID); |
@@ -134,7 +133,7 @@ discard block |
||
134 | 133 | $parentCode = $product->Code; |
135 | 134 | |
136 | 135 | // ProductOptionGroup Dropdown field w/ add new |
137 | - $groups = function () { |
|
136 | + $groups = function() { |
|
138 | 137 | return OptionGroup::get()->map()->toArray(); |
139 | 138 | }; |
140 | 139 | $groupFields = singleton(OptionGroup::class)->getCMSFields(); |
@@ -344,9 +343,9 @@ discard block |
||
344 | 343 | */ |
345 | 344 | public function getGeneratedValue() |
346 | 345 | { |
347 | - $modPrice = ($this->PriceModifier) ? (string) $this->PriceModifier : '0'; |
|
346 | + $modPrice = ($this->PriceModifier) ? (string)$this->PriceModifier : '0'; |
|
348 | 347 | $modPriceWithSymbol = self::getOptionModifierActionSymbol($this->PriceModifierAction).$modPrice; |
349 | - $modWeight = ($this->WeightModifier) ? (string) $this->WeightModifier : '0'; |
|
348 | + $modWeight = ($this->WeightModifier) ? (string)$this->WeightModifier : '0'; |
|
350 | 349 | $modWeight = self::getOptionModifierActionSymbol($this->WeightModifierAction).$modWeight; |
351 | 350 | $modCode = self::getOptionModifierActionSymbol($this->CodeModifierAction).$this->CodeModifier; |
352 | 351 | |
@@ -358,14 +357,13 @@ discard block |
||
358 | 357 | */ |
359 | 358 | public function getGeneratedTitle() |
360 | 359 | { |
361 | - $modPrice = ($this->PriceModifier) ? (string) $this->PriceModifier : '0'; |
|
360 | + $modPrice = ($this->PriceModifier) ? (string)$this->PriceModifier : '0'; |
|
362 | 361 | $title = $this->Title; |
363 | 362 | $title .= ($this->PriceModifier != 0) ? |
364 | 363 | ': ('.self::getOptionModifierActionSymbol( |
365 | 364 | $this->PriceModifierAction, |
366 | 365 | $returnWithOnlyPlusMinus = true |
367 | - ).'$'.$modPrice.')' : |
|
368 | - ''; |
|
366 | + ).'$'.$modPrice.')' : ''; |
|
369 | 367 | |
370 | 368 | return $title; |
371 | 369 | } |