How to update the value from a field with a copy of the value from another field

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
6 years 8 months ago #290132

-- 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


Kind regards,
Lumiga
Attachments:
Last edit: 6 years 8 months ago by Lumiga.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 8 months ago #290134

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.

The following user(s) said Thank You: Lumiga

Please Log in or Create an account to join the conversation.

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
6 years 7 months ago #290161

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.069 seconds
Powered by Kunena Forum