Simple QuickShopping management for Sylius Shops. Add multiple products to your cart using a single page!
- Add multiple variants to your shopping cart by name or code
-
Run
composer require asdoria/sylius-quick-shopping-plugin
-
Add the bundle in
config/bundles.php
.
Asdoria\SyliusQuickShoppingPlugin\AsdoriaSyliusQuickShoppingPlugin::class => ['all' => true],
- Import routes in
config/routes.yaml
asdoria_quick_shopping:
resource: "@AsdoriaSyliusQuickShoppingPlugin/config/routing.yaml"
- Import config in
config/packages/_sylius.yaml
imports:
- { resource: "@AsdoriaSyliusQuickShoppingPlugin/config/config.yaml"}
- Paste the following content to the
src/Repository/ProductVariantRepository.php
:
<?php
declare(strict_types=1);
namespace App\Repository;
use Asdoria\SyliusQuickShoppingPlugin\Repository\Model\ProductVariantRepositoryAwareInterface;
use Asdoria\SyliusQuickShoppingPlugin\Repository\ProductVariantRepositoryTrait;
use Sylius\Bundle\CoreBundle\Doctrine\ORM\ProductVariantRepository as BaseProductVariantRepository;
final class ProductVariantRepository extends BaseProductVariantRepository implements ProductVariantRepositoryAwareInterface
{
use ProductVariantRepositoryTrait;
}
- Configure repositories in
config/packages/_sylius.yaml
:
sylius_product:
resources:
product_variant:
classes:
model: App\Entity\Product\ProductVariant
+ repository: App\Repository\ProductVariantRepository
You can try the QuickShopping plugin online by following this link: here.
Note that we have developed several other open source plugins for Sylius, whose demos and documentation are listed on the following page.
In the shop office, go to /en_US/quick-shopping (asdoria_shop_quick_shopping_index
route).
Wish to contribute? Please do! We are always looking for improving this plugin. To do so, feel free to raise PR or issues on this repo.
This plugin is part of Asdoria work on Open Source, feel free to look on our current as well as future work on our website.
Have a nice day :)