Forums / Built-in Shipping and Payment Modules / How to set up zones for payment module

How to set up zones for payment module

Locked

Views: 2,346

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
26 Dec 2010, 5:18 PM
#1
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

How to set up zones for payment module

Hi,

I have honestly spent hours trying to figure this out, and now I give up....so sorry if this has been asked and explained before, i honestly can't find it :(

I am setting up a store with v1.3.9f

My shipping is split up in zones.... and the set up works...so no problems there.

Zone 1 Local = Switzerland
Zone 2 Europe (EU)
Zone 3 International

I am now trying to set up the Payment modules using the above zones but honestly can't figure it out.

Zone 1 (Switzerland) Paypal and Moneyorder. The moneyorder should only show to zone 1 customers.

Zone 2. (Europe) Paypal and EU standard Banking transfer (I have installed the mod, and everything work except it shows to all customers, and I want it to show only to Zone 1 shipping customers.
Zone 3. (international) Only Paypal.

What I have done to test this....

I went to Zone Definitions and opened up a new zone called

Switzerland - Payment Then in Details I ticked All Zones.

I installed Moneyorder and for Payment zone clicked on Switzerland.

Now the problem and question.

I logged in using an Austalian address. I could chose and process my order using the Moneyorder which is meant for Swiss customers only

Which then leaves the question, how do I set up zone 2 (european) customers for EU bank transfer option and the International so that they can only take Paypal as paying option??

So am I doing something wrong in my set up or is what I want not possible?

Thank you in advance for your replies and help.

Would also appreciate a short reply if this is not possible.

26 Dec 2010, 8:13 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to set up zones for payment module

You moght have to clone a shipping and maybe also a payment module to effect this
Tutorial covers a shipping module and the principles are the same for a payment

Payment and shipping modules should have a zone to define in the admin for them

Probably a combination of payment and shipping modules

https://www.zen-cart.com/tutorials/index.php?article=69
https://www.zen-cart.com/tutorials/index.php?article=189

Zen-Venom Get Bitten

26 Dec 2010, 8:39 PM
#3
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

Re: How to set up zones for payment module

HI

thank you for your reply.

still can't figure it out :(

I guess it means I can't open up a Payment zone that has more then 1 country in it, like i can in Shipping.

e.g in my shipping zone 2 for Europe I have 28 countries, so I still can't understand how I can make one payment module that is only visible to zone 2 countries.

dito for the zone 3 international....which again has 8 countries.

Maybe the penny hasn't dropped yet for some relevant information that I am missing. :unsure:

27 Dec 2010, 12:01 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to set up zones for payment module

I guess it means I can't open up a Payment zone that has more then 1 country in it

my shipping zone 2 for Europe I have 28 countries
Make the payment module for zone 2

In the payment module

[B]Payment Zone[/B]
If a zone is selected, only enable this payment method for that zone.

Zen-Venom Get Bitten

27 Dec 2010, 8:28 AM
#5
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

Re: How to set up zones for payment module

Hi,

I did what you suggested.

  1. I cloned the payment module Direct Bank Deposit and customised to Swiss Bank details.

  2. In Zone Definitions I named one -> Switzerland -> description = Payment in details chose -> All Zones

  3. In the Admin settings of the Payment module I chose Switzerland as Payment zone.

I feel I have done everything as suggested, but still all zones can use this payment method, where as I feel only the Swiss should have this Payment option available :frusty:

Here is a copy of the bit of code that shows the line you suggested. It's there.....

}

    function install() {
      global $db;
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable CHPostcheck Module', 'MODULE_PAYMENT_CHPOSTCHECK_STATUS', 'True', 'Do you want to accept chpostcheck payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
	 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_CHPOSTCHECK_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_CHPOSTCHECK_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Routing Number', 'MODULE_PAYMENT_CHPOSTCHECK_ROUTING', '000-000-000', '9 digit routing number in the format 000-000-000', '6', '1', now());");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account No.', 'MODULE_PAYMENT_CHPOSTCHECK_ACCNUM', '12345678', 'Bank Account No.', '6', '1', now());");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account Name', 'MODULE_PAYMENT_CHPOSTCHECK_ACCNAM', 'Joe Bloggs', 'Bank Account Name', '6', '1', now());");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Name', 'MODULE_PAYMENT_CHPOSTCHECK_BANKNAM', 'The Bank', 'Bank Name', '6', '1', now());");
     $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_CHPOSTCHECK_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
   }

I would like to add that I have tried using some of the standard payment modules included with ZC and selected a Zone, but they also show up for ALL zones when going through checkout. :(

I am missing a small important detail to make this work.................

27 Dec 2010, 4:28 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to set up zones for payment module

  1. In Zone Definitions I named one -> Switzerland -> description = Payment in details chose -> All Zones

  2. In the Admin settings of the Payment module I chose Switzerland as Payment zone.

I feel I have done everything as suggested, but still all zones can use this payment method, where as I feel only the Swiss should have this Payment option available
Not sure but it looks as though you set it for "all zones" somewhere and this is taking precedence

Zen-Venom Get Bitten

27 Dec 2010, 7:06 PM
#7
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

Re: How to set up zones for payment module

Sorry, that was mistake on my part.

When I put Switzerland in Zone Definitions I chose "all zones" for switzerland (we have 26 states).

IN the payment option I then took "Switzerland" as zone.

I am attaching a printscreen of how I did it.

The module is a clone of Direct Bank Transfer, and this works....the only thing that doesn't work is the zone only option to it.

I haven't added a link to the shop as you can only see this if you are registered and make an order....so not sure a link would help.

28 Dec 2010, 10:41 AM
#8
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

Re: How to set up zones for payment module

omg.....fixed it :clap:

I accidently stumbled onto it by reading another thread where the setting up of the zones was explained differently.

Works now.......thank you for your help, you still pointed me in the right direction.

I had my Swiss zone set up wrong ! Like you suggested.... all zones being the whole world rather then just the Swiss zones.

28 Dec 2010, 2:35 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to set up zones for payment module

I had my Swiss zone set up wrong ! Like you suggested....
Those legacy things in the admin are the most difficult to explain

Great that you got this sussed

Zen-Venom Get Bitten

28 Dec 2010, 3:10 PM
#10
dustie avatar

dustie

Zen Follower

Join Date:
Nov 2010
Posts:
159
Plugin Contributions:
0

Re: How to set up zones for payment module

Moi is glad too.......:)

I have to admit though that this is probably one of the most informative and most helpful forums I have come across till now. Most things I have been able to solve just by doing searches, but even the best of searches wouldn't help , if there is no information available.......

so to all those that take time to reply to questions (even over and over again).....thank you :)