Since we had to import over 4000 product with variants, we had to opt for a Database direct import into Merchello. The data imports fine into all the needed tables, but for some reason the slugs all give a 404 error after an import.
When I press 'save' on an imported product in the Merchello section in Umbraco, the slug works.
What extra steps need to be taken after an import to make this work without having to press the save button?
What if you get all the products, and go through each of them and save them..
var productService = Merchello.Core.MerchelloContext.Current.Services.ProductService;
var allProducts =productService.GetAll();
allProducts.ForEach(x => productService.Save(x));
Good suggestion. But unfortunately this does not work for me.
Tried, saving all products, republishing all and rebuilding the product index. But still a 404 till I hit that save button in Umbraco.
I'll dive deeper into the Merchello source code to see what extra steps that save button does.
Finally got it working. Turned out the 'TemplateId' column in the 'merchProductVariantDetachedContent' table was empty. After filling that with the correct template id , everything works fine.
Slug results in 404 after DB import
Hi,
Since we had to import over 4000 product with variants, we had to opt for a Database direct import into Merchello. The data imports fine into all the needed tables, but for some reason the slugs all give a 404 error after an import. When I press 'save' on an imported product in the Merchello section in Umbraco, the slug works.
What extra steps need to be taken after an import to make this work without having to press the save button?
Using Merchello 2.5.0.
I had some similar issues. What worked for me, was to edit the web.config and save the file.
Hope it also works for you.
I also thought it would have something to do with caching, touching the web.config didn't help in my case. Nor did restarting the application.
I've also tried :
But none of these are helping. There must be something else I'm missing.
What if you get all the products, and go through each of them and save them..
Haven't tested this, but something like that?
And run the index after that
Good suggestion. But unfortunately this does not work for me. Tried, saving all products, republishing all and rebuilding the product index. But still a 404 till I hit that save button in Umbraco.
I'll dive deeper into the Merchello source code to see what extra steps that save button does.
Too bad! Hop you'll figure it out!
Thanks for the suggestions anyway :)
Finally got it working. Turned out the 'TemplateId' column in the 'merchProductVariantDetachedContent' table was empty. After filling that with the correct template id , everything works fine.
is working on a reply...