- Posts: 637
- Thank you received: 26
How to update the value from a field with a copy of the value from another field
8 years 6 months ago - 8 years 6 months ago #290132
by Lumiga
Kind regards,
Lumiga
How to update the value from a field with a copy of the value from another field was created by Lumiga
-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.6
-- PHP version -- : 7
Hi Hikashop team,
I'm busy creating a CSV export for UPS Worldship software.
UPS told us that it's better to not use the state field, only when the package has to be sent to the United States of America or Canada.
So I have create a custom field "order_ups_state" and I want to update the value with a copy of the value from "address_state"
only when the shipping address_country is United States of America. So in all other cases this field will be empty.
So I have create this Mass Action.
The only question I have is how to update the value for "order_ups_state" with a copy of the value from "address_state".
Hope you can help me with this issue.
Kind regards,
Lumiga
-- Joomla version -- : 3.8.6
-- PHP version -- : 7
Hi Hikashop team,
I'm busy creating a CSV export for UPS Worldship software.
UPS told us that it's better to not use the state field, only when the package has to be sent to the United States of America or Canada.
So I have create a custom field "order_ups_state" and I want to update the value with a copy of the value from "address_state"
only when the shipping address_country is United States of America. So in all other cases this field will be empty.
So I have create this Mass Action.
The only question I have is how to update the value for "order_ups_state" with a copy of the value from "address_state".
Hope you can help me with this issue.
Kind regards,
Lumiga
Kind regards,
Lumiga
Last edit: 8 years 6 months ago by Lumiga.
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290134
by nicolas
Replied by nicolas on topic How to update the value from a field with a copy of the value from another field
Hi,
There is no option in the mass action system to do that.
The update the values action can't use address fields. And even if it could, in the address_country and address_state fields, you don't have the 2 letter code, you have the zone namekey.
So that wouldn't help.
I'm afraid you'll have to develop a custom plugin or script to either fill that field with some PHP and MySQL queries, or handle the export specifically for UPS.
There is no option in the mass action system to do that.
The update the values action can't use address fields. And even if it could, in the address_country and address_state fields, you don't have the 2 letter code, you have the zone namekey.
So that wouldn't help.
I'm afraid you'll have to develop a custom plugin or script to either fill that field with some PHP and MySQL queries, or handle the export specifically for UPS.
The following user(s) said Thank You: Lumiga
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290161
by Lumiga
Kind regards,
Lumiga
Replied by Lumiga on topic How to update the value from a field with a copy of the value from another field
Oké thanks, I'm going to investigate this option.
Kind regards,
Lumiga
Please Log in or Create an account to join the conversation.
Time to create page: 0.175 seconds