Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 2 of 2

Thread: SKU and MPN Match Up

  1. #1
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Talking SKU and MPN Match Up

    We want our customers to be able to see the SKU matched to the MPN.
    Below is a simplistic idea of what we want.
    SKU -> MPN
    AB1 -> KR1
    BA2 -> RK2

    This is easy to create however we want this to be dynamic for our product XML packages.

    We want to have a link at the bottom of the page that would say i.e. show SKUs matched to MPNs
    I have the code for a basic JavaScript click to show DIV and I will use that to show and hide the table.

    However my question is how can I create this table?
    I know I need to loop the variants and pull the correct items each time.

    The way I see it is the code is:
    open div
    open table tag
    loop product variants
    -start row
    -create col and insert variant SKU
    -create next col and insert the MPN
    -close cols and end row
    end loop
    close table tag
    close div

    The problem is I do not know how to do the looping bit in the XML package.

    All help appreciated, thanks!
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience

  2. #2
    DotNetDevelopments is offline Senior Member
    Join Date
    Jul 2008
    Location
    Harlow / Essex / UK
    Posts
    619

    Default

    I have got some idea of how it will join but not how to called SKU and MPN.

    C#/VB.NET Code:
    <div id="test">
    <
    table>
    <
    tr>
    <
    td><b>SKU</b></td>
    <
    td><b>MPN</b></td>
    </
    tr>

    <
    xsl:for-each select="/root/ProductVariants/Variant">
    <
    tr>
    <
    td>VARIANT SKU</td>
    <
    td>VARIANT MPN</td>
    </
    tr>
    </
    xsl:for-each>

    </
    table>
    </
    div
    Any ideas guys?
    =====
    Version (Code/DB): AspDotNetStorefront MSx 9.1.0.1/9.1.0.0
    Execution Mode: 64 Bit
    Dot Net Developments - E-commerce By Experience