Skip to content

Commit f1e707e

Browse files
committed
ECWID-147482: Custom URL slugs for catalog pages: Product and categories export/import in CSV: Custom slugs for categories is not filled after import: set up missing 'customSlug' property
1 parent 6651408 commit f1e707e

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedCategory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ fun FetchedCategory.toUpdated(): UpdatedCategory {
1919
seoDescription = seoDescription,
2020
seoDescriptionTranslated = seoDescriptionTranslated,
2121
alt = alt?.toUpdated(),
22+
customSlug = customSlug,
2223
)
2324
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/category/request/UpdatedCategory.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ data class UpdatedCategory(
2020
val seoTitleTranslated: LocalizedValueMap? = null,
2121
val seoDescription: String? = null,
2222
val seoDescriptionTranslated: LocalizedValueMap? = null,
23-
val alt: UpdatedAlt? = null
23+
val alt: UpdatedAlt? = null,
24+
val customSlug: String? = null,
2425
) : ApiUpdatedDTO {
2526

2627
override fun getModifyKind() = ModifyKind.ReadWrite(FetchedCategory::class)

src/main/kotlin/com/ecwid/apiclient/v3/dto/category/result/FetchedCategory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ data class FetchedCategory(
2626
val originalImageUrl: String? = null,
2727
val originalImage: PictureInfo? = null,
2828
val url: String? = null,
29+
val customSlug: String? = null,
2930
val productCount: Int? = null,
3031
val productCountWithoutSubcategories: Int? = null,
3132
val enabledProductCount: Int? = null,

src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedCategoryRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ val fetchedCategoryNullablePropertyRules: List<NullablePropertyRule<*, *>> = lis
2626
AllowNullable(FetchedCategory::seoTitle),
2727
AllowNullable(FetchedCategory::seoTitleTranslated),
2828
AllowNullable(FetchedCategory::seoDescription),
29+
AllowNullable(FetchedCategory::customSlug),
2930
AllowNullable(FetchedCategory::seoDescriptionTranslated),
3031
AllowNullable(FetchedCategory::alt),
3132
AllowNullable(FetchedAlt::main),

0 commit comments

Comments
 (0)