VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: peli on October 24, 2008, 19:22:17 PM

Title: User without country
Post by: peli on October 24, 2008, 19:22:17 PM
Description:
When the field for country is unpublish no payment info will be displayed at the first step in the checkout.

Turning on debugging showes querys like this:
SELECT *
  FROM jos_vm_user_info i
  INNER JOIN jos_vm_country c
  ON (i.country=c.country_3_code OR i.country=c.country_2_code)
  LEFT JOIN jos_vm_state s
  ON (i.state=s.state_2_code
  AND s.country_id=c.country_id)
  WHERE user_id='67'
  AND address_type='BT'

Query will return an empty result when country are NULL

VirtueMart Version:
1.1.2

Joomla/Mambo Version:
1.5.7

Steps to replicate:
Unpublish the country field from user fields.
Create a new user.
Go to checkout with the new user.

Proposed fix(es):
Change inner join to left join.

Bugtracker task #:
Enter the bugtracker task #/url when submitted.

System info:
Debian 2.6.16.5
MySQL 5.0.32-Debian_7etch6-log
PHP 5.2.0-8+etch11
Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c