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.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 14, 2012 @ 11:37
    Dan Diplo
    0

    Cart Totals Not Adding Up in Razor Demo Store

    I'm trilaing latest uCommerce 3.0.0.12306 with latest build of Razor store (downloaded yesterday) in Umbraco 4.10. I realise the razor store is still in beta, but the prices displayed at the checkout don't make any sense to me. A screenshot illustrates an example cart I have:

    As you can see none of it really adds up.

    227.70 + 74.75 should surely come to a sub-total of 302.45 ?  Where has the figure of 163 come from? What is the 100 discount? And how does it arrive at a total of 187.45?

    As I say, I realise the Razor store is beta, so it could just be down to that.

    A secondary problem I'm seeing with the cart is when I try and create multiple stores. I've tried creating two new stores selling fruit (!) - one in Spanish with Euro currency and one in UK English with GBP.

    Each store is mapped to a host-header (with language) in Umbraco.

    fruit.ucommerce.preview.com - English (UK)

    fruit.es.ucommerce.preview.com - Spanish (Spain)

    Host headers in IIS have been set.

    When browsing the stores (via the host header) everything works great - if I browse "fruit.ucommerce.preview.com" I see products in UK English and GBP and if I browse "fruit.es.ucommerce.preview.com" I see products in Spanish and Euro. Fantastic!

    The problem arises again with the basket. Each basket for each store is independent (as it should be) and has a unique ID and cookie. So I can put products in either basket and that works fine. However, the cart display always shows the total as zero for both stores. See below:

    English Fruit

    Spanish Fruit

     

    Also, the spanish store cart shows the product names in English (even though it is called "Fresa" in Spanish).

    I've tried deleting cookies, reinstalling the store etc. but always the same results - the total is always zero (and the £100 discount always appears, too).

    I'm hoping this feedback helps you in some way - please ask if you need any more details.

  • Tim 174 posts 378 karma points
    Nov 14, 2012 @ 13:07
    Tim
    0

    Hi Dan,

    Thanks for raising these, I've been looking into them this morning to establish what's going on.

    Order Total Oddities

    The Sub total should be displaying €263 (€99x2 + €65) but it would appear that it's also including order level discounts (the €100). We'll get that sorted as it should just be a tally of order item values (and order item discounts if applicable).

    The €187.45 total is the value of the items plus tax.

    Cart Totals Showing 0

    That's an interesting one I'm looking into at the moment.

    Cart names wrong

    Thanks for spotting that one, the name is set as part of the AddToBasket call, I'll chat to Soren about making that localised. As an interim fix you could change Line 72 of /macroscripts/ucommerce/cart.cshtml from:

    <td><a href="@CatalogLibrary.GetNiceUrlForProduct(product)">@lineItem.ProductName</a></td>

    to:

    <td><a href="@CatalogLibrary.GetNiceUrlForProduct(product)">@product.GetDescription(SiteContext.Current.CurrentCulture.Name).DisplayName</a></td>

     

    Let me know if that sorts it.

    Tim

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 14, 2012 @ 14:42
    Dan Diplo
    0

    Hi Tim,

    Thanks for the quick response. I think I understand the problem with the sub-total, now. It's basically the sub-total minus VAT minus discount. I guess I wasn't aware of discounts being applied in the demo store, so will look into how they are being added.

    The carts showing zero is a mystery - all I can say is that it appears when there are multiple stores with different languages (in my install). If you need any debug info, let me know.

    Regarding the localisation of product names in the basket then I basically came to same conclusion as you and used:

    <a href="@CatalogLibrary.GetNiceUrlForProduct(product)">@product.DisplayName()</a>

    Just needed to add @using UCommerce.Extensions to the script to allow me to access the extension method.

    Thanks for your time and help - much appreciated!

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 14, 2012 @ 14:59
    Dan Diplo
    0

    Just a quick update - I removed the discounts being applied in the marketing section and this sorted the price in the other stores. It seems like it was always applying a 100 discount. So I guess if an order was worth less than 100 then it was making the total zero (as you wouldn't have a negative total!). I think that is what is happening, anyway!

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 19, 2012 @ 11:18
    Søren Spelling Lund
    0

    Hi Dan,

    The issue with order-level discounts is fixed in uCommerce 3.0.0.12320.

    Sorry for the inconvenience.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 19, 2012 @ 11:27
    Dan Diplo
    0

    Thanks for the quick update - will try it now.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Nov 19, 2012 @ 12:06
    Dan Diplo
    0

    Hi Soren. I've installed the update - by installing the new 3.0.0.12320 package in the Umbraco back-end. All installed OK.

    However, I am using the Razor demo store and found I was getting 404's on the "virtual" URLs being generated by uCommerce. Eventually tracked it down to the UrlRewriting.config - luckily the updater had kept a back-up of the old config and restoring that worked and all is well again.

    Just FYI the new config looked like this:

        <add name="DefaultCategoryProductRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/shop/product.aspx?catalog=$2&amp;category=$3&amp;product=$4" ignoreCase="true" xmlns="" />
        <add name="DefaultProductRewrite" virtualUrl="(.*)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/shop/product.aspx?catalog=$2&amp;product=$3" ignoreCase="true" xmlns="" />
        <add name="DefaultCategoryRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/shop/catalog.aspx?catalog=$2&amp;category=$3" ignoreCase="true" xmlns="" />
        <add name="DefaultCatalogRewrite" virtualUrl="(.*)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/shop/catalog.aspx?catalog=$2" ignoreCase="true" xmlns="" />

    Where as the old config (which worked with the demo store) was like this:

    <add name="DefaultCategoryProductRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&amp;category=$3&amp;product=$4" ignoreCase="true" xmlns="" />
          <add name="DefaultProductRewrite" virtualUrl="(.*)/c-([0-9]+)/p-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog/product.aspx?catalog=$2&amp;product=$3" ignoreCase="true" xmlns="" />
          <add name="DefaultCategoryRewrite" virtualUrl="(.*)/c-([0-9]+)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2&amp;category=$3" ignoreCase="true" xmlns="" />
          <add name="DefaultCatalogRewrite" virtualUrl="(.*)/c-([0-9]+)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/catalog.aspx?catalog=$2" ignoreCase="true" xmlns="" />

     

    Thanks, Dan.

     

  • Tim 174 posts 378 karma points
    Nov 19, 2012 @ 12:28
    Tim
    0

    Yes, irritatingly at the moment the uCommerce rules in the default package will override the razor store's, we should have mentioned that (although you could have just dropped the dlls in and that should have been enough)

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 23, 2012 @ 14:52
    Søren Spelling Lund
    0

    You can move the store rewrite rules from the .backup file to Urlrewriting.config and you'll be good to go.

Please Sign in or register to post replies

Write your reply to:

Draft