Announcement

Collapse
No announcement yet.

Order Custom Field Issue

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

    Order Custom Field Issue

    We created an Order Custom Field to collect a message. It appears to be working correctly, but the inputted message is not appearing on the INVC page. We are using the following code on the INVC page in the Customer Information Section:

    Code:
    <mvt:item name="customfields" param="Read_Basket('gift_msg', g.gift_msg)" />
    <mvt:item name="customfields" param="Read_Order(l.settings:order:id, 'gift_msg', g.gift_msg)" />
    <div class="form_row">
    <label>Gift Card Message:</label>
    <div>&mvte:global:gift_msg;</div>
    </div>
    When we place a test order, the field data input gets stored in the admin with the order under the "Custom Fields" link as it is suppose to. When we view the INVC page using Tokenlist, the gift message appears on the INVC page.

    What are we missing to display the gift message on the INVC page?

    #2
    Have you applied the custom field to the invoice page? See attached image.

    Attached Files

    Comment


      #3
      I was able to figure this out. I changed the code on the INVC page from:
      Code:
      <mvt:item name="customfields" param="Read_Basket('gift_msg', g.gift_msg)" />
      to
      Code:
      <mvt:item name="customfields" param="Read_Basket('gift_msg', l.settings:gift_msg)" />
      and
      Code:
      &mvte:global:gift_msg;
      to
      Code:
      &mvte:gift_msg;

      Comment


        #4
        The problem is two fold. In your first code snippet, you where overwriting the basket custom field with the 'order custom' field. and this didn't work because order custom fields are not always available on the invoice screen as that is when miva automatically writes basket custom to order custom.

        So, using the basket custom field is usually appropriate for having this data appear on the invoice page.

        The belt and suspenders version is this:

        Code:
        <mvt:item name="customfields" param="Read_Basket('gift_msg', g.gift_msg)" />
        <mvt:if expr="NOT(g,gift_msg)">
           Read_Order(l.settings:order:id, 'gift_msg', g.gift_msg)
        </mvt:if>
           &mvt:global:gift_msg;
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        Working...
        X