Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Four Tochki Products

Four Tochki Products Laravel Package

baks-dev/four-tochki-products

Laravel/PHP 8.4+ модуль интеграции с 4tochki: импорт и синхронизация каталога продукции, работа со складами партнёра (идентификаторы через b2b.4tochki.ru). Установка через Composer, assets:install, миграции Doctrine; есть PHPUnit-тесты.

View on GitHub
Deep Wiki
Context7

composer require baks-dev/four-tochki-products

Frequently asked questions about Four Tochki Products
Does this package support Laravel 8.4+ only, or will it work with older versions?
This package explicitly requires PHP 8.4+ and is designed for Laravel 8.4+ compatibility. While it may technically work on older versions, Symfony components (like Doctrine ORM) may introduce dependency conflicts or unsupported features. Always test thoroughly if considering a downgrade.
How do I handle database conflicts between Laravel’s Eloquent and Doctrine migrations?
The package uses Doctrine migrations, which may overlap with Laravel’s existing schema (e.g., `products` or `warehouses` tables). Run migrations in a staging environment first, then reconcile schemas manually or use tools like `php artisan schema:update` to merge changes. Consider using a separate schema for 4tochki data if conflicts persist.
Can I use this package without Symfony components, or is it mandatory?
The package relies on Symfony components (e.g., `symfony/console`, `doctrine/orm`), which may introduce complexity if your team is Laravel-only. You can mitigate this by containerizing the bundle in Docker or incrementally porting Doctrine logic to Eloquent. Replace Symfony console commands with Artisan commands if needed.
What’s the minimal setup required to sync products from 4tochki?
Start with `composer require baks-dev/four-tochki-products`, then run `php bin/console baks:assets:install` for configuration. Use `doctrine:migrations:diff` and `doctrine:migrations:migrate` to set up the database schema. No additional steps are needed for basic product sync, but ensure your Laravel app has API credentials for 4tochki.
How do I expose 4tochki product data to my Laravel frontend or API?
The package doesn’t include UI components, so you’ll need to create a Laravel controller (e.g., `ProductController`) to fetch data via the bundle’s services or repositories. Use facades to wrap Doctrine entities in Eloquent-like models, or expose raw data through API endpoints. Example: `return Product::all()` after mapping Doctrine results.
Are there any known issues with warehouse synchronization or B2B API limits?
Warehouse sync relies on identifiers from `b2b.4tochki.ru/Account/AvailableWarehouses`. Ensure your partner account has active warehouse permissions. The package handles basic sync, but high-volume updates may hit API rate limits—implement caching (e.g., Redis) for frequent requests or batch processing for large catalogs.
Can I extend or override the package’s behavior, like custom tax rules?
Yes, the package’s modular design allows overrides. For example, extend the `Product` entity or create custom event listeners to modify tax calculations or warehouse logic. Use Laravel’s service providers to bind your extensions to the package’s container. Check for documented hooks or events in the source code.
How do I test this package in a production-like environment?
Run PHPUnit tests with `php bin/phpunit --group=four-tochki-products` to validate core functionality. For production testing, mock the 4tochki API using tools like VCR or create a sandbox account. Test migrations in staging first, and use Laravel’s `fresh` or `migrate:fresh` to avoid conflicts with existing data.
What alternatives exist for 4tochki integration in Laravel if this package isn’t a fit?
For lightweight needs, consider building a custom API client using Guzzle or Laravel’s HTTP client to interact with 4tochki’s endpoints directly. For broader marketplace support, explore packages like `spatie/laravel-marketplace` (if adapted) or generic ERP connectors. However, none offer the same 4tochki-specific compliance out of the box as this package.
How often is this package updated, and is it actively maintained?
The package is maintained by BaksDev, with recent updates visible in the [release history](https://github.com/baks-dev/four-tochki-products/releases). Check the GitHub repository for open issues or pull requests to gauge activity. For critical projects, consider forking the repo to customize or backport fixes if maintenance slows.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky