Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon 691 posts 1066 karma points
    Sep 07, 2016 @ 13:44
    Simon
    0

    Custom text field with Order Item and with General Order

    Hi Guys,

    I am asking whether is is possible that after a user chooses the variants, we want that for each item, we would like to add some text with an item.

    Also, when a user submits an order, we would like also to have some notes with that specific order that user submits.

    Something like the below:

    enter image description here

    enter image description here

    Thank you for your help.

    Kind Regards

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 07, 2016 @ 16:49
    Rusty Swayne
    0

    Each line item in the basket has an ExtendedDataCollection. You can add the individual line item notes to that collection.

    For the invoice, you can add a note through CheckoutManager.Extended.

    So that you have all of the notes in the back office, you could replace the task

    <taskChain alias="CheckoutManagerInvoiceCreate">
      <tasks>
        <task type="Merchello.Core.Chains.InvoiceCreation.CheckoutManager.AddBillingInfoToInvoiceTask, Merchello.Core" />
        <task type="Merchello.Core.Chains.InvoiceCreation.CheckoutManager.ConvertItemCacheItemsToInvoiceItemsTask, Merchello.Core" />
        <task type="Merchello.Web.Workflow.InvoiceCreation.CheckoutManager.AddCouponDiscountsToInvoiceTask, Merchello.Web" />
        <task type="Merchello.Core.Chains.InvoiceCreation.CheckoutManager.ApplyTaxesToInvoiceTask, Merchello.Core" />
        <task type="Merchello.Core.Chains.InvoiceCreation.CheckoutManager.ValidateCommonCurrency, Merchello.Core" />
        <task type="Merchello.Core.Chains.InvoiceCreation.CheckoutManager.AddInvoiceNumberPrefixTask, Merchello.Core" />
    
       <!-- REPLACE THE FOLLOWING TASK WITH ONE THAT CONCATENATES ALL YOUR NOTES TOGETHER -->
        <task type="Merchello.Web.Workflow.InvoiceCreation.CheckoutManager.AddNotesToInvoiceTask, Merchello.Web" />
      </tasks>
    </taskChain>
    

    Here is the code for that task:

    https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Workflow/InvoiceCreation/CheckoutManager/AddNotesToInvoiceTask.cs

  • Simon 691 posts 1066 karma points
    Sep 07, 2016 @ 19:03
    Simon
    0

    Thank you Rusty for your help.

    So the notes that I add to the ExtendedDataCollection will be visible somewhere in the umbraco CMS, once the order will be placed, or somewhere where there are the Customer Basket?

    Thank you

    Kind Regards

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 07, 2016 @ 19:17
    Rusty Swayne
    0

    They will show up on the sales overview:

    enter image description here

  • Simon 691 posts 1066 karma points
    Sep 07, 2016 @ 19:19
    Simon
    0

    Hi Rusty,

    But that of the Sale/Order.

    The notes for the items in the order, where will be shown? (The ones that I will add notes in the ExtendedDataCollection)

    Thank you

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Sep 07, 2016 @ 19:24
    Rusty Swayne
    0

    That is why you would write your own custom task to replace the default one...

    iterate through the line items and look for notes (with an extended data key you define specifically for your application) and either concatenate them all together as a single note ... or add a bunch of individual notes.

    If you want the note to appear under the line items (in the items list) you would need to write a custom Angular directive and put it into the sales overview page. This is something we have thought about as a future feature, but have not made it a priority thus far. If you do it that way it'd be great to get a pull request.

  • Ayo Adesina 370 posts 926 karma points
    Feb 25, 2019 @ 19:46
    Ayo Adesina
    0

    I’m going to be working in this area, I think I have worked out what I need now, but I think I could do this if I tried hard enough, maybe if I can get of a hand getting started I’ll give you a pull request:-)

  • Simon 691 posts 1066 karma points
    Sep 07, 2016 @ 19:28
    Simon
    0

    Ok Got it.

    Thanks very much.

  • Josh Doolan 9 posts 29 karma points
    Jan 04, 2017 @ 21:51
    Josh Doolan
    0

    Hi Simon and Rusty,

    Did this feature or pull request ever make it in?

    Thanks in advance guys.

    Josh

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 04, 2017 @ 22:52
    Rusty Swayne
    0

    Hi Josh,

    The notes are in there - the custom directive would be part of Simon's solution (not sure if he did it that way - Simon?) but there was never a feature add or pull request.

Please Sign in or register to post replies

Write your reply to:

Draft