Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Allan Kirk 36 posts 110 karma points c-trib
    Oct 18, 2012 @ 08:41
    Allan Kirk
    0

    View order history

    On the homepage for TeaCommerce it states that there is Membershi Integration, which would let a customer log in to see their order history "and more". Having installed the starter kit, I cannot figure out how this works, as I cannot see a login field anywhere. Am I missing something?

  • Anders Burla 2560 posts 8256 karma points
    Oct 18, 2012 @ 09:22
    Anders Burla
    0

    Hi Allan

    This function isnt implemented in the starter kit. But its possible with the Tea Commerce XSLT library to get alle finalized orders for a specific member.

    You use the GetFinalizedOrdersXmlForMember(int memberId). This gives you the xml to loop all his orders and display them.

    Kind regards
    Anders

  • Allan Kirk 36 posts 110 karma points c-trib
    Oct 18, 2012 @ 10:51
    Allan Kirk
    0

    Hi Anders

    Thank you for the quick and helpful answer.

  • merves 23 posts 43 karma points
    Dec 20, 2012 @ 00:08
    merves
    0

    Hi, I have an order history XSLT for members and order detail XSLT for members. and i want to the member see his order detail when he clicks the order name. but when i click the order name nothing returns

    the order detail xslt sth like this;

    <xsl:variable name="id" select="umbraco.library:RequestQueryString('id')"/>
        <xsl:if test="$id!= ''">
        
       
          <xsl:variable name="order" select="teacommerce:GetFinalizedOrdersXmlForMember( umbraco.library:GetCurrentMember()/@id )/order"/>

          <h2 class="propertypaneTitel">Order details</h2>
          <div class="propertypane">

            <table width="100%">
              <tbody>
                <tr>
                  <td style="width: 150px;">Number</td>
                  <td>
                    <xsl:value-of select="$order/@name"/>
                  </td>
                </tr>
                <tr>
                  <td>Created</td>......

     

    and the order history xslt sth like this;

     <xsl:variable name="order" select="teacommerce:GetFinalizedOrdersXmlForMember( umbraco.library:GetCurrentMember()/@id )/order"/>


      
        
      <table width="100%" border="1">
        <tr>
          <th>Order Number</th>
          <th>Date</th>
          <th>Product Name </th>
          <th>Order Total</th>
        </tr>
        <xsl:for-each select="teacommerce:GetFinalizedOrdersXmlForMember( umbraco.library:GetCurrentMember()/@id )/order">

          <tr>
            <td>
              <href="/shoeshop/orderdetail"<xsl:value-of select="@name"/></a>
          <!--  

    Do you have any about it? thanks.

  • Anders Burla 2560 posts 8256 karma points
    Dec 20, 2012 @ 08:23
    Anders Burla
    0

    Hi Merves

    This is because the GetFinalizedOrdersXmlForMember returns a list of orders. So in your list you need

    a href="/shoeshop/orderdetail?orderId={@id}"

    In your details page you will then use teacommerce:GetSpecificOrderXml($id) to get the specific order

    That should do it. You can always use the xsl:copy-of select="{your selector}" to print out what is in the xml output

    Kind regards
    Anders

  • merves 23 posts 43 karma points
    Dec 20, 2012 @ 12:23
    merves
    0

    Hi Anders,

    Thanks for your reply. I have tried change the href url as you said, in detail page

    <xsl:variable name="id" select="umbraco.library:RequestQueryString('id')"/>
    <xsl:if test="$id!= ''">
    <xsl:variable name="order" select="teacommerce:GetSpecificOrderXml($id)/>

    but unfortunately nothing has changed.

    may be the id is missing somehow. when i use order before id like

    <a href="/shoeshop/orderdetail?OrderId={@id}"> <xsl:value-of select="order/@id"/></a>

    in the output; in my order history table the id coloumn returns empty.

  • Anders Burla 2560 posts 8256 karma points
    Dec 20, 2012 @ 12:49
    Anders Burla
    0

    It should be:

    <a href="/shoeshop/orderdetail?OrderId={$order/@id}"> <xsl:value-of select="$order/@id"/></a>

    You can always do a <xsl:copy-of select="$order" /> or any variable to see what data it holds

  • Mark 22 posts 73 karma points
    Sep 30, 2013 @ 15:32
    Mark
    0

    Hi,

    We're about to impliment this for a customer. Is this the solution for Tea Commerce 2 as well or is there an alternative razor method? I can't seem to find any realted documentation.


    Thanks,
    Mark 


     

Please Sign in or register to post replies

Write your reply to:

Draft