I'm new here but I've been reading and working with osCommerce for a while now. So here comes a question a need help with—simply because I think it's better to ask than to start messing around with the core code...
If I understand osC logic correctly,
a) zones are mainly used for tax purposes but can also be created to be used as "shipping zones"
b) shipping and payment zones do not necessarily have to relate (we DO have an account, a billing and a shipping address, don't we?)
c) nevertheless, SOME payment modules check the shipping instead of the billing address (like CoD, for a sensible reason)
d) using a tax zone in a shipping module (like zones.php) should somehow be "overruled" by the actuall billing (payment module)
Correct me if I misunderstood anything, please.
My actual problem is that for some reason ALL payment modules show up even if they're not "enabled" ($this->enable == false). The CAN be selected on checkout but when pressing "continue" a red bar comes up stating something like "Select a payment option". The payment module that WOULD be correct CAN be selected and WILL lead to continuation of the checkout.
Here's what I have set up:
—The PayPal Cart IPN and two "bank transfer" modules, one for EU IBAN/BIC transfers and one for German bank transfers (my own), set up like this:
CODE
PayPal
Enable PayPal Module
True
E-Mail Address
myemail@mydomain.de
Business ID
myemail@mydomain.de
Transaction Currency
Selected Currency
Payment Zone
--none--
Set Pending Notification Status
Pending
Set Order Status
Processing
Set On Hold Order Status
On Hold
Set Canceled Order Status
Canceled
Synchronize Invoice
True
Sort order of display.
0
Background Color
White
Processing logo
mylogo.gif
Store logo
PayPal Page Style Name
default
Include a note with payment
No
Shopping Cart Method
Aggregate
Enable PayPal Shipping Address
Yes
Digest Key
mydigestkey
Test Mode
Off
Cart Test
On
Debug Email Notifications
Yes
Debug Email Notification Address
myemail@mydomain.de
PayPal Domain
www.paypal.com
Return URL behavior
1
Enable PayPal Module
True
E-Mail Address
myemail@mydomain.de
Business ID
myemail@mydomain.de
Transaction Currency
Selected Currency
Payment Zone
--none--
Set Pending Notification Status
Pending
Set Order Status
Processing
Set On Hold Order Status
On Hold
Set Canceled Order Status
Canceled
Synchronize Invoice
True
Sort order of display.
0
Background Color
White
Processing logo
mylogo.gif
Store logo
PayPal Page Style Name
default
Include a note with payment
No
Shopping Cart Method
Aggregate
Enable PayPal Shipping Address
Yes
Digest Key
mydigestkey
Test Mode
Off
Cart Test
On
Debug Email Notifications
Yes
Debug Email Notification Address
myemail@mydomain.de
PayPal Domain
www.paypal.com
Return URL behavior
1
CODE
EU Bank Transfer
Allow Bank Transfer Payment
True
Payment Zone
European Union
Set Order Status
default
Module Sort order of display.
0
Bank Name
My Bank Name
Branch Location
My Branch Location
Bank Account Name
My Name
Bank Account No.
myaccountno.
Bank Account IBAN
myIBAN
Bank Bic
myBIC
Allow Bank Transfer Payment
True
Payment Zone
European Union
Set Order Status
default
Module Sort order of display.
0
Bank Name
My Bank Name
Branch Location
My Branch Location
Bank Account Name
My Name
Bank Account No.
myaccountno.
Bank Account IBAN
myIBAN
Bank Bic
myBIC
CODE
Bank Transfer Germany
Allow Bank Transfer Payment
True
Payment Zone
Germany
Set Order Status
default
Module Sort order of display.
0
Account Holder
My Name
Bank Name
My Bank Name
Bank ID (BLZ)
My bank's ID#
Account No.
myaccountno.
Allow Bank Transfer Payment
True
Payment Zone
Germany
Set Order Status
default
Module Sort order of display.
0
Account Holder
My Name
Bank Name
My Bank Name
Bank ID (BLZ)
My bank's ID#
Account No.
myaccountno.
—The "zones.php" as shipping module.
—Two "tax zones", one "European Union", containing all 25 countries (incl. Germany, taking it out didn't better it), and one "Germany" containing only Germany.
—Two tax rates, containing "European Union" as zone with 16% and 7% tax, respectively. (Only the 16% is used currently.)
—The shipping module is set up like this:
CODE
Enable Zones Method
True
Tax Class
16% MwSt
Sort Order
0
Zone 1 Countries
DE
Zone 1 Shipping Table
0.5:2.1552,2:4.2672,5:6.4655,10:9.9138,20:12.9310
Zone 1 Handling Fee
0
Zone 2 Countries
AD,BE,DK,FO,FI,FR,GR,GL,GB,IE,IT,LI,LU,MC,NL,AT,PL,PT,SM,SW,CH,SK,ES,CZ
Zone 2 Shipping Table
0.5:6.0345,2:7.7586,5:15.0862,10:19.3966,20:26.2931
Zone 2 Handling Fee
0
Zone 3 Countries
AL,AM,AZ,BA,BG,EE,GE,GI,IS,KZ,HR,LV,LT,MK,MT,MD,NO,RO,RU,CS,SI,TR,UA,HU,BY,CY
Zone 3 Shipping Table
0.5:6.0345,2:7.7586,5:22.4138,10:31.8966,20:40.5172
Zone 3 Handling Fee
0
Zone 4 Countries
EG,DZ,BH,IQ,IR,IL,YE,JO,CA,QA,KW,LB,LY,MA,OM,SA,PM,SY,TN,US,AE
Zone 4 Shipping Table
0.5:6.8966,2:11.2069,5:25.8621,10:35.3448,20:52.5862
Zone 4 Handling Fee
0
Zone 5 Countries
All Others
Zone 5 Shipping Table
0.5:6.8966,2:11.2069,5:31.0345,10:44.8276,20:70.6897
Zone 5 Handling Fee
0
and actually everything calculates perfectly and like charm.True
Tax Class
16% MwSt
Sort Order
0
Zone 1 Countries
DE
Zone 1 Shipping Table
0.5:2.1552,2:4.2672,5:6.4655,10:9.9138,20:12.9310
Zone 1 Handling Fee
0
Zone 2 Countries
AD,BE,DK,FO,FI,FR,GR,GL,GB,IE,IT,LI,LU,MC,NL,AT,PL,PT,SM,SW,CH,SK,ES,CZ
Zone 2 Shipping Table
0.5:6.0345,2:7.7586,5:15.0862,10:19.3966,20:26.2931
Zone 2 Handling Fee
0
Zone 3 Countries
AL,AM,AZ,BA,BG,EE,GE,GI,IS,KZ,HR,LV,LT,MK,MT,MD,NO,RO,RU,CS,SI,TR,UA,HU,BY,CY
Zone 3 Shipping Table
0.5:6.0345,2:7.7586,5:22.4138,10:31.8966,20:40.5172
Zone 3 Handling Fee
0
Zone 4 Countries
EG,DZ,BH,IQ,IR,IL,YE,JO,CA,QA,KW,LB,LY,MA,OM,SA,PM,SY,TN,US,AE
Zone 4 Shipping Table
0.5:6.8966,2:11.2069,5:25.8621,10:35.3448,20:52.5862
Zone 4 Handling Fee
0
Zone 5 Countries
All Others
Zone 5 Shipping Table
0.5:6.8966,2:11.2069,5:31.0345,10:44.8276,20:70.6897
Zone 5 Handling Fee
0
But I've tried with 3 test customers, and the outcome is wrong (I think) since only the shipping modules that ARE ALLOWED for that particular customer should show up—or is that not so? I even put debugging code in and it shows them being "DISABLED" but still they show on checkout!
(And changing any Sort Orders won't help, I've tried.)
Case 1: Customer living in Germany
Desired: 16% VAT should apply on both goods & shipping; Payment options shown: German Bank Transfer, EU Bank Transfer (since Germany in zone), and PayPal (since in no zone).
Actual: The same. All calculated correctly, all working. Fine.
Case 2: Customer living in Austria.
Desired: 16% VAT on goods & shipping; Payment options shown: EU bank transfer and Paypal.
Actual: German bank transfer shows up! Calculations are okay. If user selects German bank transfer, a message shows "Please select a payment method for your order." and he's returned to the payment checkout screen.
Debugging shows that German bank transfer is actually NOT enabled since the module has detected that it's not applicable for a billing address in Austria.
So why does it show up in the first place? Is that intended behaviour?
Case 3: Customer living in the U.S.
Desired: NO VAT on goods and shipping; Payment options shown: Only PayPal.
Actual: PayPal AND EU bank transfer AND German bank transfer show up. Last two are not enabled (i.e., have detected they're not applicable here). Selecting them shows above error message. Paypal works.
Shipping and goods are calculated correctly (no VAT applied). So even if I stated in the Zone Rates Shipping Module to USE tax 16%, IT DIDN'T! Great! But... why? IS it actually overruled and somehow "reset" not net values by billing to a non-VAT-applicable address?
Since I'm working with this for over 20 hours apiece now... I'm busted. Please help me see the fault I seem to overlook all the time... ;-)
Thank you.
Matthias
N.B.: Sorry for the long text, but my English isn't THAT good and I wanted to make everything clear. And, yes, my payment modules work, and have been thouroughly debugged.






for all prices I entered as Gross.