-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from delyriand/feature/multiple-shipping-slot-…
…by-method Multiple shipping slot by method
- Loading branch information
Showing
36 changed files
with
649 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# UPGRADE FROM 1.0.0 TO 1.1.0 | ||
|
||
- Add `form` in the events in the override template of the `/templates/bundles/SyliusShopBundle/Checkout/SelectShipping/_choice.html.twig`: | ||
|
||
```diff | ||
-{{ sylius_template_event('sylius.shop.checkout.select_shipping.before_method', {'method': method}) }} | ||
+{{ sylius_template_event('sylius.shop.checkout.select_shipping.before_method', {'method': method, 'form': form}) }} | ||
``` | ||
|
||
```diff | ||
-{{ sylius_template_event('sylius.shop.checkout.select_shipping.after_method', {'method': method}) }} | ||
+{{ sylius_template_event('sylius.shop.checkout.select_shipping.after_method', {'method': method, 'form': form}) }} | ||
``` | ||
|
||
- The `shippingSlotConfig` class parameter in the `MonsieurBiz\SyliusShippingSlotPlugin\Entity\ShippingMethodTrait` trait is deprecated and will be removed in the next version. Use the `shippingSlotConfigs` class parameter instead to manage multiple shipping slot configs by shipping method. | ||
- The methods `getShippingSlotConfig` and `setShippingSlotConfig` in `MonsieurBiz\SyliusShippingSlotPlugin\Entity\ShippingMethodInterface` interface are deprecated and will be removed in the next version. Use the methods `getShippingSlotConfigs` and `setShippingSlotConfigs` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Monsieur Biz' Shipping Slot plugin for Sylius. | ||
* | ||
* (c) Monsieur Biz <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE.txt | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20240314135057 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('CREATE TABLE monsieurbiz_shipping_slot_shipping_method (shipping_method_id INT NOT NULL, shipping_slot_config_id INT NOT NULL, INDEX IDX_57D36B055F7D6850 (shipping_method_id), INDEX IDX_57D36B053890C4F5 (shipping_slot_config_id), PRIMARY KEY(shipping_method_id, shipping_slot_config_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); | ||
$this->addSql('ALTER TABLE monsieurbiz_shipping_slot_shipping_method ADD CONSTRAINT FK_57D36B055F7D6850 FOREIGN KEY (shipping_method_id) REFERENCES sylius_shipping_method (id) ON DELETE CASCADE'); | ||
$this->addSql('ALTER TABLE monsieurbiz_shipping_slot_shipping_method ADD CONSTRAINT FK_57D36B053890C4F5 FOREIGN KEY (shipping_slot_config_id) REFERENCES monsieurbiz_shipping_slot_config (id) ON DELETE CASCADE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('ALTER TABLE monsieurbiz_shipping_slot_shipping_method DROP FOREIGN KEY FK_57D36B055F7D6850'); | ||
$this->addSql('ALTER TABLE monsieurbiz_shipping_slot_shipping_method DROP FOREIGN KEY FK_57D36B053890C4F5'); | ||
$this->addSql('DROP TABLE monsieurbiz_shipping_slot_shipping_method'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.