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 5 of 5

Thread: Tabbed XML Package

  1. #1
    jamotion is offline Senior Member
    Join Date
    Jul 2007
    Posts
    215

    Default Tabbed XML Package

    I understand that the new version of ML has Tabbed XML Package, can we add our own tabs?

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Sure. Say for example, you want to add another one after the 'Images' tab, add these lines below <a rel="images"> .

    Code:
    <a rel="YourCustomTab">
              <xsl:value-of select="aspdnsf:StringResource('YourCustomText')" disable output-escaping="yes" />
    </a>
    ...and below <div id="images">
    Code:
    <div id="YourCustomTab">
        ..... (what you'd like to display on the tab, place the codes here)
    </div>

  3. #3
    webmac is offline Junior Member
    Join Date
    Feb 2010
    Posts
    16

    Default Tabbed XML Package Customization

    I am new to aspdnsf and would like to customize the Tabbed XML Package tabs. I want to add Description, Features, and Specificatons to the tabs. What code do I use to call the information into the tab? I am using aspdnsf v9.0. Can anyone advise? Thank you.

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    Well that really depends on what you're trying to pull in. The easiest thing is just going to be to look at the existing tabs' logic and emulate that.

    For example the 'Images' tab uses the 'LookupProductImage' XSLT function to pull up the current product's image:

    Code:
    <xsl:value-of select="aspdnsf:LookupProductImage(ProductID, ImageFilenameOverride, SKU, 'medium', 1, $AltText)" disable-output-escaping="yes"/>
    ...whereas the 'Overview' tab first checks to see if the product has more than one variant, then uses a template (defined further down in the file) to display more info:

    Code:
    <xsl:choose>
        <xsl:when test="$isMultiVariant = true()">
            <xsl:call-template name="OverviewMultiVariant"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:call-template name="OverviewSingleVariant"/>
        </xsl:otherwise>
    </xsl:choose>
    In the second example there, you'd need to look in the templates further down to see how things are done. You can put the logic that is in those templates directly within a div for your tab if desired, it's just easier to organize them and do 'ifs' with templates.

    If you're just looking to pull in a value that you've got stored on that product, you can use something like this to get it:

    Code:
    select="aspdnsf:GetMLValue(Nameofthefieldyouwant)"
    Last edited by AspDotNetStorefront Staff - Scott; 04-14-2010 at 12:26 PM.

  5. #5
    Sharona's Avatar
    Sharona is offline Member
    Join Date
    Jun 2006
    Posts
    41

    Default Also Bought Tab

    I'm looking to replace the related product tab with an alsobought tab

    Tried using the following, but nothing appears in the tab.

    <xsl:value-of select="aspdnsf:AlsoBought(ProductID, VariantID)" disable-output-escaping="yes"/>

    Using version 9.012
    Last edited by Sharona; 06-24-2010 at 07:42 AM.