Results 1 to 5 of 5

Fatal Error at checkout - related to gift voucher contrib

This is a discussion on Fatal Error at checkout - related to gift voucher contrib within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I have just installed the gift voucher/credit class contribution, and thought that it was all going well. I can create ...

      
  1. #1
    New Member
    Join Date
    Apr 2005
    Posts
    8
    Rep Power
    0


    Default Fatal Error at checkout - related to gift voucher contrib

    I have just installed the gift voucher/credit class contribution, and thought that it was all going well. I can create gift vouchers/discount codes in my admin suite, and the shop hasn’t broken down either. I tried to test purchasing an item as the shopping cart pages have been fairly modified – I get as far as the payment method page (checkout_payment.php), where I can enter credit card details/or select using a cheque/money order. But, when I click “redeem” (with a gift code) or click “continue” to confirm the order I get Fatal Error messages (on the checkout_confirmation.php page).

    This is the error message with the cheque/money order module enabled:

    Fatal error: Cannot redeclare class moneyorder in /home/readingniguk/public_html/catalog/includes/modules/payment/moneyorder.php on line 13

    This is error message with the cheque/money order module removed (leaving just credit card as an option):

    Fatal error: Cannot redeclare class cc in /home/readingniguk/public_html/catalog/includes/modules/payment/cc.php on line 13

    Different error message – but same line 13 – and same redeclaring of class problem.

    Is it something to do with you cant parse the same file at the same time or something? Is the above problem easy to identify or solve / work around?

    I have a delivery date picker, Product Attribute text input, Purchase without account, STS and X-sell contributions all installed. But I didn’t think they’d conflict – none of the modified code was ever in the same place.

    Please advise!!!! Many Thanks in advance!

    Happy to post code or send pages if anyone can help.

  2. #2
    Member
    Join Date
    Mar 2003
    Posts
    77
    Rep Power
    0


    Default RE: Fatal Error at checkout - related to gift voucher contri

    I hate to tell you, but this GV/Coupon thing seems riddled with bugs and issues. It has also been added to osCMax 2.0, and... what a mess.

    Today I am going to go through as much of it as I can, and fix the bugs that have been reported...

    Um, about your problem, it looks like your code is loading the payment.php class twice... not sure how, but that is what it looks like.

    --gabe

  3. #3
    New Member
    Join Date
    Jun 2005
    Location
    St Albans, UK
    Posts
    24
    Rep Power
    0


    Default

    Does anyone have a clue what is causing this?

    I am getting it and I know the reason in my case but not the cure.

    I have just moved my installation from /catalog to / on my server (wel actually I have moved the virtual root of the server to point at /catalog.

    I am now getting this message on checkout and in the admin / modules screen.

    I have changed includes/configure and admin/includes/configure.

    In includes I have :
    define('DIR_WS_HTTP_CATALOG', '');
    define('DIR_WS_HTTPS_CATALOG', '');

    in admin/includes I have:-
    define('DIR_FS_DOCUMENT_ROOT', 'somepath/catalog/'); // where the pages are located on the server
    define('DIR_WS_ADMIN', '/admin/'); // absolute path required
    define('DIR_FS_ADMIN', '/somepath/catalog/admin/'); // absolute pate required
    define('DIR_WS_CATALOG', '/'); // absolute path required
    define('DIR_FS_CATALOG', '/somepath/catalog/'); // absolute path required

    This is a little more complicated. I have moved the root for my servers path from /somepath to /somepath/catalog (thus avoiding having to physically move any files). So 'catalog/' has been taken out of my virtual paths but added in to the physical ones. Does this make sense? Admin seemse to be working ok in the main (I could not sign on until I made the edits DIR_WS_ADMIN edits, and FCKeditor would not work until I changes the /somepath/catalog paths).

    What have I done wrong.

    I have taken orders fine with this module before.

  4. #4
    Member
    Join Date
    Mar 2003
    Posts
    77
    Rep Power
    0


    Default

    First, what is the error?

    Second:

    These:

    define('DIR_WS_HTTP_CATALOG', '');
    define('DIR_WS_HTTPS_CATALOG', '');

    Should be this:

    define('DIR_WS_HTTP_CATALOG', 'http://www.your-domain.com');
    define('DIR_WS_HTTPS_CATALOG', 'https://www.your-domain.com');

    and all the other defines:

    define('DIR_WS_ADMIN', '/admin/'); // absolute path required

    Should NOT start with '/', in other words, the above should be 'admin/' instead of '/admin/'

    --gabe

  5. #5
    New Member
    Join Date
    Jun 2005
    Location
    St Albans, UK
    Posts
    24
    Rep Power
    0


    Default

    Oops, bit of a Red Herring.

    I had also edited the includes/languages/english/modules/payment/moneyorder.php to de-americanise some of the text and stop the payment message sounding quite so distrusting of customers.

    I then managed to copy the local includes/modules/payment/moneyorder.php over the languages/english version so it probably was trying to define itself twice. Now fixed by re-sending the local version.

    Thanks for listening!

Similar Threads

  1. Gift Voucher error returning from PayPal
    By kenlyle in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 11-10-2005, 07:47 AM
  2. Checkout Problem - Gift Voucher Coupon Zero 0 no balance
    By kenlyle in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 11-07-2005, 08:53 AM
  3. Anyone he;p with errors installing the gift voucher contrib?
    By obscure in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 10-12-2004, 07:56 AM
  4. Gift Voucher checkout
    By harpon in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 07-30-2004, 12:00 PM
  5. Help! Error message during checkout related to shipping
    By hittlehottle in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 04-28-2004, 08:38 AM

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
  •