samnabi / shopkit

Comprehensive commerce solution for Kirby CMS v2
https://shopkit.samnabi.com
Other
99 stars 15 forks source link

Add custom field to an order #210

Open Mojo90 opened 6 years ago

Mojo90 commented 6 years ago

Is there an easy way to add a custom field to an order like a note from the buyer to the seller? That would be a great functionality... E.g. where personal details like name and address are filled in to show on possible fields. Did not find a solution in docs so before enhancing the templates want to ask if there is sth integrated already

samnabi commented 6 years ago

There isn't something like this integrated already.

I will mark it as a new feature but I don't have the capacity to work on new features at the moment.

Mojo90 commented 6 years ago

Ok thank you. Is there an easy way to enhance that by myself for an order?

samnabi commented 6 years ago

You would have to override your own cart.php template, with the new form fields.

And then, to actually write the information to the transaction file, you'll have to override the process.php controller.

Finally, you might want to edit the orders.php template and order.yml blueprint to display the additional information.

Mojo90 commented 6 years ago

Yeah perfect, that was easy. Thanks!