@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'Image used throughout site to represent this product'); |
92 | 92 | |
93 | 93 | // Cateogry Dropdown field w/ add new |
94 | - $source = function () { |
|
94 | + $source = function() { |
|
95 | 95 | return ProductCategory::get()->map()->toArray(); |
96 | 96 | }; |
97 | 97 | $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source()) |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | if (class_exists('GridFieldSortableRows')) { |
136 | 136 | $config->addComponent(new GridFieldSortableRows('SortOrder')); |
137 | 137 | $products = $this->ProductOptions()->sort('SortOrder'); |
138 | - } else { |
|
138 | + }else { |
|
139 | 139 | $products = $this->ProductOptions(); |
140 | 140 | } |
141 | 141 | $config->removeComponentsByType('GridFieldAddExistingAutocompleter'); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ->setFolderName('Uploads/Products') |
192 | 192 | ->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png')) |
193 | 193 | ->setAllowedMaxFileNumber(1), |
194 | - HeaderField::create('ProductImagesHD', _t('ProductPage.ProductImagesHD' . 'Product Image Gallery'), 2), |
|
194 | + HeaderField::create('ProductImagesHD', _t('ProductPage.ProductImagesHD'.'Product Image Gallery'), 2), |
|
195 | 195 | $prodImagesField |
196 | 196 | ->setDescription(_t( |
197 | 197 | 'ProductPage.ProductImagesDescription', |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $product = ProductPage::get()->byID($this->ID); |
253 | 253 | if (isset($product->ParentID)) { |
254 | 254 | $origParent = $product->ParentID; |
255 | - } else { |
|
255 | + }else { |
|
256 | 256 | $origParent = null; |
257 | 257 | } |
258 | 258 | $currentParent = $this->ParentID; |
@@ -333,14 +333,13 @@ discard block |
||
333 | 333 | ) { |
334 | 334 | $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName; |
335 | 335 | return (SiteConfig::current_site_config()->CartValidation) |
336 | - ? FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : |
|
337 | - $optionValue; |
|
336 | + ? FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue; |
|
338 | 337 | } |
339 | 338 | |
340 | 339 | // get FoxyCart Store Name for JS call |
341 | 340 | public function getCartScript() |
342 | 341 | { |
343 | - return '<script src="https://cdn.foxycart.com/' . FoxyCart::getFoxyCartStoreName() . '/loader.js" async defer></script>'; |
|
342 | + return '<script src="https://cdn.foxycart.com/'.FoxyCart::getFoxyCartStoreName().'/loader.js" async defer></script>'; |
|
344 | 343 | } |
345 | 344 | |
346 | 345 | public function getDiscountFieldValue() |
@@ -141,11 +141,15 @@ |
||
141 | 141 | Settings > FoxyStripe > Categories |
142 | 142 | </a>' |
143 | 143 | )); |
144 | - if (class_exists('QuickAddNewExtension')) $catField->useAddNew('FoxyCartProductCategory', $source); |
|
144 | + if (class_exists('QuickAddNewExtension')) { |
|
145 | + $catField->useAddNew('FoxyCartProductCategory', $source); |
|
146 | + } |
|
145 | 147 | |
146 | 148 | // Product Images gridfield |
147 | 149 | $config = GridFieldConfig_RelationEditor::create(); |
148 | - if (class_exists('GridFieldSortableRows')) $config->addComponent(new GridFieldSortableRows('SortOrder')); |
|
150 | + if (class_exists('GridFieldSortableRows')) { |
|
151 | + $config->addComponent(new GridFieldSortableRows('SortOrder')); |
|
152 | + } |
|
149 | 153 | if (class_exists('GridFieldBulkImageUpload')) { |
150 | 154 | $config->addComponent(new GridFieldBulkUpload()); |
151 | 155 | $config->getComponentByType('GridFieldBulkUpload')->setUfConfig('folderName', 'Uploads/ProductImages'); |