Author Topic: Shipping Address Bug  (Read 2281 times)

trodat

  • Beginner
  • *
  • Posts: 15
Shipping Address Bug
« on: September 01, 2010, 20:48:23 pm »
Joomla 1.5.18
VirtueMart 1.1.4

I was working on / searching how to fix the bug when you make a change to the shipping address section in the admin (i.g. don't show the fax field on front-end) but it still shows up on the front-end. I found the bug tracker link here, which I thought was the fix:

http://dev.virtuemart.net/redmine/projects/virtuemart/wiki/Changes_in_Virtuemart_110_RC2

=====
1.Task #1425 - Changing User fields have no effect in frontend Shipping Addresses section

!!! DATABASE: TABLE STRUCTURE CHANGE ###
ALTER TABLE `jos_vm_userfield` ADD `shipping` TINYINT NOT NULL DEFAULT '0' AFTER `registration`;
INSERT INTO `jos_vm_userfield` VALUES (NULL, 'address_type_name', '_PHPSHOP_USER_FORM_ADDRESS_LABEL', '', 'text', 32, 30, 1, 6, NULL, NULL, NULL, NULL, 1, 0, 1, 0, 0, 0, 1, 1, NULL);
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='company';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='first_name';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='last_name';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='middle_name';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='address_1';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='address_2';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='city';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='zip';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='country';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='state';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='phone_1';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='phone_2';
UPDATE `jos_vm_userfield` SET `shipping`=1 WHERE `name`='fax'; ###
=====

I saved the command list in a text file and then in the mysql database "Insert data from a text file into the table". I did not receive any errors during this process. However, it did not fix the issue. So, I deleted the newly created "shipping" field and now I get these errors on the front-end anywhere the shipping address is displayed/used:

Warning: Invalid argument supplied for foreach() in /htdocs/www/administrator/components/com_virtuemart/classes/ps_userfield.php on line 531
Warning: Invalid argument supplied for foreach() in /htdocs/www/administrator/components/com_virtuemart/classes/ps_userfield.php on line 595

In the Virtuemart admin, under Manager User Fields, no fields are showing up at all, but they still exist in the mysql database.

Can someone please help me fix this? I did not do a mysql dump prior to running these commands.

mosquitoman

  • Beginner
  • *
  • Posts: 19
Re: Shipping Address Bug
« Reply #1 on: March 23, 2011, 22:36:20 pm »
did anyone ever find a fix for this, i think it's the same as mine which is that the customers don't see their address in the ship to area, instead they see the corporate address so they feel like their shipping info wasn't inputted

mosquitoman

  • Beginner
  • *
  • Posts: 19
Re: Shipping Address Bug
« Reply #2 on: March 23, 2011, 22:58:53 pm »
I just found this one it half solves the problem for me http://forum.virtuemart.net/index.php?topic=56304.0