Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #430

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -179,7 +179,7 @@ class CategoriesTest : BaseEntityTest() {
// Searching categories with different combinations of baseUrl and cleanUrls parameters
assertCategoryUrlMatchesRegex(
categorySearchRequest = CategoriesSearchRequest(),
urlPattern = "https://.*.company.site.*/Category-.*-c.*"
urlPattern = "https://.*.company.site.*/products#!/Category-.*c.*"
)
assertCategoryUrlMatchesRegex(
categorySearchRequest = CategoriesSearchRequest(
Expand Down Expand Up @@ -601,7 +601,8 @@ private fun generateTestCategory(
seoDescriptionTranslated = LocalizedValueMap(
"ru" to "",
"en" to ""
)
),
customSlug = ""
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class ProductsTest : BaseEntityTest() {
// Searching products with different combinations of baseUrl and cleanUrls parameters
assertProductUrlMatchesRegex(
productSearchRequest = ByFilters(keyword = productCreateRequest.newProduct.sku),
urlPattern = "https://.*.company.site.*/Product-.*-p.*"
urlPattern = "https://.*.company.site.*/products#!/Product-.*p.*"
)
assertProductUrlMatchesRegex(
productSearchRequest = ByFilters(
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
Loading