Jump to content
vivianne

Custom field

Recommended Posts

I have the challenge to integrate a custom field in the back office into the order detail page, which I can then output on the invoice.

We somehow have to label which orders are placed from our local stores (different ones) and which are placed online. Unfortunately, the POS recorded in Prestashop cannot yet be assigned to an order.

Does anyone have a solution for this?

We work with Prestashop 1.7.6

Edited by vivianne (see edit history)

Share this post


Link to post
Share on other sites

the template for that page is located in the admin folder, for the default theme, then templates, controllers, orders, just locate view.tpl in there.
You can add the field as a new form, but you will have to include the order id within it. Also, after that you will have to edit adminorderscontroller to save the field, in the postProcess method.
In order to save it though, you must add a new column to the database, as well as a new property to the Order.php class.

That should save it. As for the  invoice, have a look at HTMLTemplateInvoice.php, you can assign it there, or use the order object directly in the pdf template

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More