News:

Support the VirtueMart project and become a member

Main Menu

Custom shopper field only for bill-to (BT) or ship-to (ST)?

Started by vmfyelloq19, July 22, 2019, 09:09:35 AM

Previous topic - Next topic

vmfyelloq19

Hi folks,

is it possible to add a custom shopper field to how up only on bill-to (BT) or ship-to (ST)?

Jörgen

Yes, but it need some adjustment in the template files for the (BT) and (ST) block. It should be easy to check for custom field name to include and exclude the custom field.

templates/your-template/html/com_virtuemart/invoice_order.php

Would be a good starting point.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

vmfyelloq19

Hi Jörgen,

thanks for your reply. Yes, I certainly know I can work that out with my templates. I was just wondering if it could be configured in a way the shop admin would have to call me to adjust the template whenever she adds or modifies a field.

Cheers!


Jörgen

Hello
If you give the admin some naming convention. Perhaps st_myfield and bt_myfield, he or she can add as much fields as they need.
Then you only need one mod of the template.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

vmfyelloq19

Hi Jörgen,

thanks for your hint. That's the way I usually do it, and it works somehow.
Still I feel it's some sort of crude and I had the idea there was a "proper" way implemented by the VM developers.
Working with VM you get the impression that there are many things you work around that would be much much cleaner and easier if we had a way to know they are already in the API.

Cheers!