Copied to clipboard

Flag this post as spam?

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


  • Mads Sørensen 188 posts 433 karma points
    May 01, 2018 @ 07:01
    Mads Sørensen
    0

    Getting price shows 0$

    Hi

    Playing around with tea commerce and the test boat-site :)

    I'm struggeling a bit trying to understand how priceing and currencies works.

    Umbraco setup: enter image description here

    enter image description here

    enter image description here

    enter image description here

    Code:

    @using TeaCommerce.Umbraco.Configuration.Variants.Models
    @using TeaCommerce.Umbraco.Web
    @using Umbraco.Core.Models
    @using Umbraco.Web
    @using System.Linq;
    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    
    @{
    
        long storeId = long.Parse( productPage.GetPropertyValue<string>( "store", true ) );
    
        <p>@TC.GetPrice(storeId, Model.Content.Id.ToString()).WithVatFormatted</p>
    
    }
    

    But after i deleted the priceJMD from the test setup I can't get my new DKK price to show?

    Any sugestions?

  • Brian Lyk Larsen 19 posts 274 karma points
    May 01, 2018 @ 12:44
    Brian Lyk Larsen
    100

    Hi Mads,

    TC.GetPrice() will try to return a price with the same currency as your current order. Your active order might still have the old JMD currency :)

    You can remove your order by clearing the Tea Commerce cookie or by calling TC.removeCurrentOrder() in the browsers JavaScript console.

  • Mads Sørensen 188 posts 433 karma points
    May 01, 2018 @ 13:03
    Mads Sørensen
    0

    Dooh!!! I Feel a kind of stupid now :D

    Thanks Brian :D

Please Sign in or register to post replies

Write your reply to:

Draft