feat: Implement pagination and filtering for linked offers by integration

- Refactored `listLinkedOffersByIntegration` to `paginateLinkedOffersByIntegration` in `MarketplaceRepository`.
- Added pagination support with `page` and `per_page` filters.
- Introduced sorting options for offers.
- Created `listOfferChannelsByIntegration` method to retrieve distinct sales channels.
- Enhanced SQL queries to support dynamic filtering based on provided parameters.

feat: Add new fields for products and SKU generation

- Introduced new fields: `new_to_date`, `additional_message`, `additional_message_required`, and `additional_message_text` in the `products` table.
- Added `findAllSkus` method in `ProductRepository` to retrieve all SKUs.
- Created `ProductSkuGenerator` class to handle SKU generation based on a configurable format.
- Implemented `nextSku` method to generate the next available SKU.

feat: Enhance product settings management in the UI

- Added new settings page for product SKU format in `SettingsController`.
- Implemented form handling for saving SKU format settings.
- Updated the view to include SKU format configuration options.

feat: Implement cron job for refreshing ShopPro offer titles

- Created `ShopProOfferTitlesRefreshHandler` to handle the cron job for refreshing offer titles.
- Integrated with the `OfferImportService` to import offers from ShopPro.

docs: Update database schema documentation

- Added documentation for new fields in the `products` table and new cron job for offer title refresh.
- Documented the purpose and structure of the `app_settings` table.

migrations: Add necessary migrations for new features

- Created migration to add `products_sku_format` setting in `app_settings`.
- Added migration to introduce new fields in the `products` table.
- Created migration for the new cron job schedule for refreshing ShopPro offer titles.
This commit is contained in:
2026-03-01 22:05:21 +01:00
parent bcf078baac
commit d1576bc4ab
28 changed files with 1503 additions and 104 deletions

View File

@@ -36,7 +36,7 @@ return [
'fields' => [
'integration' => 'Integracja',
'linked_offers_count' => 'Powiazane oferty',
'offer_name' => 'Oferta',
'offer_name' => 'Tytul oferty marketplace',
'external_product_id' => 'External product ID',
'external_variant_id' => 'External variant ID',
'external_offer_id' => 'External offer ID',
@@ -50,9 +50,11 @@ return [
'open_offers' => 'Pokaz oferty',
'back_to_marketplace' => 'Wroc do Marketplace',
'assign_categories' => 'Przypisz kategorie',
'edit_offer' => 'Edytuj',
],
'flash' => [
'integration_not_found' => 'Nie znaleziono aktywnej integracji.',
'product_updated' => 'Produkt zostal zaktualizowany w integracji shopPRO.',
],
'category_modal' => [
'title' => 'Przypisz kategorie',
@@ -140,6 +142,7 @@ return [
'add' => 'Dodaj produkt',
'import_shoppro' => 'Import z shopPRO',
'export_shoppro' => 'Eksport do shopPRO',
'generate_next_sku' => 'Generuj kolejne SKU',
'preview' => 'Podglad',
'links' => 'Powiazania',
'edit' => 'Edytuj',
@@ -159,6 +162,10 @@ return [
'confirm' => [
'delete' => 'Czy na pewno usunac produkt #:id?',
],
'sku_generator' => [
'failed' => 'Nie udalo sie wygenerowac SKU.',
'confirm_title' => 'Blad',
],
'fields' => [
'name' => 'Nazwa',
'type' => 'Typ',
@@ -507,6 +514,23 @@ return [
'save_failed' => 'Nie udalo sie zapisac ustawien GS1.',
],
],
'products' => [
'title' => 'Produkty',
'description' => 'Ustawienia generatora SKU dla produktow.',
'fields' => [
'sku_format' => 'Format SKU',
],
'sku_format_hint' => 'Przyklad: PP000000. Ciag zer oznacza licznik inkrementowany i uzupelniany zerami.',
'actions' => [
'save' => 'Zapisz ustawienia produktow',
],
'flash' => [
'saved' => 'Ustawienia produktow zostaly zapisane.',
'save_failed' => 'Nie udalo sie zapisac ustawien produktow.',
'invalid_no_counter' => 'Format SKU musi zawierac czesc liczbowa (zera), np. PP000000.',
'invalid_too_long' => 'Format SKU jest za dlugi (maksymalnie 128 znakow).',
],
],
],
];