Skip to content

Commit

Permalink
prevented adding of duplicate fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Makreig committed Sep 25, 2019
1 parent 916597f commit abde67e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Extensions/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@ public function updateSettingsFields(FieldList $fields)
*/
public function updateCMSFields(FieldList $fields)
{
$fields->removeByName("RemoveFromShoppingFeed");
$fields->removeByName("Condition");
$fields->removeByName("Availability");
$fields->removeByName("Brand");
$fields->removeByName("MPN");
$fields->removeByName("GTIN");
$fields->removeByName('GoogleProductCategoryID');
$fields->removeByName("ShoppingPrimaryImage");
$fields->removeByName("ShoppingAdditionalImage");

if (!$this->owner->hasCMSSettingsFields()) {
$tabset = $fields->findOrMakeTab('Root.Settings');

Expand Down

0 comments on commit abde67e

Please sign in to comment.