Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
Forum Replies Created
-
AuthorReplies
-
Thanks for your help
I found it
PHP1$this->cacheBuilder->buildCache($scope);Thank you very much Andrey.
Hi,
@Andrey, can we apply this ACL voter for the frontend product by customers ?
i think this example https://github.com/oroinc/orocommerce/blob/1.6/src/Oro/Bundle/VisibilityBundle/Acl/Voter/ProductVisibilityVoter.php it’s for backend product.
there is a more detailed example to follow, or a course for voting acl?
Thank you Andrey for help.for users at storefront
Thank you very much. it worked.
yes.
the idea is to allow the seller to upload their company files from front.Thank you for you precious help
hi,
I just override main_menu.html.twig and it works.
Thank youThank you for your advice
Hi Dmitriy Pasechnik
I change the class SpgCustomerUserType.phpPHP12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273<?phpnamespace Kais\Bundle\SpgCustomerBundle\Form\Type;use Symfony\Component\Form\AbstractType;use Symfony\Component\Form\FormBuilderInterface;use Symfony\Component\OptionsResolver\OptionsResolver;use Oro\Bundle\CustomerBundle\Form\Type\CustomerType;use Oro\Bundle\CustomerBundle\Entity\Customer;class SpgCustomerUserType extends AbstractType{const NAME = 'spg_customer_frontend_customer_user_profile';/*** @var string*/protected $dataClass;/*** @param string $dataClass*/public function setDataClass($dataClass){$this->dataClass = $dataClass;}/*** @param FormBuilderInterface $builder* @param array $options*/public function buildForm(FormBuilderInterface $builder, array $options){$builder->add('Customer', CustomerType::NAME,['data_class'=> Customer::class,'required' => false]);}/*** {@inheritdoc}*/public function configureOptions(OptionsResolver $resolver){$resolver->setDefaults(['data_class' => $this->dataClass]);}/*** @return string*/public function getName(){return $this->getBlockPrefix();}/*** {@inheritdoc}*/public function getBlockPrefix(){return self::NAME;}}I receive an error in log file:
request.CRITICAL: Uncaught PHP Exception Doctrine\ORM\ORMInvalidArgumentException: “Expected value of type “Oro\Bundle\UserBundle\Entity\User” for association field “Oro\Bundle\AttachmentBundle\Entity\File#$owner”, got “Oro\Bundle\CustomerBundle\Entity\CustomerUser” instead.” at C:\EasyPHP-Devserver-17\eds-www\oro-commerce\vendor\doctrine\orm\lib\Doctrine\ORM\ORMInvalidArgumentException.php line 206 {“exception”:”[object] (Doctrine\\ORM\\ORMInvalidArgumentException(code: 0): Expected value of type \”Oro\\Bundle\\UserBundle\\Entity\\User\” for association field \”Oro\\Bundle\\AttachmentBundle\\Entity\\File#$owner\”, got \”Oro\\Bundle\\CustomerBundle\\Entity\\CustomerUser\” instead. at C:\\EasyPHP-Devserver-17\\eds-www\\oro-commerce\\vendor\\doctrine\\orm\\lib\\Doctrine\\ORM\\ORMInvalidArgumentException.php:206)”} []
but when i add the file in the backend, and in the front i edit the form and i upload another file, it works !!!
so, if the field is empty it returns error
do I forget an aption?
Thank youMarch 10, 2018 at 5:27 am in reply to: Modification in the identification of the front-end user #32898i mean
- I want to add fields to the entity “customer” and editable when saving.
- toggle the form in side by side mode.
- how to change the different types of registration forms
Thank you
March 10, 2018 at 2:37 am in reply to: Modification in the identification of the front-end user #32897Thank you for your help,
Following your recap then I want to know how to customize the registration form of a new “Customer Users” in the front-end:- I want to add fields to the entity “Accounts” and editable when saving.
- toggle the form in side by side mode.
Thank you
I tested the oro-commerce version 1.4 with the same server and it worked.
I found :
just replace the return
‘vehicle’ => $ vehicle
by
‘entity’ => $ vehicle -
AuthorReplies