Developer forum

Forum » Ecommerce - Standard features » Order prefix different per Shop

Order prefix different per Shop

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

A customer is requesting 2 websites to have different order prefixes (i.e. W_ORDER vs L_ORDER). We can't seem to do this through the UI, but we may be able to do it through a OrderIsPassedToCheckoutHandler notification.

 

Before we go down a rabbit hole, is there anything else we should what out for? Or should we just have separate DW installations?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Use the BeforeUpdateCartToOrder notification - its arguments (BeforeUpdateCartToOrderArgs) have a NewOrderId property - if you overwrite that, that id will be used as the order id.

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Perfect, thanks Nicolai

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi Nicolai,

The UpdateCartToOrder method checks if the BeforeUpdateCartToOrder notification args property NewOrderId is not empty and use it. Although, we are not able to set any value into that property because it is readonly.

Thanks!
BR, Mario

 
Nicolai Pedersen
Reply

Good point. Just removed the Readonly flag.

Can you do args = new Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeUpdateCartToOrderArgs(order, "yourid") as a workaround?

BR Nicolai

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi Nicolai,

We tried your suggestion, assuming your code example should be included on a BeforeUpdateCartToOrder notification, but we were not able to make it work.
Could it be because we generate a new instance of BeforeUpdateCartToOrderArgs?

BR, Mario

 
Nicolai Pedersen
Reply

Probably

 
Lars Larsen
Lars Larsen
Reply

Hi guys

Did anyone of you get this to work? We have the same request from a customer.

 

You must be logged in to post in the forum