0

I need to get a value from the database and insert into an input, so I need to get that customer object in front-end phtml file. EXAMPLE: What I need to do is: Here I get the value of the object I need, I put in a variable, and then I put in the input

teste.phtml getCustomer() <--- I do not know how to call the object, it only returns me protected

<input type="text" value="<here object value from client object>"/>
4
  • You want to pass whole customer object in your input type? Nov 3 '17 at 14:51
  • not just a value, for example, the first name, in my case the value is the CPF (a numeric attribute value in Brazil) Nov 3 '17 at 14:55
  • Can you please add some more info and code? Nov 3 '17 at 15:00
  • Being in the checkout, in the form of payment, I need to get an attribute that is in the customer database and put an entry from the bank slip, but I do not know to bring this information to put in this entry, The code is just that, a entry in which I need to pass on the value of it, an attribute that is in the client database, this PHTML file is part of an extension that I installed, in form of payment, mundipagg Nov 3 '17 at 15:05
0

To solve this problem, I am using cookies in javascript, I search where the object is being generated in the backend and I create a cookie to be seen in my custom phtml page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.