Zen Cart Logo
Forums / Bug Reports / [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

[Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

Views: 1,148

Results 1 to 8 of 8
9 Dec 2015, 1:13 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

[Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

I've got a store that has three payment methods:

  1. Direct Bank Deposit, sort order 50, no zone restrictions
  2. Check/Money Order, sort order 80, zone restriction, disabled
  3. PayPal Express Checkout, sort order 0, no zone restrictions
    When the payment methods are displayed on the checkout_payment page, Direct Bank Deposit is listed *before *PPEC. If I change the sort order for PPEC to 1, then it properly displays first. If the sort-order for PPEC is 0 or negative, it is improperly shown after the Direct Bank Deposit method.
9 Dec 2015, 1:58 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

When you use a Sort Order greater than 0 on any of the Payment Modules you need a Sort Order on ALL of the Payment Modules that are greater than 0 ... see if that gets them lined up right ...

9 Dec 2015, 5:52 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

Ajeh, if I set the sort-order for PPEC to 1 then it properly sorts as the first payment module in the list.

Are you saying that the special handling of a payment module's sort-order, when set to 0, is WAD (working as designed)?

9 Dec 2015, 6:01 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

Because an array is built, if you do not have a Sort Order on 1 Payment Module when 1 or more does have a Sort Order > 0 then what happens will be:

1 Display orders can be goobered up

2 One Module could overwrite another module as it will be replaced in the Array

So the rule is, when using any of the Modules:
Payment
Shipping
Order Totals

if 1+ module(s) is given a Sort Order > 0 then ALL need to have their own Sort Order > 0 and it must be unique ...

9 Dec 2015, 9:10 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

@Ajeh, it seems like the processing in each of the admin-level ***Modules ***should do a little detective work and, at a minimum, display a warning to the admin user if "the rule" is violated.

@torvista: You did, but I apparently said it better!:P

9 Dec 2015, 10:46 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored

There actually is a warning on at least v154, I did not test all versions, but it only shows when there is an obvious conflict on the modules ...

We will try to look into it further to see if that can be changed to if 1 module has a Sort Order but the others do not the warning will still show ... :lookaroun

29 Dec 2015, 8:59 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.5.5] Payment Methods: Sort Orders 0 and less not honored