VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Kamen Rider on October 03, 2014, 09:55:16 AM

Title: Automatically add new ShipTo Address when saving Billing Address
Post by: Kamen Rider on October 03, 2014, 09:55:16 AM
Hi,

Is there anyway that I can manually add a new ShipTo Address when saving from Billing Address? I understand that it automatically read from billing address is there is no shipment address but I have a plugin for DHL that will return error unless shipping address is filled.

I am currently running this code to insert a new ship to address manually when saving from a billing address. However, the new ship to address is not added to the shipment section on the cart page.
INSERT into #__virtuemart_userinfos (virtuemart_user_id, address_type, address_type_name, title, first_name, last_name, address_1, zip, city, virtuemart_country_id, virtuemart_state_id, created_on, created_by, modified_on, modified_by) values ('696', 'ST', 'Shipment', 'Mr', 'Demo', 'Demo', 'Singapore', '123456', 'Singapore', '188', '', '2014-10-03 15:53:08', '696', '2014-10-03 15:53:08', '696')

I am thinking that it might be a cookie issue but then when I clear cache and re-login there is still no ship to address.

Anyone have experience in these can help me out?

Thanks!
Title: Re: Automatically add new ShipTo Address when saving Billing Address
Post by: GJC Web Design on October 03, 2014, 10:37:00 AM
surely it would be easier to adapt the ship plugin to read the BT if present?
Title: Re: Automatically add new ShipTo Address when saving Billing Address
Post by: Kamen Rider on October 03, 2014, 12:38:46 PM
The code is being compressed and encoded so I have no access to to the source code. If there anyway to do it from Virtuemart?
Title: Re: Automatically add new ShipTo Address when saving Billing Address
Post by: GJC Web Design on October 03, 2014, 15:32:08 PM
I meant in the "plugin for DHL "
Title: Re: Automatically add new ShipTo Address when saving Billing Address
Post by: Kamen Rider on October 03, 2014, 16:39:18 PM
I understand that you meant the plugin. What I was saying earlier is that the source code for the DHL plugin is encrypted and cannot be decode so I have no access to humanly readable file for the plugin.

Anyway, I found out that when ship to address is added Virtuemart add them to the session. Anyone know the correct method to duplicate this function?
Title: Re: Automatically add new ShipTo Address when saving Billing Address
Post by: Milbo on October 11, 2014, 20:40:54 PM
Interesting that they finally have such a plugin. Can you give me the page? I was anyway negotiating with them. The fix is actually easy, the problem is how to implement it and not disturbing the shops already there.