@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ); |
169 | 169 | |
170 | 170 | // Cateogry Dropdown field w/ add new |
171 | - $source = function () { |
|
171 | + $source = function() { |
|
172 | 172 | return ProductCategory::get()->map()->toArray(); |
173 | 173 | }; |
174 | 174 | $catField = DropdownField::create('CategoryID', _t('ProductPage.Category', 'FoxyCart Category'), $source()) |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | $product = self::get()->byID($this->ID); |
300 | 300 | if (isset($product->ParentID)) { |
301 | 301 | $origParent = $product->ParentID; |
302 | - } else { |
|
302 | + }else { |
|
303 | 303 | $origParent = null; |
304 | 304 | } |
305 | 305 | $currentParent = $this->ParentID; |
@@ -376,8 +376,7 @@ discard block |
||
376 | 376 | $optionName = ($optionName !== null) ? preg_replace('/\s/', '_', $optionName) : $optionName; |
377 | 377 | |
378 | 378 | return (SiteConfig::current_site_config()->CartValidation) |
379 | - ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : |
|
380 | - $optionValue; |
|
379 | + ? \FoxyCart_Helper::fc_hash_value($productCode, $optionName, $optionValue, $method, $output, $urlEncode) : $optionValue; |
|
381 | 380 | } |
382 | 381 | |
383 | 382 | // get FoxyCart Store Name for JS call |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | public function testProductDraftOptionDeletion() |
217 | 217 | { |
218 | - self::$use_draft_site = false;//make sure we can publish |
|
218 | + self::$use_draft_site = false; //make sure we can publish |
|
219 | 219 | |
220 | 220 | $this->logInWithPermission('ADMIN'); |
221 | 221 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | //build holder page, ProductPage can't be on root level |
224 | 224 | $holder->doPublish(); |
225 | 225 | |
226 | - $product = $this->objFromFixture(ProductPage::class, 'product1');//build product page |
|
226 | + $product = $this->objFromFixture(ProductPage::class, 'product1'); //build product page |
|
227 | 227 | $product->doPublish(); |
228 | 228 | |
229 | 229 | $productID = $product->ID; |
@@ -231,29 +231,29 @@ discard block |
||
231 | 231 | $optionGroup = $this->objFromFixture(OptionGroup::class, 'size'); |
232 | 232 | //build the group for the options |
233 | 233 | $optionGroup->write(); |
234 | - $option = $this->objFromFixture(OptionItem::class, 'small');//build first option |
|
234 | + $option = $this->objFromFixture(OptionItem::class, 'small'); //build first option |
|
235 | 235 | $option->write(); |
236 | - $option2 = $this->objFromFixture(OptionItem::class, 'large');//build second option |
|
236 | + $option2 = $this->objFromFixture(OptionItem::class, 'large'); //build second option |
|
237 | 237 | $option2->write(); |
238 | 238 | |
239 | - $this->assertTrue($product->isPublished());//check that product is published |
|
239 | + $this->assertTrue($product->isPublished()); //check that product is published |
|
240 | 240 | |
241 | - $product->deleteFromStage('Stage');//remove product from draft site |
|
241 | + $product->deleteFromStage('Stage'); //remove product from draft site |
|
242 | 242 | |
243 | - $this->assertTrue($product->isPublished());//check product is still published |
|
243 | + $this->assertTrue($product->isPublished()); //check product is still published |
|
244 | 244 | |
245 | 245 | $testOption = $this->objFromFixture(OptionItem::class, 'large'); |
246 | 246 | |
247 | 247 | $this->assertThat($testOption->ID, $this->logicalNot($this->equalTo(0))); |
248 | 248 | //make sure the first option still exists |
249 | 249 | |
250 | - $product->doRestoreToStage();//restore page to draft site |
|
251 | - $product->doUnpublish();//unpublish page |
|
252 | - $product->deleteFromStage('Stage');//remove product from draft site |
|
250 | + $product->doRestoreToStage(); //restore page to draft site |
|
251 | + $product->doUnpublish(); //unpublish page |
|
252 | + $product->deleteFromStage('Stage'); //remove product from draft site |
|
253 | 253 | |
254 | 254 | $checkDeleted = OptionItem::get()->filter(array('Title' => 'Large', 'ProductID' => $productID))->first(); |
255 | 255 | //query same option as above |
256 | 256 | |
257 | - $this->assertEquals($checkDeleted->ID, 0);//check that the ID is 0 (empty object/non-existent) |
|
257 | + $this->assertEquals($checkDeleted->ID, 0); //check that the ID is 0 (empty object/non-existent) |
|
258 | 258 | } |
259 | 259 | } |