| @@ 58-66 (lines=9) @@ | ||
| 55 | )); |
|
| 56 | ||
| 57 | // configuration warning |
|
| 58 | if(FoxyCart::store_name_warning()!==null){ |
|
| 59 | $fields->insertBefore(LiteralField::create( |
|
| 60 | "StoreSubDomainHeaderWarning", |
|
| 61 | _t( |
|
| 62 | 'FoxyStripeSiteConfig.StoreSubDomainHeadingWarning', |
|
| 63 | "<p class=\"message error\">Store sub-domain must be entered in the <a href=\"/admin/settings/\">site settings</a></p>" |
|
| 64 | ) |
|
| 65 | ), 'StoreDetails'); |
|
| 66 | } |
|
| 67 | ||
| 68 | // products tab |
|
| 69 | $fields->addFieldsToTab('Root.FoxyStripe.Products', array( |
|
| @@ 252-257 (lines=6) @@ | ||
| 249 | $discountGrid = GridField::create('ProductDiscountTiers', 'Product Discounts', $this->ProductDiscountTiers(), $discountsConfig); |
|
| 250 | $fields->addFieldToTab('Root.Discounts', $discountGrid); |
|
| 251 | ||
| 252 | if (FoxyCart::store_name_warning() !== null) { |
|
| 253 | $fields->addFieldToTab('Root.Main', LiteralField::create("StoreSubDomainHeaderWarning", _t( |
|
| 254 | 'ProductPage.StoreSubDomainHeaderWarning', |
|
| 255 | "<p class=\"message error\">Store sub-domain must be entered in the <a href=\"/admin/settings/\">site settings</a></p>" |
|
| 256 | )), 'Title'); |
|
| 257 | } |
|
| 258 | ||
| 259 | // allows CMS fields to be extended |
|
| 260 | $this->extend('updateCMSFields', $fields); |
|