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.
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.
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.
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.
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.
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.
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".
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.
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)?
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?
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?
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:
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?
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' })
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"?
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
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.
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
Do I have to actually install the package on each environment (dev, staging, live), in order for the upgrade script to run?
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.
OK, fingers crossed :-)
(and site + db backed up!)
God speed! 😁
I have installed the latest TC version and the project compiles OK, but I get this when I start the site:
Any ideas?
These are the versions of TC files I now have after installing the latest version, via Umbraco.
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 🤔
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.
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.
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, anythingTeaCommerce.Umbraco.*
should all have the same version number and anythingTeaCommerce.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.
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...
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
The handling of Variants has changed, which I have fixed. However, the call to "GetStock" is failing with:
I have:
Where storeId = 1 and vtype is of type "VariantPublishedContent".
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.
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)?
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?
Ah! The site is currently on 4.5.1. Can you confirm if 4.5.2 is needed?
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 🤔
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?
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:
I have tried that, by passing the "VariantIdentifier" of the VariantPublishedContent and I get:
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
and that seems to work, in the view (Razor). However, I also need to get the Variant Stock qty from Javascript ... is that possible?
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 thisWorth a try
That does appear to be working - still testing, but so far, so good!
is working on a reply...