sylius

How to use sylius admin crud templates with sylius resource models

假装没事ソ 提交于 2019-12-13 07:48:27
问题 I'm using Sylius 1.0.0-dev and created model called Trainee <?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use SyliusExtensionBundle\Entity\Product; use SyliusExtensionBundle\Entity\Order; use Sylius\Component\Resource\Model\ResourceInterface; /** * Trainee * * @ORM\Table(name="smartbyte_trainee") * @ORM\Entity() */ class Trainee implements ResourceInterface { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */

How to add CSS files on a Sylius theme?

ε祈祈猫儿з 提交于 2019-12-12 12:03:11
问题 I've a custom theme under app/theme/AcmeTheme. I have the theme working and I can define my own templates under views or override template for other Bundles. The problem is that I can not figure out how to add a custom CSS file inside my theme. So fat I've tried: AcmeTheme/public/style.css AcmeTheme/web/style.css But after running assets:install and sylius:theme:assets:install the file is not copied. I have read the documentation multiple times and I can still not get it to work. 回答1: Place

Error installing Sylius: “PHP Fatal error: require(): Failed opening required autoload.php”

最后都变了- 提交于 2019-12-12 04:07:05
问题 I tried to install Sylius (Symfony) with the command "(php bin/console sylius:install") , but it gives the below error: PHP Warning: require(C:\xampp\htdocs\acme\bin/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\acme\bin\console on line 16 Warning: require(C:\xampp\htdocs\acme\bin/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\acme\bin\console on line 16 PHP Fatal error: require(): Failed opening

PHP: session | Failed to decode session object

不想你离开。 提交于 2019-12-11 11:23:27
问题 I try to add e-commerce features into a legacy project, so I still need my old session-handler. I use PHP v7.1.14 and Session2DB (https://github.com/voku/session2db/tree/4.0.0) in this project. Now I have a strange problem with this "Legacy Project" + Symfony 3.4.4 + Sylius 1.1.0 and the session handling. Symfony session config: session: storage_id: session.storage.php_bridge handler_id: ~ Info: https://symfony.com/doc/3.4/session/php_bridge.html Error: if I try to login into the admin view

How to create a new model with Sylius via SyliusResourceBundle

烂漫一生 提交于 2019-12-10 17:37:14
问题 I found and successfully used documentation on how to override an existing model in Sylius, but I haven't been able to create a completely new one making use of the SyliusResourceBundle. Im guessing it's easy if you already know Symfony2? Im still learning, so here is what I have... what am I missing? Im using a working full Sylius install as my base, so I started here http://sylius.org/blog/simpler-crud-for-symfony2 I've got my own "Astound Bundle" setup and several overrides and controllers

Install Fixtures in Sylius - Symfony2

a 夏天 提交于 2019-12-10 17:14:05
问题 After having successfully installed and updated all vendors in my project folder for Sylius i tried running this code : app/console sylius:install --fixtures I get this error : PHP Fatal error: Class 'ResourceBundle' not found in C:\wamp\www\sylius\vendor\ symfony\symfony\src\Symfony\Component\Locale\Locale.php on line 51 Then i tried all possible solutions given here Installed intl extension in php (working successfully).Then ran this command php build-data.php 'your ICU version' On running

Sylius+FOS+PUGX Multi User: Overriding User Model

筅森魡賤 提交于 2019-12-08 09:41:44
问题 Sylius with FOS and PUGX MultiUser Bundle that allows registering of 3 different users via 3 different forms, with 3 different roles, etc. Since Sylius User is defined as: ->Sylius\Component\Core\Model\User.php namespace Sylius\Component\Core\Model; use FOS\UserBundle\Model\User as BaseUser; use Sylius\Component\Addressing\Model\AddressInterface; class User extends BaseUser implements UserInterface{ ... } Since userOne and userTwo are supposed to extend an abstract class, as per PUGX

Making a A2lix translation field required in the front end in a Symfony form

守給你的承諾、 提交于 2019-12-07 19:07:17
问题 Is there a way to make a A2lix translation field required and validated through the front-end in a Symfony form? I have tried adding a property of presentation and translations to my validation.yml file, but to no avail. I find that when I don't enter anything in the translation field the form doesn't submit, but nothing happens. No FE or BE error. My form: /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('translations', 'a2lix

Making a A2lix translation field required in the front end in a Symfony form

梦想与她 提交于 2019-12-06 15:56:17
Is there a way to make a A2lix translation field required and validated through the front-end in a Symfony form? I have tried adding a property of presentation and translations to my validation.yml file, but to no avail. I find that when I don't enter anything in the translation field the form doesn't submit, but nothing happens. No FE or BE error. My form: /** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('translations', 'a2lix_translationsForms', array( 'form_type' => new CourseGuideTranslationType($this->dataClass . 'Translation

How to override SyliusCoreBundle Model User

会有一股神秘感。 提交于 2019-12-05 23:36:52
I try to add a new field "phone" in model User (SyliusCoreBundle/Model/User). Avoiding to touch SyliusCoreBundle, I create a new bundle 'ShopBundle' which is beside of the others sylius bundles to override base user class : src/Sylius/Bundle/ShopBundle in the folder ShopBundle : > /Controller(empty) > /DependencyInjection(empty) > /Model > /User.php > /Resources > /config/doctrine/model/user.orm.xml > /config/service.xml (empty) > SyliusShopBundle.php In file src/Sylius/Bundle/ShopBundle/Model/User.php , I have : <?php namespace Sylius\Bundle\ShopBundle\Model; use Sylius\Bundle\CoreBundle