Announcement

Collapse
No announcement yet.

Pulling Custom Order Field data into the Template Based Batch Reports

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Pulling Custom Order Field data into the Template Based Batch Reports

    Trying to figure out how to pull in data entered into a Custom Order Field into a batch report. The field is configured for the store owner to add notes to the order. Those notes need to be displayed on the batch report. Notes are added to the order within the Manage Orders admin.

    I have tried the following:

    Code:
    <mvt:if expr="NOT ISNULL l.settings:order:customfield_values:customfields:order_notes">
    <h2>Notes</h2>
        <hr />
    &mvte:order:customfields:order_notes;
    </mvt:if>
    but even if there is data for that field, it's not displaying.


    The customfields item has been assigned to the template.

    Not sure what else is needed to get it to display in the batch report.

    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Pulling Custom Order Field data into the Template Based Batch Reports

    Hey Leslie -

    You will need to use the new custom field functions to access the order custom fields on the Batch Reports:

    Here are the docs for reference
    http://extranet.mivamerchant.com/for...720#post409720

    It would look something like this:

    Code:
    <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'order_custom_field_code')" />
    The value is: &mvte:customfields;
    Last edited by Brennan; 07-01-13, 01:09 PM.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Pulling Custom Order Field data into the Template Based Batch Reports

      Hi Brennan: I have a related question. I am using a custom order field but it doesn't show in the var list when I search for it on INVC. Is this to be expected? Larry
      Larry
      Luce Kanun Web Design
      www.facebook.com/wajake41
      www.plus.google.com/116415026668025242914/posts?hl=en


      Comment


        #4
        Re: Pulling Custom Order Field data into the Template Based Batch Reports

        Hi Brennan: I'm attempting to display a custom order field value on the INVC page. I have the customefields item checked on the page, but am not getting the custom field's value with this code: <mvt:item name="customfields" param="Read_Order(&mvt:order:id, 'coupon')" />The coupon value is: &mvte:customfields; When I look at the order in Admin, I see a value in the custom order field for 'coupon'. What am I doing wrong? thanks, Larry
        Larry
        Luce Kanun Web Design
        www.facebook.com/wajake41
        www.plus.google.com/116415026668025242914/posts?hl=en


        Comment


          #5
          Re: Pulling Custom Order Field data into the Template Based Batch Reports

          Originally posted by Brennan View Post
          Hey Leslie -

          You will need to use the new custom field functions to access the order custom fields on the Batch Reports:

          Here are the docs for reference
          http://extranet.mivamerchant.com/for...720#post409720

          It would look something like this:

          Code:
          <mvt:item name="customfields" param="Read_Order(&mvt:order:id, 'order_custom_field_code')" />
          The value is: &mvte:customfields;
          So I tried this:


          Code:
          <mvt:item name="customfields" param="Read_Order(&mvt:order:id, 'order_notes')" />
          The value is: &mvte:customfields;

          Trying to make heads or tails of the reference and I'm wondering since this is batch report - wouldn't I need some sort of "write" function?
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Re: Pulling Custom Order Field data into the Template Based Batch Reports

            Hi Leslie: In my case, I'm writing a field that is obtained from the OCST page, on the OSEL page with this: <mvt:item name="customfields" param="Write_Basket('coupon', g.coupon_code)" /> After doing that. I can read and display the value from the Basket custom field with: <mvt:item name="customfields" param="Read_Basket('coupon')" />
            coupon: &mvt:customfields; However I cannot get this value from the order in the INVC page with the code suggested by Brennan:<mvt:item name="customfields" param="Read_Order(&mvt:order:id, 'coupon')" />The coupon value is: &mvte:customfields; Even thought the custom field when viewed in ADMIN has the value in it that was entered or the OCST page.Something I've done isn't correct, but I don't see what it is. Respond to this thread if you get it working. Thanks, Larry PS has anyone found a way to get a new line on this forum since my return key won't do it? Would love an answer to that!
            Larry
            Luce Kanun Web Design
            www.facebook.com/wajake41
            www.plus.google.com/116415026668025242914/posts?hl=en


            Comment


              #7
              Re: Pulling Custom Order Field data into the Template Based Batch Reports

              Originally posted by lesliekirk View Post
              So I tried this:


              Code:
              <mvt:item name="customfields" param="Read_Order(&mvt:order:id, 'order_notes')" />
              The value is: &mvte:customfields;

              Trying to make heads or tails of the reference and I'm wondering since this is batch report - wouldn't I need some sort of "write" function?
              <doh>Okay, just realzied what I said - "write" would send data to the database, "read" retrieves it. </doh>
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Re: Pulling Custom Order Field data into the Template Based Batch Reports

                @Larry

                Sorry the code snippet I gave you previously was incorrect.

                You need to use l.settings vs &mvt:

                Try this:

                Code:
                <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'coupon')" />
                Coupon: &mvt:customfields;<br />
                Brennan Heyde
                VP Product
                Miva, Inc.
                [email protected]
                https://www.miva.com

                Comment


                  #9
                  Re: Pulling Custom Order Field data into the Template Based Batch Reports

                  Hi Leslie: Took a look at an earlier thread about getting the custom order field. The code that was suggested there and that just worked for me is:<mvt:item name="customfields" param="Read_Order( l.settings:order:id, '' )" /> My revised statement reads: <mvt:item name="customfields" param="Read_Order(l.settings:order:id,'coupon')" /> Note that l.settings:order:id has replaced &mvt:order:id in the suggested read statement. Larry
                  Last edited by wajake41; 07-01-13, 01:19 PM.
                  Larry
                  Luce Kanun Web Design
                  www.facebook.com/wajake41
                  www.plus.google.com/116415026668025242914/posts?hl=en


                  Comment


                    #10
                    Re: Pulling Custom Order Field data into the Template Based Batch Reports

                    More on this. The code mentioned in my previous post worked on the INVC page, but did not work on the template merchant email. Still looking for answers. Larry
                    Larry
                    Luce Kanun Web Design
                    www.facebook.com/wajake41
                    www.plus.google.com/116415026668025242914/posts?hl=en


                    Comment


                      #11
                      Re: Pulling Custom Order Field data into the Template Based Batch Reports

                      Hey Larry -

                      I just used that same code in my merchant notification email and I was able to get it to work.

                      If you can create me a temp user and I can get in and see what is going on.

                      - Brennnan
                      Brennan Heyde
                      VP Product
                      Miva, Inc.
                      [email protected]
                      https://www.miva.com

                      Comment


                        #12
                        Re: Pulling Custom Order Field data into the Template Based Batch Reports

                        Modified version of this:

                        Code:
                        <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'coupon')" /> Coupon: &mvt:customfields;
                        worked for me. Okay, now I had to get it to conditionally display.
                        Leslie Kirk
                        Miva Certified Developer
                        Miva Merchant Specialist since 1997
                        Previously of Webs Your Way
                        (aka Leslie Nord leslienord)

                        Email me: [email protected]
                        www.lesliekirk.com

                        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

                        Comment


                          #13
                          Re: Pulling Custom Order Field data into the Template Based Batch Reports

                          Brennan: Dope slap for me. Had the code in an inactive tab. Put it where it's supposed to be and all is well!. Leslie, this is my conditional: <mvt:if expr = "NOT ISNULL l.settings:customfields" > Larry
                          Larry
                          Luce Kanun Web Design
                          www.facebook.com/wajake41
                          www.plus.google.com/116415026668025242914/posts?hl=en


                          Comment


                            #14
                            Re: Pulling Custom Order Field data into the Template Based Batch Reports

                            Having a minor but visible issue with this. I am writing a textarea var entered in OSEL, to custom order field(COF) to the basket in OPAY. I need the value rendered in the invoice and Template Based confirmation emails.

                            customfields item is assigned in all pages in checkout. Code is the same for invc and Template Based confirmation email templates.

                            COF displays in the invoice, and in Template Based batch - printable invc as expected. Does not render in Template Based confirmation emails when the order is placed. However, in manage orders and resending Template Based confirmation emails in admin, the value of the COF does render.

                            How do I fix, or is this a bug?

                            Scott
                            Need to offer Shipping Insurance?
                            Interactive Design Solutions https://www.myids.net
                            MivaMerchant Business Partner | Certified MivaMerchant Web Developer
                            Competitive Rates, Custom Modules and Integrations, Store Integration
                            AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
                            My T-shirt Collection is mostly MivaCon T-shirts!!

                            Comment


                              #15
                              Re: Pulling Custom Order Field data into the Template Based Batch Reports

                              What code are you using on the emails to display the data?

                              Are you displaying the custom basket data or the custom order data?
                              Brennan Heyde
                              VP Product
                              Miva, Inc.
                              [email protected]
                              https://www.miva.com

                              Comment

                              Working...
                              X