Copied to clipboard

Flag this post as spam?

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


  • Geoff 19 posts 134 karma points
    Feb 05, 2015 @ 09:59
    Geoff
    0

    TeaCommerce 3 GetFinalizedOrdersForCustomer returns 0 orders

    I'm trying to show orders for a customer using Tea Commerce 3 on Umbraco 7.1 

    The following code (called with the correct store ID and customer ID returns zero orders

    IEnumerable<Order> orders = TC.GetFinalizedOrdersForCustomer(storeId, member.Id.ToString());

    The back end shows orders and the database has finalized orders in TeaCommerce_Order. I've tried deleting the XML file in App_Data/tea-commerce also.

    Any ideas?

    Thanks

    Geoff

  • Anders Burla 2560 posts 8256 karma points
    Feb 05, 2015 @ 10:46
    Anders Burla
    0

    Hi Geoff

    Tea Commerce 3 doesn't use the XML cache anymore as it has been removed. Could you check the orders in the DB and see if anyone has the customer id you are asking about?

    Kind regards
    Anders

  • Geoff 19 posts 134 karma points
    Feb 06, 2015 @ 00:53
    Geoff
    0

    Hi Anders,

    I've tried to hard code my store ID and a user ID but with the same results - the orders collection has 0 items. Here is a database shot and the code in context

    Thanks, Geoff

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage

     

    @using TeaCommerce.Umbraco.Web;

    @using TeaCommerce.Api.Models;

    @using Umbraco.Web.Models;

    @using Umbraco.Core.Models;

    @using Umbraco.Core;

    @using Umbraco.Core.Services;

     

    @{

        Layout ="MegaMusic.cshtml";

    }

     

    @section Content{

        @{

            long storeId = Convert.ToInt64(Model.Content.GetPropertyValue("store", true));

     

            var loginModel = new LoginModel();

     

            var memberId = Members.GetCurrentMemberId();

            var memberModel = Members.GetCurrentMemberProfileModel();

            var member = ApplicationContext.Current.Services.MemberService.GetByEmail(memberModel.Email);

            IEnumerable<Order> orders = TC.GetFinalizedOrdersForCustomer(1, "20369"); //(storeId, member.Id.ToString());

        }

        <divclass="grid-100 mobile-full-width">

            <divclass="content-block default-bg">

                <h1>Orders For @member.Properties["firstName"].Value</h1>

                @foreach (var order in orders)

                {

                    <p>@order.DateCreated.ToString("dd/MM/yyyy") @order.TotalPrice.ToString()</p>

                }

            </div>

        </div>

       }

  • Kasper 12 posts 95 karma points
    Feb 06, 2015 @ 10:16
    Kasper
    0

    Hello

    I have exactly the same problem.

    The username is displayed, but "orders" is empty.

    Kasper

  • Anders Burla 2560 posts 8256 karma points
    Feb 06, 2015 @ 10:43
    Anders Burla
    0

    I see that there is a bug. Could you report it at GitHub - thanks. https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco

    Kind regards
    Anders

  • Geoff 19 posts 134 karma points
    Feb 06, 2015 @ 11:13
    Geoff
    0

    I've posted this as an issue on GitHub.

    Kind regards

    Geoff

  • Anders Burla 2560 posts 8256 karma points
    Feb 06, 2015 @ 11:57
    Anders Burla
    0

    It will be fixed in 3.0.1

  • Jonas Eriksson 930 posts 1825 karma points
    Feb 20, 2015 @ 06:50
    Jonas Eriksson
    0

    It works for me after installed 3.0.1,

    thanks!

  • Geoff 19 posts 134 karma points
    Feb 24, 2015 @ 06:10
    Geoff
    100

    This works for me now also in version 3.0.1

    Thanks,

    Geoff

Please Sign in or register to post replies

Write your reply to:

Draft