Skip to content

Commit

Permalink
ECWID-147482: Custom URL slugs for catalog pages: Product and categor…
Browse files Browse the repository at this point in the history
…ies export/import in CSV: Custom slugs for categories is not filled after import: set up missing 'customSlug' property
  • Loading branch information
carlecwid committed Aug 26, 2024
1 parent 6651408 commit 907e565
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ fun FetchedCategory.toUpdated(): UpdatedCategory {
seoDescription = seoDescription,
seoDescriptionTranslated = seoDescriptionTranslated,
alt = alt?.toUpdated(),
customSlug = customSlug,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ data class UpdatedCategory(
val seoTitleTranslated: LocalizedValueMap? = null,
val seoDescription: String? = null,
val seoDescriptionTranslated: LocalizedValueMap? = null,
val alt: UpdatedAlt? = null
val alt: UpdatedAlt? = null,
val customSlug: String? = null,
) : ApiUpdatedDTO {

override fun getModifyKind() = ModifyKind.ReadWrite(FetchedCategory::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ data class FetchedCategory(
val originalImageUrl: String? = null,
val originalImage: PictureInfo? = null,
val url: String? = null,
val customSlug: String? = null,
val productCount: Int? = null,
val productCountWithoutSubcategories: Int? = null,
val enabledProductCount: Int? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ private fun generateTestCategory(
"en" to ""
),
seoDescription = "",
customSlug = "",
seoDescriptionTranslated = LocalizedValueMap(
"ru" to "",
"en" to ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ val fetchedCategoryNullablePropertyRules: List<NullablePropertyRule<*, *>> = lis
AllowNullable(FetchedCategory::seoTitle),
AllowNullable(FetchedCategory::seoTitleTranslated),
AllowNullable(FetchedCategory::seoDescription),
AllowNullable(FetchedCategory::customSlug),
AllowNullable(FetchedCategory::seoDescriptionTranslated),
AllowNullable(FetchedCategory::alt),
AllowNullable(FetchedAlt::main),
Expand Down

0 comments on commit 907e565

Please sign in to comment.