Where to use a script provided in SF Documentation
Hi there.
We are trying an upgrade from 5.1 to 6.1.
In the eCommerce part, we have an issue where some products don't appear.
In the documentation, there is a script I can run to enable product that might have expired, but I am not sure where to use this script. It is C# code.
Would someone have an idea? Can I just add a page with appropriate references and paste the script there, and call it from the PageLoad?
thanks,
Olivier
...actually, I have some other problems with the proposed solution.
Just so that everybody understands what I am talking about, I am trying to run the script given on this page : www.sitefinity.com/.../products-do-not-show-in-both-the-frontend-and-backend
I created a new C# form called Fix.aspx at the root of my site.
I imported the following namespaces :
using
Telerik.Sitefinity;
using
Telerik.Sitefinity.Modules.Ecommerce.Catalog;
using
Telerik.Sitefinity.Modules.Ecommerce;
using
Telerik.Sitefinity.Abstractions;
using
Telerik.Sitefinity.Ecommerce.Catalog.Model;
using
Telerik.Sitefinity.Services;
I am still having issues with the following linke of code :
01.
private
void
UpdateExistingProductsWithoutLifecycleSupport(SiteInitializer initializer)
02.
03.
if
(fromVersion.Build < PreviousReleaseBuild)
//lifecycle support already applied
04.
05.
List<Guid> inactiveProducts = CreateMasterProductsFromLiveOnes();
06.
PublishAllMasterProducts();
07.
UnpublishTheNotActiveProducts(inactiveProducts);
08.
09.
Line 03 above gives me errors on both "fromVersion" and "PreviousReleaseBuild" It does not recognized these 2.
...and there are 2 other error messages in the catch block where EcommerceLogger is not recognized in the following piece of code :
1.
catch
(Exception innerEx)
2.
3.
EcommerceLogger.LogException(innerEx);
4.
any help would be appreciated.
...I might be doing this all wrong!
...actually, I have some other problems with the proposed solution.
Just so that everybody understands what I am talking about, I am trying to run the script given on this page : www.sitefinity.com/.../products-do-not-show-in-both-the-frontend-and-backend
I created a new C# form called Fix.aspx at the root of my site.
I imported the following namespaces :
using Telerik.Sitefinity;
using Telerik.Sitefinity.Modules.Ecommerce.Catalog;
using Telerik.Sitefinity.Modules.Ecommerce;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Ecommerce.Catalog.Model;
using Telerik.Sitefinity.Services;
I am still having issues with the following linke of code :
if (fromVersion.Build < PreviousReleaseBuild) //lifecycle support already applied
It gives me errors on both "fromVersion" and "PreviousReleaseBuild" It does not recognized these 2 objects.
...and there are 2 other error messages in the catch block where EcommerceLogger is not recognized in the following piece of code :
EcommerceLogger.LogException(innerEx);
Any help would be appreciated.
Follow up on my problem.
Just in case someone is trying to do the same type of things, it looks like this is the way to run scripts found in the documentation.
You create a web form from within Visual Studio, and put the code in the CodeBehind file, and then call the main function from either an event like a button press on your form, or from the Page Load function.
In my particular case, the script provided was incomplete and had errors. They will be correcting the script on the page I provided the link for bellow.
I just encountered this update script as well...Not even sure how this was published in it's current state :/
Hello gyus,
@Oliver
It is good to know that when you have Ecommerce module there is no direct path to upgrade from 5.4 to 6.1, because there are breaking changes in the Ecommerce module. Our documentation team prepares a new upgrade procedure and they will upload it shortly. The correct upgrade path should be 5.1->5.2->5.4->6.0->6.1. Please excuse us for the inconvenience.
Regards,
Kaloyan
Telerik