Announcement

Collapse
No announcement yet.

Need some really basic help with template based batch reports

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

  • Bruce - PhosphorMedia
    replied
    The existing Template Based Batch Reports will also have some examples of gathering pretty much everything you would want from the orders.

    Leave a comment:


  • teedle
    replied
    Thanks for the detailed reply Nick I'll give it a shot

    Leave a comment:


  • Nick
    replied
    Here is a code snippet to see the variables and values of an array:
    Code:
    <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(VARIABLE FOR ARRAY HERE), ',', '<br>'))" />
    The array for the items in an order will be in the order:items array. If you navigate to the INVC page within the admin you can use that code as an example of how the array is structured.

    The snippet below will output the variables and values of a product within the item array.
    Code:
    <!-- EXAMPLE: -->
    <mvt:foreach iterator="order" array="admin_order:orders">
        <mvt:foreach iterator="item" array="order:items">
            <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:item), ',', '<br>'))" />
        </mvt:foreach>
    </mvt:foreach>
    Hopefully this helps!
    Last edited by Nick; 12-10-19, 09:32 AM.

    Leave a comment:


  • Need some really basic help with template based batch reports

    I'm trying to build a custom .csv with a batch report template. Found some help here, but I'm bad so I need more help with the template language... I can see it has a loop for orders which is perfect:
    Code:
    <mvt:foreach iterator="order" array="admin_order:orders">
    
    </mvt:foreach>
    But I don't know how to then individually loop through each product and also each attribute. I want to add statements to check if product attributes contain certain words so I can enter correct words or just commas.
    Code:
    <mvt:foreach iterator="???" array="???">
    
    </mvt:foreach>
    Any help at all (even just links to the right docs) is appreciated!
Working...
X