 |
| View previous topic :: View next topic |
| Author |
Message |
EmergencySurvival
Joined: 07 May 2012 Posts: 18
|
Posted: Thu Aug 09, 2012 12:20 pm Post subject: Need Help eBay Pick List by SKU and Multiple Item Orders |
|
|
I am using a Pick List provided in this forum. The pick list is based on the SKU. I have a small problem when it comes to multiple item orders. If an eBay order contains multiple items, the template only adds the first item onto the pick list. It does not add the second, third, etc. items to the pick list. Could you give me some help. Thanks. Here is the template code.
| Quote: | <!DOCTYPE xsl:stylesheet [
<!-- This is the lookup key value for the grouping table -->
<!ENTITY itemKey "sw:GetOrderItemKeyValue(., $optionSpecific)">
<!-- This is the collection of items in a single grouping -->
<!ENTITY itemGroup "key($keyTable, &itemKey;)" >
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sw="http://www.interapptive.com/shipworks" extension-element-prefixes="sw">
<!-- Imports -->
<xsl:import href="System\Snippets" />
<xsl:output method="html" encoding="utf-8" />
<!-- This can be changed to false to turn off thumbnails -->
<xsl:variable name="showThumbnails" select="true()" />
<!-- This can be used to control if items are grouped based on options -->
<xsl:variable name="optionSpecific" select="false()" />
<!-- Setup the key table for grouping by item code -->
<xsl:key name="items-specific" match="Item" use="sw:GetOrderItemKeyValue(., true())" />
<xsl:key name="items-non-specific" match="Item" use="sw:GetOrderItemKeyValue(., false())" />
<!-- Determine which key table to use based on if we are option specific or not -->
<xsl:variable name="keyTable">
<xsl:if test="$optionSpecific">
<xsl:value-of select="'items-specific'" />
</xsl:if>
<xsl:if test="not($optionSpecific)">
<xsl:value-of select="'items-non-specific'" />
</xsl:if>
</xsl:variable>
<!-- Start of template -->
<xsl:template match="/"><xsl:apply-templates /></xsl:template>
<xsl:template match="ShipWorks">
<!-- Width defined by the template PageSettings -->
<xsl:variable name="pageWidth" select="concat(Template/Output/ContentWidth, ' in')" />
<!-- Default font. Specified as a variable since GMail and Outlook behave differently. -->
<xsl:variable name="pageFont" select="'font-family: Arial; font-size: 8pt;'" />
<!-- These styles are used on multiple td's so to avoid copy\paste errors they are defined once here. We have to do this since GMail doesn't support <style> in the <head>. -->
<xsl:variable name="orderDetailHeaderStyle" select="'border: 1px solid dimgray; background-color: #F3F3F3; font-weight: bold; padding: 3px;'" />
<xsl:variable name="orderDetailAttributeStyle" select="'color: #808080; padding: 0px 8px 2px 2px;'" />
<xsl:variable name="orderChargeStyle" select="'white-space: nowrap; text-align: right; padding: 1px 8px 3px 16px;'" />
<html>
<head>
<title>Pick List</title>
<style>
body, table { <xsl:value-of select="$pageFont" /> }
</style>
</head>
<body style="{$pageFont}">
<h3>Pick List - <xsl:value-of select="count(Customer/Order)" /> Orders</h3>
<xsl:value-of select="sw:ToShortDate(//Generated)" />
<table style="width:{$pageWidth}; margin: 0px 0px 0px 0px; border-collapse: collapse;" cellspacing="0">
<tr>
<xsl:if test="$showThumbnails">
<td style="width: 50px; {$orderDetailHeaderStyle};">Image</td>
</xsl:if>
<td style="{$orderDetailHeaderStyle}; ">Name</td>
<td style="{$orderDetailHeaderStyle}; white-space: nowrap;">Item SKU</td>
<td style="{$orderDetailHeaderStyle};" align="right">Quantity</td>
<td style="{$orderDetailHeaderStyle};" align="right">Picked</td>
</tr>
<!-- Group by quantity -->
<xsl:for-each select="Customer/Order/Item[generate-id(.)=generate-id(key($keyTable, sw:GetOrderItemKeyValue(., $optionSpecific)))]">
<xsl:sort select="Name" order="ascending" />
<xsl:call-template name="outputItemGroup" />
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<!-- -->
<!-- Outputs totals for a single item -->
<!-- -->
<xsl:template name="outputItemGroup">
<xsl:variable name="groupQuantity" select="sum(key($keyTable, sw:GetOrderItemKeyValue(., $optionSpecific))/Quantity)" />
<xsl:variable name="groupTotal" select="sum(key($keyTable, sw:GetOrderItemKeyValue(., $optionSpecific))/Total)" />
<!-- We shouldn't have to conditionally apply the topborder... but IE is broken. -->
<xsl:variable name="orderDetailContentStyle">
padding: 4px 8px 4px 8px;
vertical-align: top;
<xsl:if test="position() != 1">border-top: 1px solid lightgrey;</xsl:if>
</xsl:variable>
<tr>
<xsl:if test="$showThumbnails">
<td style="{$orderDetailContentStyle};">
<xsl:if test="Thumbnail != ''">
<img src="{Thumbnail}" alt="" style="height:50; width:50; border:0;" />
</xsl:if>
</td>
</xsl:if>
<td style="{$orderDetailContentStyle};"><xsl:value-of select="Name" />
<xsl:if test="$optionSpecific">
<xsl:for-each select="Option">
<table style="width: 100%;" cellspacing="0">
<tr>
<td style="color: DarkGray;" nowrap="nowrap"><xsl:value-of select="Name" />: </td>
<td style="color: DarkGray; width: 100%;"><xsl:value-of select="Description" /></td>
</tr>
</table>
</xsl:for-each>
</xsl:if>
</td>
<td style="{$orderDetailContentStyle}; white-space: nowrap;"><xsl:value-of select="SKU" /></td>
<td style="{$orderDetailContentStyle};" align="right"><xsl:value-of select="$groupQuantity" /></td>
<td style="{$orderDetailContentStyle};" align="right">_____________</td>
</tr>
</xsl:template>
</xsl:stylesheet> | [/code] _________________ Regards,
ESOutfitter |
|
| Back to top |
|
EmergencySurvival
Joined: 07 May 2012 Posts: 18
|
Posted: Sun Aug 26, 2012 1:52 pm Post subject: |
|
|
When the pick list adds up items with Attributes:
If there are multiple orders of items with different Attributes, the pick list will only display the first attribute with the total of ALL of the orders for that item under that Attribute no matter what the attributes are. Example
HAT1 has sizes : Small, Med. Lg
Hat1_SM, Hat1_MED, Hat1_LG
Five HAT1s are ordered and 2 are LG, and 1 is MED, and 2 are SM
The Pick list will display HAT1
LG - 5
I really need help fixing this... Please mister tech man, could you spare a moment... _________________ Regards,
ESOutfitter |
|
| Back to top |
|
EmergencySurvival
Joined: 07 May 2012 Posts: 18
|
Posted: Mon Aug 27, 2012 6:07 pm Post subject: |
|
|
<!-- This can be used to control if items are grouped based on options -->
<xsl:variable name="optionSpecific" select="false()" />
So I just turn False to True and it works the way I need it.
I sat here for four days and taught myself the code, installed sql management tools for the database, etc.
Thanks so much for the great tech help that Shipworks offers on your forum. Fkn waste of my damn time asking you jokers for anything. Bite me _________________ Regards,
ESOutfitter |
|
| Back to top |
|
Chris Bohnemeier
Joined: 12 Jan 2011 Posts: 73
|
Posted: Tue Aug 28, 2012 10:56 am Post subject: |
|
|
Very sorry that we missed your post. In the future if you need immediate assistance, please feel free to open a support case by emailing support[AT]shipworks[DOT]com or calling us directly at 800-952-7784 _________________ ---------------
Chris Bohnemeier
Interapptive, Inc |
|
| Back to top |
|
EmergencySurvival
Joined: 07 May 2012 Posts: 18
|
Posted: Tue Aug 28, 2012 5:01 pm Post subject: |
|
|
I called, emailed the tech, opened a case, and then I posted, then I opened another case a second time. I was doing everything I could to get someone to give me the time of day. Not happy, especially since it was such a simple solution.
Now I am set up with Crystal Reports and the SQL datatbase so I can do any report I want. I shouldn't have had to bang my head against the wall to learn to change false to true.
Apology accepted. _________________ Regards,
ESOutfitter |
|
| Back to top |
|
|
|
 |
 |
Powered by phpBB © 2001, 2002 phpBB Group
|
 |
|