OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Adding custom field to accept data on checkout

This topic contains 3 replies, has 3 voices, and was last updated by  saeel005 6 years, 6 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #32073

    saeel005
    Participant

    Hi All,

    I want to add a text box on payments section on checkout.

    What i have done is :

    • created a column in checkout table and order table.
    • wrote respective getter setter for same in entity files of checkout and order.
    • in the workflow.yml i added a the field under attributes and also under the transition – continue_to_order_review:step_to: order_review (since i want this field to appear on payment section)
    • added {{ form_row(form.customsolumnname) }} in payments.html.twig
    • cleared cache using app/console cache:clear

      i am getting below error :
      Neither the property “customsolumnname” nor one of the methods “customsolumnname()”, “customsolumnname()”/”customsolumnname()” or “__call()” exist and have public access in class “Symfony\Component\Form\FormView”.

      what am i missing here? or what is the correct approach to add custom fields on checkout through workflow.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #32074

    jeetendra_gawas1
    Participant

    Hi ,

    Even i am trying to implement the similar solution. Can anybody please provide any pointers ?

    Thanks,

    Jeetendra

    #32075

    ibratsilo
    Moderator

    The approach seems right in words, but you probably made a mistake somewhere. It is desirable to show the parts of the code that have been added.

    • I suggest checking the spelling of the added form field, probably in the name

      customsolumnname

      there may be an error. This is the most likely reason for the current error. I suggest using lower underscores in the name of the field, which makes it more readable.

    • Check whether you have cleared the cache in the same environment in which you are currently working. Also, to rebuild the workflows, you need to run the command –

      please have a look at documentation https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/WorkflowBundle/Resources/doc/reference/workflow/getting-started.md#console-commands

    • Check whether you have modified correct workflow, since there are several of them in the system
    • You also need to make sure that you have linked the form field to the checkout column in the Attributes section –
    #32076

    saeel005
    Participant

    Hi ibratsilo,

    Thanks for the reply, i resolved my issue.
    it was php app/console oro:workflow:definitions:load command which i missed after making changes to checkout workflow.

    Anyways Thanks again for the reply :)

    Regards,
    Saeel

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top