Developer forum

Forum » Ecommerce - Standard features » Reorder a completed order

Reorder a completed order

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

I need to place a button in the Ecom CustomerCenter, to give the customer the ability to reorder a completed order.

I've found the Ecom:Order:ReorderID template tag, but it doesn't do the trick right away. The code is just <a href='@order.GetString("Ecom:Order.ReorderID")'>Reorder</a>

Are there any examples, other that the default templates?

--
Best regards
Kurt Moskjaer Andersen


Replies

 
Nicolai Pedersen
Reply

This is how we do it on Rapido:

<a href="@order.GetString("Ecom:Order.ReorderID")" class="media-list-item__action dw-mod" title="@Translate("Reorder")">@Translate("Reorder")</a>

What do you get out of the tag?

BR Nicolai

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Nicolai,

Well, I get a link too, like the one you show, but nothing happens when clicking on it, except the current page is reloaded.

The link is insert into the Order loop, where previous orders are listed, like the default template OrderListFull.html in the CustomerCenter module.

/Kurt

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Kurt,

 

The reorder does not tell you if anything is wrong. So if a product is inactive or out of stock it may be removed from the cart (or if it doesn't even exist anymore).

 

Best Regards,

Nuno Aguiar

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Nuno,

But shouldn't it appear as a new order in the backend then?

/Kurt

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Kurt,

 

From my experience (and it's been a while), if the products you are adding, are not "acceptable" (reasons described above):

  • If you had nothing in your cart - the cart would still be empty (and a cart with no orderlines, means no cart at all)
  • If you had a cart - it would look like nothing had changed

 

Hope that helps,

Nuno

Votes for this answer: 1
 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Dooh, my stupid mistake.

It is added to the cart alright, and the customer has to submit the order.

Thanks, Nuno :)

/Kurt

 

You must be logged in to post in the forum