Code Duplication    Length = 6-9 lines in 2 locations

code/pages/ProductPage.php 1 location

@@ 217-222 (lines=6) @@
214
            $prodOptField
215
        ));
216
217
        if (FoxyCart::store_name_warning() !== null) {
218
            $fields->addFieldToTab('Root.Main', LiteralField::create("StoreSubDomainHeaderWarning", _t(
219
                'ProductPage.StoreSubDomainHeaderWarning',
220
                "<p class=\"message error\">Store sub-domain must be entered in the <a href=\"/admin/settings/\">site settings</a></p>"
221
            )), 'Title');
222
        }
223
224
        // allows CMS fields to be extended
225
        $this->extend('updateCMSFields', $fields);

code/extensions/FoxyStripeSiteConfig.php 1 location

@@ 86-94 (lines=9) @@
83
        ));
84
85
        // configuration warning
86
		if(FoxyCart::store_name_warning()!==null){
87
			$fields->insertBefore(LiteralField::create(
88
                "StoreSubDomainHeaderWarning",
89
                _t(
90
                    'FoxyStripeSiteConfig.StoreSubDomainHeadingWarning',
91
                    "<p class=\"message error\">Store sub-domain must be entered in the <a href=\"/admin/settings/\">site settings</a></p>"
92
                )
93
            ), 'StoreDetails');
94
		}
95
96
        // products tab
97
		$fields->addFieldsToTab('Root.FoxyStripe.Products', array(