Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Feb 28, 2019 @ 11:15
    Gordon Saxby
    0

    Upgrade from 3.1.1 to latest

    Umbraco 7.4.2

    We are considering upgrading our current TeaCommerce version from 3.1.1 to the latest version (3.3.0).

    The first obvious question is does TC 3.3.0 work with Umbraco 7.4.2?

    Secondly, would it be best to go up one release at a time, or are there reasonable, bigger, steps we could take?

    On the Change Log - https://docs.teacommerce.net/changelog/3.x/ - does "Broken" mean "breaking change"?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 28, 2019 @ 11:28
    Matt Brailsford
    0

    Hi Gordon,

    Yes, "Broken" does mean a breaking change.

    Unless there is something explicit in the change log to suggest otherwise it should be upgradable and it should be possible to install over the top and it should upgrade itself (too many shoulds?).

    As with any upgrade though, do be sure to check the change log for anything that might affect your setup and be sure to make a complete backup just in case. Also, once you've run the upgrade, be sure to check the error log to see if any of the upgrade steps failed.

    Matt

  • Gordon Saxby 1461 posts 1883 karma points
    Feb 28, 2019 @ 11:36
    Gordon Saxby
    0

    Yes, quite a few "shoulds"!

    In terms of getting to the latest version - do you have any recommendations for the version steps I should take? 1 at a time means 10 upgrades.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Feb 28, 2019 @ 11:41
    Matt Brailsford
    0

    Hi Gordon,

    In theory you can just go straight for it as the upgrade script is meant to apply each upgrade 1 by 1. If you wanted to play it safe, I'd maybe look at what clearly look like bigger releases in the changelog and jump to each of those.

    So maybe, do a backup, try it in one go, if something explodes, roll back and take it "major-ish" release at a time.

    Hope that helps

    Matt

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 05, 2019 @ 15:27
    Gordon Saxby
    0

    Do I have to actually install the package on each environment (dev, staging, live), in order for the upgrade script to run?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 05, 2019 @ 15:31
    Matt Brailsford
    0

    In theory no as TC has it's own in built magration system which sould check a DB value to see what version it is currently at and if it's not the one in the DLL then it'll run the migrations so if local worked, it should be a case of rolling it out and it'll self update the DB.

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 05, 2019 @ 15:33
    Gordon Saxby
    0

    OK, fingers crossed :-)
    (and site + db backed up!)

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 05, 2019 @ 15:33
    Matt Brailsford
    0

    God speed! 😁

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 06, 2019 @ 14:25
    Gordon Saxby
    0

    I have installed the latest TC version and the project compiles OK, but I get this when I start the site:

    > Method not found: 'Void
    > Campaign.add_Updated(TeaCommerce.Api.Notifications.CampaignEventHandler)'.
    

    Any ideas?

    These are the versions of TC files I now have after installing the latest version, via Umbraco.

    enter image description here

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 06, 2019 @ 15:06
    Matt Brailsford
    0

    That would appear to be the Updated event handler for Campaign so it's looking like a dll might not be updated because it's not finding the method 🤔

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 06, 2019 @ 15:08
    Matt Brailsford
    0

    Yea, just checking the changelog and the Updated events were added in the very latest release https://docs.teacommerce.net/changelog/3.x/#version-3-3-0

    At a guess, your UI is updated (which now has code for Umbraco distributed cache that hooks into these events), but one of the core DLLs isn't an it's not finding it and so erroring.

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 06, 2019 @ 15:17
    Gordon Saxby
    0

    I'm surprised at the TC dll versions I still have in the bin folder, after doing an upgrade to v3.3.0. Can I get the DLLs for that version and manually copy them to the bin folder?

    The zip file I got from our.umbraco.com just has files with encoded file names.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 06, 2019 @ 15:44
    Matt Brailsford
    0

    Yea, the way it's set up is a bit awkward in that it's ultimately split into 3 parts and each part have their own version number, but those should at least be in sync in the different parts.

    Anything starting TeaCommerce.Api.* should have the same version number, anything TeaCommerce.Umbraco.* should all have the same version number and anything TeaCommerce.PaymentProviders.* should all have the same version number.

    I'll have to have a look to see if I have the DLLs locally. We have a build script to generate the Umbraco zip which renames all the files to prevent naming conflicts as everything in the zip has to sit at the same level so if they kept their original names, they could fail. Maybe we can look at tweaking this so it adds a guid as a suffix so you could at least identify the files in question.

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 06, 2019 @ 16:04
    Gordon Saxby
    0

    As you can see from my screenshot above, the files are not all the correct versions (according to your scheme).

    I'm not sure how I fix that...

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 06, 2019 @ 16:19
    Matt Brailsford
    0

    Ok, here's a link to just the DLLs of the current release

    https://www.dropbox.com/s/bl6jby7bceu92xq/Tea_Commerce_3.3.0_for_Umbraco_7_dlls.zip?dl=0

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 07, 2019 @ 15:02
    Gordon Saxby
    0

    The handling of Variants has changed, which I have fixed. However, the call to "GetStock" is failing with:

    The requested service 'TeaCommerce.Api.InformationExtractors.IProductInformationExtractor`1[[TeaCommerce.Umbraco.Configuration.Variants.Models.VariantPublishedContent, TeaCommerce.Umbraco.Configuration, Version=3.3.6977.16237, Culture=neutral, PublicKeyToken=null]]' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
    

    I have:

    var variantStock = TC.GetStock(storeId, vtype);
    

    Where storeId = 1 and vtype is of type "VariantPublishedContent".

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 08, 2019 @ 07:32
    Matt Brailsford
    0

    Hey Gordon,

    Do you have any other errors in you log files? This would suggest the product information extractor isn't being registered with Autofac for some reason which I'm not sure why that would be the case.

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 08, 2019 @ 09:59
    Gordon Saxby
    0

    The error is reported in the log, by the application's base controller.

    If I comment out the TC.GetStock call (and set variantStock to a default value), the page works OK. EDIT: actually, there are other issues which I'm looking at now!

    I assume this isn't something that I, as a developer, would need to handle (register the component)?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 08, 2019 @ 10:10
    Matt Brailsford
    0

    Hi Gordon,

    No, it should get registred within the TC.Umbraco project. What version of .NET is the site running on? I think it requires 4.5.2 where it was less previously. Wonder if that's part of it?

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 08, 2019 @ 10:12
    Gordon Saxby
    0

    Ah! The site is currently on 4.5.1. Can you confirm if 4.5.2 is needed?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 08, 2019 @ 13:23
    Matt Brailsford
    0

    Hmm, actually it should only be 4.5 according to my changelog (used to be 4.0) https://docs.teacommerce.net/changelog/3.x/#version-3-3-0

    I'm not quite sure why it's not loading then 🤔

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 08, 2019 @ 14:43
    Gordon Saxby
    0

    Oh, darn!

    The error mentions checking for dependencies - could it be that I'm missing a reference in Visual Studio, or maybe I still have the wrong version of a DLL somewhere?

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 08, 2019 @ 15:01
    Gordon Saxby
    0

    Previously, GetStock() took the storeId and a VariantPublishedContent as parameters. That gives me the error above (not registered)

    I'm not sure if it was there before the upgrade, but I see that you can now pass a product identifier instead:

    enter image description here

    I have tried that, by passing the "VariantIdentifier" of the VariantPublishedContent and I get:

    The product doesn't have a store id associated with it - remember to add the Tea Commerce store picker to your Umbraco content tree
    

    The Product node definitely does have a Store Picker, as do the parent nodes up to the site home page (that's how I inherited it, don't know if it's needed!). The Store is only selected at the site Home node.

    I tried selecting a store at the product node but it didn't help. Am I confusing it by passing a Variant Identifier rather than a Product one?

    EDIT: I changed the GetStock call to

    decimal? variantStock = TC.GetStock(storeId, productPage, vtype);
    

    and that seems to work, in the view (Razor). However, I also need to get the Variant Stock qty from Javascript ... is that possible?

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 08, 2019 @ 17:25
    Matt Brailsford
    0

    Hmm, looks like the JS API hasn't been kept quite in sync 🤦‍♂️

    https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/blob/master/Source/Lib/TeaCommerce/tea-commerce.js#L632

    Digging into things though, I THINK it might be possible. I think what you might be able to do is send a composite product identifier in the format productNodeId_variantId. The product information extractor should parse that and return the variant from it. So something like this

    var stock = TC.getStock({ storeId: 1, productIdentifier: '1071_3ebd7b71-7b05-478b-9bab-01d9e8cccf7b' })
    

    Worth a try

  • Gordon Saxby 1461 posts 1883 karma points
    Mar 11, 2019 @ 14:20
    Gordon Saxby
    0

    That does appear to be working - still testing, but so far, so good!

Please Sign in or register to post replies

Write your reply to:

Draft