Announcement

Collapse
No announcement yet.

Downloading order payment information

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

    #16
    Re: Downloading order payment information

    Brennan,
    Thanks again for the additional info. One of the problems we are having is entering your suggested statements for export in the proper fields. There are 2 fields in each of 2 lines but you wrote only 2 line statements and I can't figure out how to break them up. I tried several different combinations noting seemed to effect the exporting of data. Each time I only got the invoice printing on the screen. One time I did get something to download but it was a .mvc file so I discarded it. Please give us some more details in this area.
    Thanks,
    Chet
    Thanks,
    Chet Vincentz
    [email protected]

    www.electrodyne.cc Quality Motoring Accessories
    www.racdyn-usa.com BMW, MINI & Porsche performance
    www.artisticartifacts.com Creative art materials

    Comment


      #17
      Re: Downloading order payment information

      Here is a sample batch report to get you started.


      It assumes all your orders have the same payment type. If you accept paypal or POs or something like that, this breaks down because it will always pull the header row from the first order in batch report




      Code:
      <mvt:assign name="g.comma" value="asciichar(44)" />
      <mvt:assign name="g.new_line" value="asciichar(10)" />
      
      
      <mvt:foreach iterator="order" array="admin_order:orders">
      
      
      	<mvt:if expr="l.pos1 EQ 1">
      		<mvt:foreach iterator="field" array="order:payment:fields">
      			&mvt:field:label;&mvt:global:comma;
      		</mvt:foreach>
      		&mvt:global:new_line;
      	</mvt:if>
      
      
      
      
      	<mvt:foreach iterator="field" array="order:payment:fields">
      		&mvt:field:value;&mvt:global:comma;
      	</mvt:foreach>
      	&mvt:global:new_line;
      
      
      </mvt:foreach>

      This should output a single header row followed by the payment data for each order. Here is a sample output


      Code:
      
      Card Type:, Name on Card:, Card Number:, Expiration Date:, 
      Visa, Brennan Heyde, 4111111111111111, 2/2015,
      Visa, Test Order, 4111111111111111, 2/2015,

      To get it to output to a csv file, go to items, then assign the http_headers item.


      Then within that tab add the following two headers:


      Content-Type text/csv
      Content-Disposition attachment; filename="payment_export.csv"
      Brennan Heyde
      VP Product
      Miva, Inc.
      [email protected]
      https://www.miva.com

      Comment

      Working...
      X