Is there a way for me to include the SKU field on orders that I print from the admin panel on my store?
Announcement
Collapse
No announcement yet.
printing SKU and product code on orders
Collapse
X
-
Re: printing SKU and product code on orders
I've added it but it's still not printing, below is what my code looks like, is it correct?
<tr>
<th class="code">Code</th>
<th class="sku">sku</th>
<th class="product">Product</th>
<th class="quantity">Quantity</th>
<th class="total">Total</th>
</tr>
<mvt:foreach iterator="item" array="order:items">
<tr class="highlighted">
<td class="code">&mvt:item:code;</td>
<td class="sku">&mvt:item:product:sku;</td>
<td class="product">&mvt:item:name;</td>
<td class="quantity">&mvt:item:quantity;</td>
<td class="total">&mvt:item:formatted_price;</td>
</tr>
Comment
-
Re: printing SKU and product code on orders
That code looks right. Does the product have the SKU field filled in?
Or are you trying to grab the SKU of the product variant (size of color)
if that is the case the code would be slightly different:
Code:<mvt:if expr="NOT ISNULL l.settings:item:parts[1]:sku"> &mvt:item:parts[1]:sku; </mvt:if>
Comment
-
Re: printing SKU and product code on orders
I'm looking to do something similar and it's not working. I'm using toolkit to generate an export file each time an order is placed (via a custom email template). I need to be able to pull in the VARIANT SKU for this.
I've tried everything....and can't figure out why I can't get the VARIANT SKU field to show.
Even on the INVC page itself....I'm using kse-variables module to show all my available variables....and the only SKU field that shows up is the master product....not the inventory variant. I have a SKU in the master product (just to test) and also in the Black variant version. The SKU for the variant never shows up on the INVC page using the kse-variables module.
Any ideas?
-Kevin
Comment
-
Re: printing SKU and product code on orders
I think the issue you're running into is the variant SKU is available on all pages of checkout except the INVC page. This is because the variant id is stored in the BaskeItems table but not the OrderItems table. I'm not 100% sure the reasoning behind this. It may just be something development has not added in but I can check to find out.
A work around could be to pass pass the variant SKUs in a hidden input from OPAY to INVC which would make them available as a comma separated list. You could then use toolkit to separate them and add them to your export.
Comment
-
Re: printing SKU and product code on orders
Originally posted by Brennan View PostI think the issue you're running into is the variant SKU is available on all pages of checkout except the INVC page. This is because the variant id is stored in the BaskeItems table but not the OrderItems table. I'm not 100% sure the reasoning behind this. It may just be something development has not added in but I can check to find out.
A work around could be to pass pass the variant SKUs in a hidden input from OPAY to INVC which would make them available as a comma separated list. You could then use toolkit to separate them and add them to your export.
Thanks so much for the explanation. Good to know I'm not going crazy with not being able to find SKU on the INVC page.
Turns out, it was my error in my custom function that wasn't allowing me grab the SKU in my Order Template Email. I'm using toolkit within an Order Based email template to generate a order file. This file will accumulate orders and then once a day get sent to a fulfillment center. My issue was me entering the SKU in the wrong product. I was able to fix that.
The field I was using SKU for was to pass off the UPC code. Do you think using SKU for this is wise? Or do you think I should be using a custom product field for it?
Thanks again for the explanation on the INVC page.....good to know for the future.
-Kevin
Comment
Comment