Possible to populate custom field onShippingSave?

  • Posts: 88
  • Thank you received: 19
8 years 5 months ago #243785

Hi

I have a custom shipping plugin where I wan't to store some information to a custom field e.g. onShippingSave, something like:

function onShippingSave(&$order,&$methods,&$shipping_id) {
		$order->pakkeshop = $methods[$shipping_id]->shipping_description;
	}

$methods[$shipping_id]->shipping_description contains the info I like to populate into my custom order field called pakkeshop.

Is it possible to do?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 5 months ago #243790

Hi,

onShippingSave affect the cart so you will have some issues.
Best is to use onBeforeOrderCreate, in that trigger you can be sure that you'll get your order object and the data will be stored in the database.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum