Changing order number sequence within Commerce Manager

Vote:
 

Hi Guys, I'm using Commerce Manager Version: 7.9 (build: 0)

I know I can set the CreateOrderNumber delegate prior to executing the SaveAsPurchaseOrder method to override the TrackingNumber for the PO and there is a nice article on this - http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/8/Orders/Changing-order-number-sequence/ - However if I create an order via the admin interface within Commerce Manager is there a way I can do the same thing? Is there an event I need to hook into?

i.e. Login into CM goto -> Order Management -> Purchase Orders - New Order

Any help is much appreciated.  Cheers Mark

#118296
Mar 04, 2015 3:11
Vote:
 

Hi,

There are some solutions to that issue. You can create your own version of OrderCreate which set the PO at saving, then register it instead of the default one (You will need to create a wrapper for it, for example CustomOrderCreateContainer.ascx, which mimicks the OrderCreateContainer, then register CustomOrderCreateContainer.ascx in PurchaseOrder-New.xml. This affects CM only.

The second way is to create your own PurchaseOrder class, which inherits from PurchaseOrder and override the AcceptChanges to make changes to PO number when you save it. This affects whole site and you might check if the order is being created or being edited. Then register new class as PurchaseOrderType in Configs\ecf.order.config 

Personally I prefer the second approach :)

Regards.

/Q

#118300
Mar 04, 2015 7:50
Vote:
 

Great thanks.  I like the second approach as well.  I've got that working now.  Cheers

#118370
Mar 05, 2015 9:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.