liqiusheng / silverstripe-ecommerce

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

Object: strong_classes: ????? #578

Open GoogleCodeExporter opened 8 years ago

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

SilverStripe version: 3.1 from github

In ecommerce/_config folder is ecommerce_custom_classes.yml.example file

-----------------------

##############################################
# below is a list of classes within e-commerce
# that can be customised by setting an
# alternative class name
# It is recommended that you copy this setting
# to mysite/_config/config.yml
# or a similar file.
#
# Classes are listed here in alphabetical
# order.
##############################################
#Object:
#  strong_classes:
#    - BillingAddress: BillingAddress
#    - BuyableFieldType: BuyableFieldType
#    - CartCleanupTask: CartCleanupTask
#    - Currency: Currency
#    - EcommerceClassNameOrTypeDropdownField: 
EcommerceClassNameOrTypeDropdownField
#    - EcommerceConfig: EcommerceConfig
#    - EcommerceConfigDefinitions: EcommerceConfigDefinitions
#    - EcommerceCountry: EcommerceCountry
#    - EcommerceCurrency: EcommerceCurrency
#    - EcommerceDatabaseAdmin: EcommerceDatabaseAdmin
#    - EcommerceDBConfig: EcommerceDBConfig
#    - EcommerceTaskLinkProductWithImages: EcommerceTaskLinkProductWithImages
#    - EcomQuantityField: EcomQuantityField
#    - Money: Money
#    - Order: Order
#    - OrderEmailRecord: OrderEmailRecord
#    - OrderForm: OrderForm
#    - OrderForm_Cancel: OrderForm_Cancel
#    - OrderForm_Payment: OrderForm_Payment
#    - OrderForm_Validator: OrderForm_Validator
#    - OrderFormAddress: OrderFormAddress
#    - OrderFormAddress_Validator: OrderFormAddress_Validator
#    - OrderModifier_Descriptor: OrderModifier_Descriptor
#    - OrderModifierForm: OrderModifierForm
#    - OrderStatusLog_Cancel: OrderStatusLog_Cancel
#    - OrderStepField: OrderStepField
#    - OrderStep_Created: OrderStep_Created
#    - Product_Image: Product_Image
#    - SelectOrderAddressField: SelectOrderAddressField
#    - ShopAccountForm: ShopAccountForm_Validator
#    - ShopAccountForm_Validator: ShopAccountForm_Validator
#    - ShippingAddress: ShippingAddress
#    - ShoppingCart: ShoppingCart
#    - SS_Datetime: I18nDatetime

-----------------------

In my mysite/_config/ecommerce.yml I put
Object:
  strong_classes:
    - OrderFormAddress: SendaOrderFormAddress

but the new SendaOrderFormAddress class is not used.

Have I done something wrong ?

Regards,
Jose A.

Original issue reported on code.google.com by supp...@sendasoft.com on 5 Sep 2013 at 1:36

GoogleCodeExporter commented 8 years ago
I am not sure why not... That needs debugging.... Did you flush=all, etc...? 

Original comment by nfranc...@gmail.com on 5 Sep 2013 at 10:33

GoogleCodeExporter commented 8 years ago

I think there is a bug in SS.  Use this instead:

Object::useCustomClass('OrderFormAddress', 'SendaOrderFormAddress', true);

Original comment by nfranc...@gmail.com on 6 Sep 2013 at 12:16

GoogleCodeExporter commented 8 years ago
Yes, this is the standard. :)

Regards,
Jose A.

Original comment by supp...@sendasoft.com on 6 Sep 2013 at 10:46