liqiusheng / silverstripe-ecommerce

Automatically exported from code.google.com/p/silverstripe-ecommerce
0 stars 0 forks source link

getEcommerceFieldsForCMS extend (EcommerceRole.php) #589

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
e-commerce version: 3.1 10/09/2013

SilverStripe version: 3.1 from github

In getEcommerceFields you have put 

$this->owner->extend('augmentEcommerceFields', $fields);

to extend the fields.

I think that getEcommerceFieldsForCMS method should be able to be extended.
Do not you think?

Regards,
Jose A.

Original issue reported on code.google.com by supp...@sendasoft.com on 10 Sep 2013 at 7:26

GoogleCodeExporter commented 8 years ago
You can write your own DataExtension (extending Member) that hooks into:

Member.getCMSFields

so

class MyMemberExtension extends DataExtension {
  function updateCMSFields($fields) {
   $fields->doShit();
  }
}

would that work?

Original comment by nfranc...@gmail.com on 11 Sep 2013 at 5:52

GoogleCodeExporter commented 8 years ago
You're right.
It was a silly comment. What was I thinking? :(

Regards,
Jose A.

Original comment by supp...@sendasoft.com on 11 Sep 2013 at 10:29