Copied to clipboard

Flag this post as spam?

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


  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 15:06
    Bjarne Fyrstenborg
    0

    Cart error in one of the categories

    Hi..

    I am suddenly experiencing a cart error when I add products to the cart in category B..
    In category A there is no problem with adding products to the cart..

    http://sub.ak-security.dk/da/shop/category-b.aspx

    I have tried to delete all carts and orders in backend, but didn't seem to help..

    Bjarne

  • Anders Burla 2560 posts 8256 karma points
    Nov 17, 2011 @ 15:10
    Anders Burla
    0

    Could you try and give a little more info about the error? Is it a javascript error, server error? What does it say? Tried to look into it with firebug?

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 15:17
    Bjarne Fyrstenborg
    0

    You can perhaps try adding products to the cart on the site: http://sub.ak-security.dk/da/shop/category-b.aspx

    I'm not sure if it's a javascript error or server error.. 

    Bjarne

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 17, 2011 @ 15:26
    Rune Grønkjær
    0

    Hi Bjarne,

    It's really hard to say what's wrong. Luckily for you it works on category 1, so you can look for differences between the to groups of products. Something must be different on the ones that doesn't work.

    I can't see what exactly is wrong from the error.

    /Rune

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 15:46
    Bjarne Fyrstenborg
    0

    Okay... it's weird as it has worked yesterday and it works in category A ...

    I'm not sure if it somehow could have registred the carts and orders to the limit in that categories and not refreshed it when I have delete the carts and orders..

  • Rune Grønkjær 1372 posts 3103 karma points
    Nov 17, 2011 @ 15:49
    Rune Grønkjær
    0

    No, the order limit is not an issue here. That would throw a very readable error, this one just seems to die when trying to create a new orderline.

    Have you checked the data on the malfunctioning products? Are their properties correct and have they been filled out. It's stuff like that you need to check.

    /Rune

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 16:16
    Bjarne Fyrstenborg
    0

    Hmm..

    Perhaps because some if the price formats in backend? .. how must the prices be formatet in backend.. some places all prices use dot as separator .. other places comma..

    I tried to remove the link to Master Product on B3 and set the price to 1000,00 in DKK .. Now I'm able to add Product B3 to the cart: http://sub.ak-security.dk/da/shop/category-b.aspx

    Bjarne

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 17:08
    Bjarne Fyrstenborg
    0

    It might be a relation to the master product, which cause the error..

    Cause when I use master product on B2 with I get the cart error... but when I remove the selected master product in B2 node and sets the same price in DKK as was specified in the B2 master product, I can add the product to the cart..

    Is the something I need to check when using the master product? I probably not need the master product as I think it's more approached on multilanguage shops?

    Bjarne

  • Anders Burla 2560 posts 8256 karma points
    Nov 17, 2011 @ 17:45
    Anders Burla
    0

    Prices can be written with both . and , in the backend.

    Maybe some property is missing for the master product that the starter kit needs - try and see what html is generated when you use master product and when you dont. Should give you an idea of what is wrong

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 17, 2011 @ 18:10
    Bjarne Fyrstenborg
    0

    I can't see any difference in the html on product B2 and B3 http://sub.ak-security.dk/da/shop/category-b.aspx where B2 use master product..

    I used the doc types and a copy of the original nodes from the starter kit which previously also have worked fine..
    It's quite suddenly the error is happening.. 

  • Anders Burla 2560 posts 8256 karma points
    Nov 21, 2011 @ 08:48
    Anders Burla
    0

    Hi Bjarne

    Did you find and solve your problem? If it worked before and the suddently dont work anymore - I think that you did something wrong and not Tea Commerce doing it wrong :)

    You could try and reverse your changes until it works again - then you will know what the error is and can fix it and be sure not to make it again in the future.

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Nov 21, 2011 @ 13:13
    Bjarne Fyrstenborg
    0

    Hi Anders

    No, not yet..
    Mostly I have modified the css, and added Cloud Zoom + related products to the porduct page.
    On the product page I don't use this anymore:

    <xsl:variable name="productImageId" select="teacommerce:GetProperty($variant, 'productImage')" />
      <xsl:variable name="productImage">
        <xsl:if test="$productImageId != ''">
          <xsl:value-of select="umbraco.library:GetMedia($productImageId, 0)/umbracoFile" />
        </xsl:if>
      </xsl:variable>

    instead I use DAMP to get the selected images..

    But it seems to be a problem only when selecting master products on both product list and product page.
    Is there anything in the xslt that affect the master products?

    Furthermore I also noticed a problem in IE8 and IE9, when I have added the cart in the header: http://our.umbraco.org/forum/developers/xslt/26093-IE-moves-div-tags ... if I remove the cart macro from the template it's displayed just fine.. but IE7 displays it properly..

    Bjarne

  • Anders Burla 2560 posts 8256 karma points
    Nov 21, 2011 @ 14:03
    Anders Burla
    0

    Hi Bjarne

    This line of code selects the productImage property for the product - using the variant and that automatically tries to select using the master products. So maybe that is your error. You will have to try and boil your problem down until you know exactly what is wrong - then it will be a lot simpler to hlep you. Its kind of hard to figure out when you just say - "This isnt working - what is wrong" - get my point? :)

    <xsl:variablename="productImageId"select="teacommerce:GetProperty($variant, 'productImage')"/>

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 01, 2011 @ 03:25
    Bjarne Fyrstenborg
    0

    I have tried to replace productList_product.xslt and product_product.xslt files where I have made some changes with the original files from the starter kit... and also changes the image property datatype back to Media Picker .. it also display the products, but I still get the cart error when trying to add products, which use Master Products, to the cart..

    But in the Tea Commerce section in backend I can see that it creates a new cart although I get the error message, but not the orderline with the product.

    If I had did something wrong in the xslt, shouldn't it work with replacing the two xslt files?

    Bjarne

     

  • Anders Burla 2560 posts 8256 karma points
    Dec 03, 2011 @ 16:20
    Anders Burla
    0

    What error do you get? Its kind of hard to help if you dont describe the error :)

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 04, 2011 @ 15:24
    Bjarne Fyrstenborg
    0

    Okay, you can see the error when trying to add the product, which use master product, here to the cart: http://sub.ak-security.dk/da/shop/category-b/product-b2.aspx

     

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Dec 05, 2011 @ 08:10
    Rune Grønkjær
    0

    This usually happens when the node id or the quantity is not sent to the server.

    Use firebug to check the post data to the server (The firebug console will show you everything). Then you need to see what you have changed to make the error happen. Something must have changed so the javascript cannot find the correct data in the html DOM.

    /Rune

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 05, 2011 @ 19:55
    Bjarne Fyrstenborg
    0

    Hi Rune

    I have tried to use Firebug and Chromes similar tool to figure out what is causing the error... but immediately I can't see where the error is.. I had tried to change back to the original xslt-files and change the image picker back to use use Media Picker datatype instead of DAMP, but it didn't fix it.. so if the error was in the xslt I think it should work?

    Could some of the other scripts conflict with it, e.g. fancybox or cloud zoom?
    Does the "add to cart"-functionality use jQuery/javascript as standard? sometimes scripts have to load in the right order to work.. but on the other side it works with the the products that don't use a master product.

    Bjarne 

  • Anders Burla 2560 posts 8256 karma points
    Dec 05, 2011 @ 21:36
    Anders Burla
    0

    Hi Bjarne

    Which version of Tea Commerce do you have installed?

    If you install the latest I can try and send you the pdb files to give more debug info

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 05, 2011 @ 21:58
    Bjarne Fyrstenborg
    0

    Hi Anders

    I have installed version 1.4.1.1 of Tea Commerce, which is the one used in starterkit v. 2.0.2.0
    Until recently the latest version 1.4.1.2 have been in beta, so I wouldn't before the release version.

    But now I can just update it?

    Bjarne

  • Anders Burla 2560 posts 8256 karma points
    Dec 05, 2011 @ 22:00
    Anders Burla
    0

    Yes you can just update - then ill send you the pdb files and that should give some more info where the error happens.

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 05, 2011 @ 22:16
    Bjarne Fyrstenborg
    0

    It's now updated :)

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 06, 2011 @ 12:11
    Bjarne Fyrstenborg
    0

    Hi Anders

    I have placed the .pdb-file in my bin folder and added one of the products (which using master product) to the cart.. I get the error as before and can't see any line numbers which you told about.

    Should it shows the line numbers in the popup message?

    You could test with adding product B2 to the cart: http://sub.ak-security.dk/da/shop/category-b.aspx

    Bjarne

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 06, 2011 @ 16:41
    Bjarne Fyrstenborg
    0

    Okay, I still get the same error with no further information about the error..

    Bjarne

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 06, 2011 @ 19:22
    Bjarne Fyrstenborg
    0

    Hi Anders and Rune

    First of all thanks for all your help... I really appreciate.

    I finally solved the problem. It's wasn't anything wrong in the xslt-files and I also thought I mostly had modified the css, moved some parts of html code and changed the image picker to use DAMP instead of the Media Picker, so I'm able to add more than one image to each product if needed.

    The problem was that I had started with a copy of the Tea Commerce starterkit structure in the content section and then modified the existing site I had to fit in with Tea Commerce. I had unplished the whole Tea Commerce Startkit content nodes, so I didn't thought it would conflict with my new structure.. It was also okay as long I not was using master products.. but then I noticed the product I had problem with adding to the cart, B1 (with variants) and B2, which both used master products, the corresponding names under the Product Catalog (Master Products), where the master products also was used in B1 and B2 products under the Tea Commerce Starterkit nodes.. but I also noticed in the Starterkit nodes that in category A than more products use the same A3 as master products.. so I guess it's a problem when using the same master product on cross of content structures..

    So when I just removed the selected nodes from the master product property on B1 and B2 product in the starterkit content structure and clicked save/publish button I am now able to add the B1 and B2 products, which use master products, to the cart.. you can try it out here: http://sub.ak-security.dk/da/shop/category-b.aspx

    On the image the thick red lines are the products and the thin red lines are the variants. The dashed lines are the selected nodes in Product Catelog (Master products).. where B1 and B2 in both Tea Commerce Starterkit and AK-Security use the same selected master products in Product Catelog.

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Dec 07, 2011 @ 07:26
    Rune Grønkjær
    0

    Hi Bjarne,

    That is very interresting. I have been looking at the Tea Commerce code and it looks like there might be a problem when an unpublished node are linked to a master product. Could be a could in theory anyways. We will have to look into it, and see if we can find a bug. If there's a bug, we will fix it.

    Thanks for your thorough research on the problem.

    /Rune

  • Bjarne Fyrstenborg 1281 posts 3992 karma points MVP 8x c-trib
    Dec 07, 2011 @ 14:55
    Bjarne Fyrstenborg
    0

    Hi Rune

    Yes, it look a while to figure out where the problem was and it not was in the xslt.
    Okay, I hadn't noticed that it also works when I have the selected master products in the startkit nodes, but have all the nodes published.

    So I guess it is as you mention a problem when an unpublished node are linked to a master product.

     It was pretty frustrating I couldn't find the problem, but I'm glad I finally solved it :)

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Dec 07, 2011 @ 15:07
    Rune Grønkjær
    0

    Yeah, good work on that one. :)

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft