Developer forum

Forum » Ecommerce - Standard features » Edit quote from front-end

Edit quote from front-end

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I have to give permissions to a user to edit a Quote before approving it for the customer. The quote details that will most likely be changed are Quantity, Unit price, Comment and Quote state.

Is there a standard way to accomplish this?

Thank you,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have investigated further and what we are looking for is the same functionality we already have for Draft Orders where the sales agent can edit the prices when creating the cart.

I have noticed that the editing is based on an cart command value "updateorderlines".

Looking in the source code, I have found a method called UpdateOrderLines which accepts a bool parameter allowEditingCartPrices.

This boolean is set by default to "false". How can I turn it to true just in my Quote editing context?

Thank you,

Adrian

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Adrian,

Did you find a solution for this or another way of making it possible to edit quotes on the frontend?

Best regards
Kurt

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Kurt,

Not really. Apparently, that logic that would allow editing the orderline with allowEditingCartPrices is only valid for users that Impersonate other users.

I don't remember exactly how we solved it :)

Most probably some hack in some templates using the API or SQL.

I am sorry I cannot help you more.


Adrian

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Adrian,

Thank you very much for your response.

I'm having the same "issue" and started looking into Quotes, but is considering Draft orders instead.

Best regards
Kurt

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

If you need editing of the order and orderlines, then order drafts and the commands related to that is the way to go.

See more here: https://doc.dynamicweb.com/training/guides-videos/ecommerce/cart-management-from-frontend

and here: https://doc.dynamicweb.com/template-tags/introduction/ecommerce/cart-commands

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

This sounds wonderful. Is this editing available for any user? Or just for users impersonating other users?

Thank you,
Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I believe that is mentioned in the documentation.

 

You must be logged in to post in the forum