Getting Name and Address from another application

  • Posts: 259
  • Thank you received: 22
11 years 1 month ago #164087

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3
-- Joomla version -- : 2.5.22

I have configured the custom product plugin to integrate an old booking system with Hikashop. I am successfully passing the amount and invoice number to custom fields using "product_id=1&data[item][amount]=....&data[item][invoice]=...." but am struggling to get the name and address to pass to the standard Hikashop name and address fields.

I am using "data[address][address_firstname]=" in the url but with no success. Is this expression correct for standard address fields?

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
11 years 1 month ago #164122

Hi,

When you add a product in the cart, you can set the values for the product (also called item) ; so set a value for his custom fields.
But the address is a totally different thing. You can't change the address of the user like that.
If the user does not have an account, if you are using "guest checkout" for example ; it is possible to use the session to store an address which will be pre-filled during the checkout.

$addr = new stdClass();
$addr->address_firstname = '';
$_SESSION['hikashop_address_data'] = $addr;

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