Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

How to update Available languages on CatalogContent?

$
0
0

Hi guys,

trying to programatically to update the Available languages for Catalog Content in a Sched.Job.

I have added a new Market and also the language in CMS (Admin -> Manage Website languages)

The Market is es-PA = Panama.

My code
var cloneCatalogCatalogLanguages = cloneCatalog.Property.Get("CatalogLanguages");
(cloneCatalogCatalogLanguages .Value as ItemCollection<string>).Add("es-PA"); 
cloneCatalogCatalogLanguages .Property.Set("CatalogLanguages", dd );
repository.Save(cloneCatalogCatalogLanguages , SaveAction.Publish);

When i go to the Catalog ( cms/Commerce/Catalog)

the Panama language is not checked and the page is not published???
What am i doing wrong?


Viewing all articles
Browse latest Browse all 9076

Trending Articles