Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Ezgi 7 posts 27 karma points
    Jan 05, 2013 @ 18:23
    Ezgi
    0

    UCommerce Listing Order History Details

    Hi All,

    I need to link order numbers with order details, i try to match with those lines below:

    but i think GetOrderProperty is not suitable here to get the order details in umbraco.. What method should I use, your fast help is very much appreciated

    <xsl:template match="/">

     

    <!-- start writing XSLT -->

     <xsl:variable name="orderLineId" select="umbraco.library:RequestQueryString('orderLineId')"/>

      <!--  <xsl:if test="$id!= ''">-->

        <xsl:variable name="orders" select="CommerceLibrary:GetOrderProperty($orderLineId)"/>

  • Ezgi 7 posts 27 karma points
    Jan 06, 2013 @ 01:54
    Ezgi
    0

    Hi again!

    Looks like it started working except it is listing all the orders of the customer, not the specific id. I am working on ucommerce, your insights will be very precious

    Here is my code for order history and order detail:

    ORDER HISTORY:

    <xsl:variable name="orders" select="CommerceLibrary:GetMemberOrderHistory('New Order')"/>
      <table>
        <tr>
          <th>Order Number</th>
          <th>Date</th>
          <th>No. items</th>
          <th>Order Total</th>
       </tr>
        <xsl:for-each select="$orders/purchaseOrders/purchaseOrder">
          <tr>
            <td>
              <a href="/order-detail.aspx?Id={$orders/@orderNumber}"> <xsl:value-of select="@orderNumber"/></a>
              <xsl:copy-of select="$orders"/>
    
              <!--<xsl:value-of select="@orderNumber"/>-->
            </td>
            <td>
              <xsl:value-of select="@createdDate"/>
            </td>
            <td>
              <xsl:value-of select="@productCount"/>
            </td>
            <td>
              <xsl:value-of select="CommerceLibrary:FormatCurrency(@orderTotal)"/>
            </td>
          </tr>
        </xsl:for-each>
      </table>
    </xsl:template>
    ORDER DETAIL:
    <xsl:template match="/">
    <xsl:variable name="orders" select="CommerceLibrary:GetMemberOrderHistory('New order')"/>
    
    
      <!-- <xsl:if test="$id!= ''">-->
          <!--<xsl:if test="$orders/@New order!=''" >-->
    <xsl:variable name="orderNumber" select="umbraco.library:RequestQueryString('orderNumber')"/>
    <!-- <xsl:apply-templates select="$orders/purchaseOrders/purchaseOrder"></xsl:apply-templates>-->
    <xsl:apply-templates select="$orders/purchaseOrders/purchaseOrder"></xsl:apply-templates>
    
    
    </xsl:template>
    
      <xsl:template match="purchaseOrder">
        <h5>Customer</h5>
        <xsl:apply-templates select="billingAddress/address"/>
    
        <h5>Shipping</h5>
        <div>
          <ul>
          <xsl:for-each select="shipments/shipment">        
            <li>
              <div>
                <xsl:value-of select="@name"/>: <xsl:value-of select="CommerceLibrary:FormatCurrency(@price)"/> <br />
                <xsl:apply-templates select="address"/>
              </div>
            </li>
          </xsl:for-each>
          </ul>
        </div>
        <h5>Payment</h5>
        <div>
          <ul>
            <xsl:for-each select="payments/payment">
              <li>
                <xsl:value-of select="@name"/> (<xsl:value-of select="@transactionId"/>)
              </li>
            </xsl:for-each>
          </ul>
        </div>
        <h5>Order Lines</h5>
        <div>
                <table>
                    <tr>
                        <th></th>
                        <th>Item no.</th>
                        <th>Description</th>
                        <th>Item price</th>
                        <th>Quantity</th>
                        <th>Total</th>
                    </tr>
                    <xsl:call-template name="lineItems"></xsl:call-template>
                </table>
        </div>
    
        <form method="post" action="/shop/checkout/orderconfirmation.aspx">
          <!-- Something so we know that we're posting to the next page -->
          <input type="hidden" value="yes" name="submitBasket"></input>
          <!--<input type="submit" value="Submit order"></input>-->
        </form>
        <div>
          <!--<a href="/shop/checkout/payment.aspx">Back</a>-->
        </div>
      </xsl:template>
    
      <xsl:template name="lineItems">
            <xsl:for-each select="lineItems/lineItem">
              <tr>
                            <td>
                                <span style="cursor:pointer;" class="toggleDiscount">
                                    <xsl:attribute name="toggleid">discount_<xsl:value-of select="@index" /></xsl:attribute>
                                    <img src="../../Umbraco/UCommerce/Images/expand.png" alt="Show discounts" title="Show discounts" />
                                </span>
                            </td>
                <td>
                  <xsl:value-of select="@sku"/>
                </td>
                <td>
                  <xsl:value-of select="@productName"/>
                </td>
                <td> ................
    Thanks a lot
  • Søren Spelling Lund 1797 posts 2786 karma points
    Jan 09, 2013 @ 11:26
    Søren Spelling Lund
    0

    You can use CommerceLibrary:GetPurchaseOrder() to load a specific order by orderNumber or orderGuid.

    Hope this helps.

Please Sign in or register to post replies

Write your reply to:

Draft