Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2006
    Posts
    10
    Plugin Contributions
    0

    Default Problem with array on ot_tax ? and other problems

    Is use a php 5 version and array handling seems to be different to version 4. I already had to enter type conversion for the array_merge function, but now on returning from paypal express checkout I get this error:

    Warning: reset() [function.reset]: Passed variable is not an array or object in C:\htdocs\http://www.drehmahl.eu\shop\includes...tal\ot_tax.php on line 38

    Warning: Variable passed to each() is not an array or object in C:\htdocs\http://www.drehmahl.eu\shop\includes...tal\ot_tax.php on line 39

    The problem occures in the process-function:

    Code:
     function process() {
          global $order, $currencies;
    
          reset($order->info['tax_groups']);
          while (list($key, $value) = each($order->info['tax_groups'])) {
            if ($value > 0 or STORE_TAX_DISPLAY_STATUS == 1) {
              $this->output[] = array('title' => $key . ':',
                                      'text' => $currencies->format($value, true, $order->info['currency'], $order->info['currency_value']),
                                      'value' => $value);
            }
          }
        }
    Any help is very welcome.

  2. #2
    Join Date
    Dec 2006
    Posts
    2
    Plugin Contributions
    0

    Default Re: Problem with array handling in new PayPal Express Payment Method

    Take a look here:
    http://www.zen-cart.com/forum/showthread.php?t=54728

    They're discussing the issue. Seems like a clean install could help. I'm in the same boat.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Problem with array handling in new PayPal Express Payment Method

    You might also grab the update I posted here:
    http://www.zen-cart.com/forum/showth...246#post309246
    and see if using it provides any relief to the problems you're reporting.

    Feedback would be welcome -- with some more testing feedback, we'll be publishing a new zip with this included.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Aug 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Problem with array on ot_tax ?

    Thanks, I used the file and I did not have the error with the ot_tax.php file any longer.

    BUT

    as described before there is still a change in behavior of the array_merge function in php 5 (see http://be.php.net/array_merge) so I used the follwoing code in line 1515 of paypalwwp.php:

    Code:
        // debug
        $this->zcLog('ec_step1 - 2 -submit', print_r(array_merge((array)$return_url, (array)$cancel_url, (array)$options), true));
    as otherwise I got an error that item #1 and #2 are no arrays.

    By the way. There is no error message any longer, but express checkout still does not work. I think it is because I do have a German and a Belgium paypal account, but no North American one. Any time I return form Paypal I enter the order process in step 1 (or get to split login if not logged in) and on step 2 (payment) I have to enter a payment option of my other two paments (paypal ipn and eurotransfer), but no express checkout....

    But, thanks anyway.

    Best regards
    Dieter Brandenburger

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Problem with array on ot_tax ?

    Dieter,
    Thanks for the feedback on the array_merge() issue vs PHP 5. It's been corrected for the next release.

    As to your other problem ... when you return from PayPal and are sent back to a login page, can you please look at your PayPal debug logs and post the data to/from PayPal for the "GetExpressCheckoutDetails" transaction? (this initiates upon return from PayPal, and plays a part in determining what page you get sent to).

    You can turn on debug logging in the module's settings in Zen Cart admin.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2006
    Posts
    10
    Plugin Contributions
    0

    Default Re: Problem with array on ot_tax ? and other problems

    Hi,

    thanks for your help. I turned debug on and as I aspected, it is only a regional problem. Here is the text:

    Message: We are sorry for the inconvenience; however, at the present time we
    are unable to use PayPal to process orders from the geographic region you
    selected as your PayPal address. Please continue using normal checkout and
    select from the available payment methods to complete your order.


    If you still need more, let me know.

    Dieter

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Problem with array on ot_tax ? and other problems

    That message appears if you have configured your PayPal module to be restricted to a certain zone, but the address you selected for shipping while on the PayPal site doesn't fit within the zone restrictions you've imposed within Zen Cart.

    Try editing your PayPal Express Checkout module in Zen Cart Admin and change:
    Payment Zone
    to:
    --none--

    Then try another express checkout transaction.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Problem with editing coupons and other items
    By ryakub in forum General Questions
    Replies: 0
    Last Post: 1 Dec 2009, 10:39 PM
  2. Homepage works, other pages give 404 - problem with SEO mod and rewrite rules
    By Nimbuz in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 20 Jan 2008, 02:07 PM
  3. Problems with other modules and languagepacks
    By Llorakh in forum Addon Language Packs
    Replies: 1
    Last Post: 11 Nov 2007, 11:53 AM
  4. Shipping, Payment and Order total modules problems with other languagepacks
    By Llorakh in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Nov 2007, 07:17 AM
  5. Problem with ot_tax.php
    By superprg in forum General Questions
    Replies: 2
    Last Post: 18 Apr 2007, 05:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg