bitbagcommerce / syliusshippingexportplugin Goto Github PK
View Code? Open in Web Editor NEWShipping export management architecture for Sylius based apps.
License: MIT License
Shipping export management architecture for Sylius based apps.
License: MIT License
Hi,
I encounter this error when installing the plugin on version 1.11 of sylius & php 8.1 :
Compile Error: Type of BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController::$repository must be Sylius\Component\Resource\Repository\RepositoryInterface (as in class Sylius\Bundle\ResourceBundle\Controller\ResourceController)
To solve this, either delete the $repository declaration in the controller or type $repository like this:
use Sylius\Component\Resource\Repository\RepositoryInterface;
...
/** @var ShippingExportRepositoryInterface */
protected RepositoryInterface $repository;
Hello i would like to use this plugin and i am facing errors, i was facing this error :
Compile Error: Type of BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController::$repository must be Sylius\Component\Resource\Repository\RepositoryInterface (as in class Sylius\Bundle\ResourceBundle\Controller\ResourceController)
So i followed the solution in this issue : #36
So i decided to override the Controller and add protected RepositoryInterface $repository;
instead of protected $repository;
.
Now i added this controller to my services.yaml :
bitbag.shipping_export_plugin.controller.shipping_export:
class: 'BitBag\OpenMarketplace\SyliusShippingExportPlugin\Controller\ShippingExportController'
tags:
- { name: 'controller.service_arguments' }
And i am facing this new error now :
Class "BitBag\OpenMarketplace\SyliusShippingExportPlugin\Controller\ShippingExportController" used for service "bitbag.shipping_export_plugin.controller.shipping_export" cannot be found.
The file is in src/Controller, the namespace is correct i don't really understand why it's not working and i was wondering if anyone delt with this same error or if it's maybe the fact that i'm overiding the Controller.
I am using Sylius v1.11.15, Plugin v1.7.0 and PHP 8.0.26, if i can provide any extra information i will.
I am following this article : https://bitbag.io/blog/bitbag-shipping-export-plugin-simple-way-to-control-shipments-in-your-online-store
And starting facing the errors here :
Import routing in you app/config/routing.yml:
bitbag_shipping_export_plugin:
resource: "@BitBagSyliusShippingExportPlugin/Resources/config/routing.yml"
prefix: /admin
Your bundle use a removed parameter in Symfony 5.x: kernel.root_dir
Please add a support for Sylius 1.12 version.
Shouldn't this plugin have also a migration file ?
I'm having an error on /admin/shipping-exports/ page. Some missing tables.
After a while I've executed doctrine:schema:update --dump-sql and indeed I was missing some tables:
CREATE TABLE bitbag_shipping_gateway (id INT AUTO_INCREMENT NOT NULL, code VARCHAR(255) NOT NULL, config JSON NOT NULL COMMENT '(DC2Type:json_array)', name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE UTF8_unicode_ci
ENGINE = InnoDB;
CREATE TABLE bitbag_shipping_gateway_method (shipping_gateway_id INT NOT NULL, shipping_method_id INT NOT NULL, INDEX IDX_8606B9CBEF84DE5E (shipping_gateway_id), INDEX IDX_8606B9CB5F7D6850 (shipping_method_id), PRIMARY KEY(shipping_gateway_id, shipping_method_id)) DEFAULT CHARACTER SET UTF8 COLLATE UTF8_unicode_ci
ENGINE = InnoDB;
CREATE TABLE bitbag_shipping_export (id INT AUTO_INCREMENT NOT NULL, shipment_id INT DEFAULT NULL, shipping_gateway_id INT DEFAULT NULL, exported_at DATETIME DEFAULT NULL, label_path VARCHAR(255) DEFAULT NULL, state VARCHAR(255) NOT NULL, external_id VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_20E62D9F7BE036FC (shipment_id), INDEX IDX_20E62D9FEF84DE5E (shipping_gateway_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET UTF8 COLLATE UTF8_unicode_ci
ENGINE = InnoDB;
ALTER TABLE bitbag_shipping_gateway_method ADD CONSTRAINT FK_8606B9CBEF84DE5E FOREIGN KEY (shipping_gateway_id) REFERENCES bitbag_shipping_gateway (id);
ALTER TABLE bitbag_shipping_gateway_method ADD CONSTRAINT FK_8606B9CB5F7D6850 FOREIGN KEY (shipping_method_id) REFERENCES sylius_shipping_method (id);
ALTER TABLE bitbag_shipping_export ADD CONSTRAINT FK_20E62D9F7BE036FC FOREIGN KEY (shipment_id) REFERENCES sylius_shipment (id);
ALTER TABLE bitbag_shipping_export ADD CONSTRAINT FK_20E62D9FEF84DE5E FOREIGN KEY (shipping_gateway_id) REFERENCES bitbag_shipping_gateway (id);
The plugin needs to support 7.1 PHP only with strict types and require Sylius 1.0.*+.
BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway | The field BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway#shippingExports is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity BitBag\SyliusShippingExportPlugin\Entity\ShippingExport#shippingGateway does not contain the required 'inversedBy="shippingExports"' attribute.
-- | --
Hi @bitbager,
After completing the shipping gateway configuration, the validator service is not called to validate the configuration form even if it has contraints defined.
Is it normal or should it be fixed ?
Hello,
I've found a bug while an admin user wants to sort by Shipping method
in grid bitbag_admin_shipping_export
.
In file grids/bitbag_shipping_export.yml
On line 38 there should be sotable: shipment.method
This article needs some updates:
new \BitBag\ShippingExportPlugin\ShippingExportPlugin(),
is actually now
new \BitBag\SyliusShippingExportPlugin\BitBagShippingExportPlugin(),
same for
- { resource: "@ShippingExportPlugin/Resources/config/config.yml" }
and
resource: "@ShippingExportPlugin/Resources/config/routing.yml"
Also, I think these should be included in the repo, as an installation guideline. With a potential read more on the blog.
Hi,
I created a new gateway for a specific carrier and removed the old one. The shipping export created with the old gateway has been removed.
2 solutions:
Invalidate deletion of the gateway.
Set gateway_id
to null if the gateway is removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.