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: Order Weight:

  1. #1
    nihon is offline Senior Member
    Join Date
    May 2008
    Posts
    150

    Default Order Weight:

    Anybody know how i can grab the total order weight and place it on the checkout/shopping cart page.

    Thanks
    Version (Code/DB):
    AspDotNetStorefront ML 8.1.2.0/8.1.2.0

  2. #2
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Yes, that's possible. You could create a label control on the shoppingcart.aspx (say lblborderweight), then on the shoppingcart.aspx.cs: InitializePageContent event, add this line:
    Code:
    lblorderweight.Text = cart.WeightTotal().ToString();
    and that's it...

  3. #3
    nihon is offline Senior Member
    Join Date
    May 2008
    Posts
    150

    Default

    THAT IS AMAZING JAO.
    I managed to create the label .. but can you guide me to where i have to paste the
    HTML Code:
    lblorderweight.Text = cart.WeightTotal().ToString();
    i have no idea how to create a InitializePageContent event
    THANK YOU SO MUCH JAO..

    i was looking at line 283
    CartSubTotal.Text = Localization........
    do maybe just paste under this ..
    Last edited by nihon; 11-18-2009 at 09:17 PM.
    Version (Code/DB):
    AspDotNetStorefront ML 8.1.2.0/8.1.2.0

  4. #4
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    The InitializePageContent should already be in the shoppingcart.aspx.cs. Take this example instead. On the shoppingcart.aspx, add the highlighted parts:
    Code:
                        <tr>
                            <td align="right" colspan="2" >
                                <br />
                                <asp:Button ID="btnRequestEstimates" runat="server" OnClick="btnRequestEstimates_Click" Visible="false" />
                                <asp:Panel ID="pnlShippingAndTaxEstimator" runat="server" CssClass="ShippingEstimatorPanel" Visible="false" >
                                    <aspdnsfc:ShippingAndTaxEstimateTableControl ID="ctrlEstimate" runat="server" Visible="false"  />
                                    <aspdnsfc:ShippingAndTaxEstimatorAddressControl ID="ctrlEstimateAddress" runat="server"  Visible = "false" OnRequestEstimateButtonClicked="EstimateAddressControl_RequestEstimateButtonClicked" />
                                </asp:Panel>
                                <br />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="width: 100%" valign="middle">
                                <asp:Label ID="Label1" Text="Order Weight:" Font-Bold="true" runat="server"></asp:Label>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblorderweight" runat="server"></asp:Label>
                            </td>
                        </tr>
    
    Then also add the highlighted line on the shoppingcart.aspx:
    Code:
                shoppingcartaspx15.Text = AppLogic.GetString("shoppingcart.aspx.15", SkinID, ThisCustomer.LocaleSetting);
                lblorderweight.Text = cart.WeightTotal().ToString();
    That should be it...

  5. #5
    nihon is offline Senior Member
    Join Date
    May 2008
    Posts
    150

    Thumbs up

    AND THAT IS IT .. IT WORKED PERFECTLY

    ONCE AGAIN THANK YOU..
    Version (Code/DB):
    AspDotNetStorefront ML 8.1.2.0/8.1.2.0