Closed WillyReyno closed 3 years ago
Hello,
do you have this configuration in your config/bundles.php
?
return [
...
FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true],
BitBag\SyliusVueStorefrontPlugin\SyliusVueStorefrontPlugin::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle::class => ['all' => true],
// Optional, for handling CORS (Cross-Origin Resource Sharing) requests
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
];
I do, here's my config/bundles.php
:
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true],
Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true],
Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true],
Sylius\Bundle\LocaleBundle\SyliusLocaleBundle::class => ['all' => true],
Sylius\Bundle\ProductBundle\SyliusProductBundle::class => ['all' => true],
Sylius\Bundle\ChannelBundle\SyliusChannelBundle::class => ['all' => true],
Sylius\Bundle\AttributeBundle\SyliusAttributeBundle::class => ['all' => true],
Sylius\Bundle\TaxationBundle\SyliusTaxationBundle::class => ['all' => true],
Sylius\Bundle\ShippingBundle\SyliusShippingBundle::class => ['all' => true],
Sylius\Bundle\PaymentBundle\SyliusPaymentBundle::class => ['all' => true],
Sylius\Bundle\MailerBundle\SyliusMailerBundle::class => ['all' => true],
Sylius\Bundle\PromotionBundle\SyliusPromotionBundle::class => ['all' => true],
Sylius\Bundle\AddressingBundle\SyliusAddressingBundle::class => ['all' => true],
Sylius\Bundle\InventoryBundle\SyliusInventoryBundle::class => ['all' => true],
Sylius\Bundle\TaxonomyBundle\SyliusTaxonomyBundle::class => ['all' => true],
Sylius\Bundle\UserBundle\SyliusUserBundle::class => ['all' => true],
Sylius\Bundle\CustomerBundle\SyliusCustomerBundle::class => ['all' => true],
Sylius\Bundle\UiBundle\SyliusUiBundle::class => ['all' => true],
Sylius\Bundle\ReviewBundle\SyliusReviewBundle::class => ['all' => true],
Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Payum\Bundle\PayumBundle\PayumBundle::class => ['all' => true],
Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true],
WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true],
Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true],
Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true],
Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true],
Sonata\Doctrine\Bridge\Symfony\Bundle\SonataDoctrineBundle::class => ['all' => true],
FOS\ElasticaBundle\FOSElasticaBundle::class => ['all' => true],
BitBag\SyliusVueStorefrontPlugin\SyliusVueStorefrontPlugin::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Gesdinet\JWTRefreshTokenBundle\GesdinetJWTRefreshTokenBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
];
Please add fos_elastica.yaml with the following content:
imports:
- { resource: "@SyliusVueStorefrontPlugin/Resources/config/indexes/attribute.yaml" }
- { resource: "@SyliusVueStorefrontPlugin/Resources/config/indexes/category.yaml" }
- { resource: "@SyliusVueStorefrontPlugin/Resources/config/indexes/product.yaml" }
fos_elastica:
clients:
default: { host: '%env(ELASTICSEARCH_HOST)%', port: '%env(ELASTICSEARCH_PORT)%' }
and clear the cache. If your problems will still occur try to run composer update
to update your dependencies.
Readme has to be updated though and it will be today.
I'm also getting the following error when running php bin/console doctrine:schema:update --force
or php bin/console sylius:fixtures:load
Class 'BitBag\SyliusVueStorefrontPlugin\Entity\Order\OrderItem' does not exist
Is this also something missing from the readme?
Do you have more info about it? Can you search for this in your project?
This file can be found at 'BitBag\SyliusVueStorefrontPlugin\ Sylius \Entity\Order\OrderItem' so there is a mismatch somewhere
Couldn't find it in any file, except of course in the dev.log. Maybe the stacktrace can help :
[2020-10-09 15:35:34] console.ERROR: Error thrown while running command "sylius:fixtures:load". Message: "Class 'BitBag\SyliusVueStorefrontPlugin\Entity\Order\OrderItem' does not exist" {"exception":"[object] (Doctrine\\Persistence\\Mapping\\MappingException(code: 0): Class 'BitBag\\SyliusVueStorefrontPlugin\\Entity\\Order\\OrderItem' does not exist at /var/www/html/vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/MappingException.php:94)","command":"sylius:fixtures:load","message":"Class 'BitBag\\SyliusVueStorefrontPlugin\\Entity\\Order\\OrderItem' does not exist"} []
I updated the README just now. I'm not sure if you're working with a new project or do you have you own already customized Sylius.
In case it's a new one I would suggest to:
Install Sylius 1.6 (the one supported for now) with a command:
composer create-project sylius/sylius-standard:1.6 YourProjectName
Run composer update
inside this folder
Follow the steps described in the updated README. I was able to successfully install the plugin just by following the instructions specified there.
Sylius 1.7 or 1.8 support was not checked by me yet and it has to wait a while.
It worked thanks! The only issue I had was that I needed to do some settings listed in the readme before launching composer require
, else Symfony's cache:clear
auto-script would end up failing and reverting composer.json
By the way,I plan on using multiple channels which will all have the same VueStoreFront theme.
I saw that there was a APP_CHANNEL_CODE in the .env
does it mean that it's not possible to use this plugin with multiple channels?
Multichannelling is not implemented yet. We plan to prepare this functionality but I can't make any promises when it will be possible from our end.
If you will implement it yourself, a PR would be really appreciated :+1:
I'm closing this one as it's resolved.
composer recipes:update <package/package>
worked for me
Hello,
I've been trying to setup this plugin in my project but I'm getting the following error when I run
php bin/console fos:elastica:populate
.I guess I'm missing a
config/packages/fos_elastica.yaml
but I don't see it mentionned anywhere in the install documentation. Did I miss a step?Thanks for your help,