steveosoule
8/14/2013 - 9:21 PM

Miva - Batch Report - Get Customer Login

Miva - Batch Report - Get Customer Login

<mvt:if expr="l.settings:order:cust_id NE 0">
  <mvt:item name="ry_toolbelt" param="assign|g.getCustomer|'SELECT login FROM s01_Customers WHERE id = ' $ asciichar(34) $ l.all_settings:order:cust_id $ asciichar(34)" />
<mvt:else>
	<mvt:item name="ry_toolbelt" param="assign|g.getCustomer|'SELECT login FROM s01_Customers WHERE (pw_email = ' $ asciichar(34) $ l.all_settings:order:ship_email $ asciichar(34) $ ') OR (pw_email = ' $ asciichar(34) $ l.all_settings:order:bill_email $ asciichar(34) $ ') LIMIT 1'" />
</mvt:if>
<mvt:item name="ry_toolbelt" param="query|g.getCustomer|customer" />
&mvt:customer;