Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Ecommerce Invoice View modes: 
User avatar
Member
Member
merete-midtskog - 1/6/2014 7:00:49 AM
   
Ecommerce Invoice
I use v7.0.63 and need help for sorting products by SKUNumber on the invoice;

Do I change it on the Order_contentTable - transformation?

<tr>
<td style="text-align: left">{%SKUNumber%} - {%(IsProductOption) ? "  - " : ""%}{%Localize(SKUName)|(encode)%}
{%(CartItemText != "") ? (" '" + CartItemText + "'") : ""|(encode)%}

</td>
<td>{%Units%}</td>
<td>{%UnitPrice.Format("{0:F}")%}</td>
</tr>


Regards
Merete

User avatar
Certified Developer 13
Certified Developer 13
kentico_josefd - 1/8/2014 6:33:48 AM
   
RE:Ecommerce Invoice
Hello Merete,

This transformation is applied separately to each row of the ContentTable therefore it is too late to attempt to sort it here. There are two possible ways how to achieve your goal, but they will both require significant customization.

One possibility is to order the ShoppingCart.ContentTable according to your own logic each time the ShoppingCart is created or modified. This would also sort any shopping cart checkout process content or preview listings.

Or, you could create a Custom Macro Method, which would take the unsorted ContentTable as a parameter, sort it and apply transformation to it in the API.

Regards,
Josef Dvorak