Jump to content

how to add custom field in frontend


Shwetab55

Recommended Posts

Hi,

I'm using Prestashop 1.7.5 and Php 7.2

I have added custom code on the order-details page on front end, but it's not showing.

is there any hook or controller in that I need to add custom code.

Please let me know how to add custom code to front end on order-detail page.

Thank you.

Link to comment
Share on other sites

Thank you for your reply.

Yes, I have added my custom field in /theme/warehouse/templates/customer/order-detail.tpl

also added the isSubmit for all the custom fields in the /controller/front/OrderDetailController.php file.

but still it's not working.

Link to comment
Share on other sites

Hello @Razi

I have custom field called proforma_invoice, I tried to print_r order.details, this field is present in that array.

but when I tried to access to $order.details.proforma_invoice in /themes/xxx/templates/customer/order-details.tpl, it doesn't work.

How can I access this varibale?

I have defined this varibale in Order.php file and I'm able to access this varibale from backoffice, but it's not working in frontoffice.

Thank you.

Edited by Shweta Bhatia (see edit history)
Link to comment
Share on other sites

  • Shwetab55 changed the title to how to add custom field in frontend
  • 2 weeks later...

Hello 
 

I have added the custom field on the Admin Orders called Proforma Invoice, I'm uploading the Proforma Invoice on the Admin Order page.

And I'm saving that invoce in the Img/proforma_invoice folder and On the Front end on the Order Detail page, I want to show that invoice to download.

can someone please help me with this, Its not showing, can you please tell me how to access that invoice on the front end.

Thank you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...