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: Remove Left Nav on Cart

  1. #1
    ssgumby is offline Senior Member
    Join Date
    Feb 2009
    Posts
    683

    Default Remove Left Nav on Cart

    Can this be done without switching templates? Is there something I can check in the template to tell me if im checking out?

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    You can check the current page name (it's returned in the XML that is returned in the xmlpackage...just set debug="true" in the package to see where). You could check that page name for the checkout pages and as long as it's not one of those pages then process the rest of the xmlpackage.
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    Univest is offline Member
    Join Date
    Feb 2010
    Posts
    30

    Thumbs up example

    Thanks George for your input.

    I need to do something similar but dont understand how the xml would work.
    are u able to give a example of the xml please.

    I have a bar I want to remove when Im in cart.

    thank you

  4. #4
    VibeCommerce is offline Member
    Join Date
    Dec 2006
    Location
    Grandville, MI
    Posts
    63

    Default

    It seems this can be accomplished as George is saying, by checking against the page name. This would assume that your menu or object is actually being output from an xmlpackage.

    Here is an example XmlPackage we did, based on a client's spec, that checks a couple things. It might give you an idea of how to accomplish your needs. It's also handy to use xsl:choose to select classes on your html elements, which allow you to control your layout with CSS - so, when a condition is met (pagename) then you apply this certain class.

    1. Check to see if the customer is logged in, and if not, shows an Order Status link. If they are logged in, it shows the My Account link. and
    2. Only show the Account page link when not on the account page

    HTML Code:
    <?xml version="1.0" ?>
    <package displayname="Vibe Commerce Navigation" version="1.0" debug="false" includeentityhelper="false">
        <PackageTransform>
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
                <xsl:output method="html" omit-xml-declaration="yes" />
    
                <xsl:param name="Page">
                    <xsl:value-of select="/root/System/PageName" />
                </xsl:param>
    
                <xsl:template match="/">
                    <li>
                        <a href="/">Home</a>
                    </li>
                    <li>
                        <a href="t-customerservice.aspx">
                            <![CDATA[Customer Care]]>
                        </a>
                    </li>
                    <xsl:choose>
                        <xsl:when test="/root/System/CustomerIsRegistered = 'false'">
                            <li>
                                <a href="account.aspx#imgOrderhistory">Order Status</a>
                            </li>
                            <xsl:if test="$PageName != 'account.aspx'">
                            <li>
                                <a href="account.aspx">
                                    <![CDATA[My Account]]>
                                </a>
                            </li>
                            </xsl:if>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:if test="$PageName != 'account.aspx'">
                                <li>
                                    <a href="account.aspx">
                                        <![CDATA[My Account]]>
                                    </a>
                                </li>
                            </xsl:if>
                            <li>
                                <a href="signout.aspx">
                                    <![CDATA[Logout]]>
                                </a>
                            </li>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
            </xsl:stylesheet>
        </PackageTransform>
    </package>

  5. #5
    Univest is offline Member
    Join Date
    Feb 2010
    Posts
    30

    Thumbs up nice

    thanks chris for the nice info, I hall have loads of fun with it