Page 179 of 279 FirstFirst ... 79129169177178179180181189229 ... LastLast
Results 1,781 to 1,790 of 2784
  1. #1781
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    263
    Plugin Contributions
    0

    Default Re: One-Page Checkout [Support Thread]

    @lat9
    I am looking into your suggestion of class inheritance. First time to do, and I am confused as to where the new and old class are supposed to meet logically.

    Firstly, I am not sure whether class override means overriding the whole class, or just a subset of its functions. I assume the latter for now in this example.

    Let's say I create new file OnePageCheckoutJP.php and in it have a new class definition to extend your class:
    Code:
    OnePageCheckoutJP extends OnePageChekout
    Then I put only the changed functions, with the same names as in the original OnePageCheckout class, into the new file.

    Then in class autoloader file config.checkout_one.php I would (well, it would be a new file, but just to illustrate the point) add new definitions for loading (CP-1) and instantiation (CP-74):
    Code:
    autoLoadConfig[0][] = array(
        'autoType' => 'class',
        'loadFile' => 'OnePageCheckout.php'
    );
    // new CP-1 loading
    autoLoadConfig[1][] = array(
        'autoType' => 'class',
        'loadFile' => 'OnePageCheckoutJP.php'
    );
    // new CP-74 instantiation
    $autoLoadConfig[74][] = array(
        'autoType' => 'classInstantiate',
        'className' => 'OnePageCheckoutJP',
        'objectName' => 'opc',
        'checkInstantiated' => true,
        'classSession' => true
    );
    
    $autoLoadConfig[75][] = array(
        'autoType' => 'classInstantiate',
        'className' => 'OnePageCheckout',
        'objectName' => 'opc',
        'checkInstantiated' => true,
        'classSession' => true
    );
    In this class override, does the "objectName" remain "opc"? I am confused (easily I may add!).
    You wrote "then the base OPC class will not be loaded", that seems to imply that actually I need to override the entire class rather than just certain functions within the class?

    Any pointers much appreciated.
    Zen Cart 1.5.6c modified to support Japanese language (postage module support work in progress). Upgraded incrementally each version from initial 1.5.5d.

  2. #1782
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    @gernot, you're on the right track!

    First, in the new auto_loader, you'll instantiate your class-override as the 'opc' session value. Since that will occur at CP-74, the instantiation of the base OPC at CP-75 won't occur, since the auto-loader won't overwrite that class if it's already there.

    For the class-inheritance, you're correct ... you'll only provide the methods in your class that are being overridden, with the same names and inputs as the 'base' OPC methods. You might take a peek at my Database I/O Manager as its /admin/includes/classes/dbio/DbIo*Handler.php classes use class-inheritance to provide handler-specific actions while using common/base functions within the DbIoHandler.php class.

  3. #1783
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: One-Page Checkout [Support Thread]

    On the download page I saw Stirpe mentioned at v1.0.7 and v1.0.8
    Do I need to install the Stripe plugin as well?
    Thank you.

  4. #1784
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by keneso View Post
    On the download page I saw Stirpe mentioned at v1.0.7 and v1.0.8
    Do I need to install the Stripe plugin as well?
    Thank you.
    Only if that's what you want to use for payments on your store. OPC doesn't include any additional payment modules in its zip-file.

  5. #1785
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by shags38 View Post
    Hi again Cindy - on both sites that have been upgraded I am now repeatedly getting an PayPal error code 10730 - after checking out going through guest checkout / PayPal and getting to PayPal and clicking pay now I get returned to the guest checkout page (all details still completed) with this error at top of the page;
    "Error 10730 Shipping Address Postal Code Empty - The field Shipping Address Postal Code is required"

    The postcode is completed in the billing address section - the shipping address is same as billing address box is checked (default I assume) - even when I uncheck that box the details shown for shipping are as per billing and includes the postcode.

    I get this error code;

    Code:
    [11-Nov-2019 09:09:29 Australia/Sydney] PHP Parse error:  syntax error, unexpected ',' in /home/admin/public_html/includes/modules/payment/paypalwpp.php on line 2034
    this is the line you modified - not sure if this is relevant but in the email received that line of code was represented as ;
    Code:
    $this->zcLog('ec_step2_finish - 2a*'*, *'*address-creation bypassed based on observer setting.');
          }
    (possibly a character interpretation issue with the email program ??)

    in the forum on the ZC site in the post above it is shown as;
    Code:
     if ($bypass_address_creation) {
              $this->zcLog('ec_step2_finish - 2a', 'address-creation bypassed based on observer setting.');
          }


    I initially used the code in the email but it caused a blank page after clicking checkout - I am now using the code from your post above - resulting in that error.

    For the life of me I cannot figure why it worked first time as I indicated in my post but now wants to throw this error. I have cleared cache and restarted browser.

    cheers,
    Mike
    Was there ever a fix for this? I have a client getting the 10730 error. It seems to be occurring only with guest checkout and when using a credit card to pay on PayPal.

    Zen Cart 1.5.6
    OPC 2.3.4

  6. #1786
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by jeking View Post
    Was there ever a fix for this? I have a client getting the 10730 error. It seems to be occurring only with guest checkout and when using a credit card to pay on PayPal.

    Zen Cart 1.5.6
    OPC 2.3.4
    Jim, since you're using a 'base' zc156 (no alpha-suffix), did you follow the installation/update instructions for that version: https://github.com/lat9/one_page_che...-cart-156-156a

    That identifies additions/changes needed for the older Zen Cart 'core' modules, especially the addition of a notification within the paypalwpp.php module to enable an observer (like OPC's) to instruct the processing to bypass the customer-record creation.

  7. #1787
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    Jim, since you're using a 'base' zc156 (no alpha-suffix), did you follow the installation/update instructions for that version: https://github.com/lat9/one_page_che...-cart-156-156a

    That identifies additions/changes needed for the older Zen Cart 'core' modules, especially the addition of a notification within the paypalwpp.php module to enable an observer (like OPC's) to instruct the processing to bypass the customer-record creation.
    Sorry, typo. ZC is 1.5.6c

  8. #1788
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by jeking View Post
    Sorry, typo. ZC is 1.5.6c
    Try enabling the paypalwpp debug mode. For those PayPal paid orders during guest checkout, you should be seeing
    Code:
    ec_step2_finish - 2a', 'address-creation bypassed based on observer setting.
    in the PayPal-generated logs.

  9. #1789
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    Try enabling the paypalwpp debug mode. For those PayPal paid orders during guest checkout, you should be seeing
    Code:
    ec_step2_finish - 2a', 'address-creation bypassed based on observer setting.
    in the PayPal-generated logs.
    Dang, I just cleared them thinking it would be in one-page logs. I'll watch for more and report back.

  10. #1790
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by jeking View Post
    Dang, I just cleared them thinking it would be in one-page logs. I'll watch for more and report back.
    Actually, having both the PayPal and OPC logs will both help to "read the tea leaves"!

 

 

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR