Version: current

     1 <?php
     2 /**
     3  * Добавление Веса товара
     4  *
     5  * @package cart_shipping
     6  * @author menedem
     7  */
     8 class ProductShippingDecorator extends DataObjectDecorator {
     9     function extraStatics() {
    10         return array(
    11             'db' => array(
    12                 'Weight' => 'Float'
    13             )
    14         );
    15     }
    16
    17     function updateCMSFields(& $fields) {
    18         $fields->addFieldToTab('Root.Content.Main', new TextField('Weight', $this->owner->fieldLabel('Weight')));
    19     }
    20 }
    21

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -