Page 3 of 14 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 140
  1. #21
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    I installed the credit module and I got the error quoted below. Does anyone know how to solve this error?


    Quote Originally Posted by thebaldknight View Post
    HI all anyone know what would be wrong with this store credit modual? I get this error:

    Warning: main(/home/xxxxx/public_html/includes/languages/english/modules/order_total/ot_sc.php) [function.main]: failed to open stream: No such file or directory in /home/xxxxx/public_html/admin/modules.php on line 174

    Warning: main(/home/xxxxx/public_html/includes/languages/english/modules/order_total/ot_sc.php) [function.main]: failed to open stream: No such file or directory in /home/xxxxx/public_html/admin/modules.php on line 174

    Warning: main() [function.include]: Failed opening '/home/xxxxx/public_html/includes/languages/english/modules/order_total/ot_sc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/applecor/public_html/admin/modules.php on line 174

    Thanks

  2. #22
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    I solved the errors I had by doing this:

    tpl_store_credit.php needs to be moved from
    /includes/templates/template_default/
    into
    includes/ templates/template_default/sideboxes/

    ot_sc.php is used twice. (not the same file content)
    It is in the download as:
    /includes/modules/order_total/ot_sc.php

    In post #17 of this thread xtremeimpulse created the other ot_sc.php needed and put it into /includes/lanquages/modules/order_total/.
    But it should be put into /includes/modules/order_total/. (not in /languages)

    Anyway I made those changes and it seems to work at least through step2 of checkout.

  3. #23
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Using the information supplied by posts #17 and 22, (and a bit of tweaking) I believe I've been able to work out the issues with this very useful module.

    First, as stated in post #22, the tpl_store_credit.php was misplaced in the original download. Rather than includes/templates/template_default/, it needs to be placed in includes/templates/template_default/sideboxes/.

    Secondly, as xtremeimpulse mentioned in post #17, a second ot_sc.php file is needed. However, there was a bit of a glitch in that suggested code.
    The following, saved as ot_sc.php and placed in includes/languages/english/modules/order_total/, did the trick for me:
    PHP Code:
    <?php


    /* Start Store Credit Order Total Module */
    define('MODULE_ORDER_TOTAL_SC_TITLE''Store Credit');
    define('MODULE_ORDER_TOTAL_SC_HEADER''Store Credit');
    define('MODULE_ORDER_TOTAL_SC_DESCRIPTION','Your balance is');
    define('MODULE_ORDER_TOTAL_SC_USER_PROMPT','Prompt ');
    define('MODULE_ORDER_TOTAL_SC_SORT_ORDER','Sort Order');
    /* End Store Credit Order Total Module */
    ?>
    Kath, (funtimesx) thanks for a terrific module!!

    Tim

  4. #24
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Quote Originally Posted by MeltDown View Post

    Secondly, as xtremeimpulse mentioned in post #17, a second ot_sc.php file is needed. However, there was a bit of a glitch in that suggested code.

    Tim
    What was the glitch? Did it cause a problem? The code he suggested worked for me, now I wonder if there is a hidden problem?

  5. #25
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Quote Originally Posted by gonewild View Post
    What was the glitch? Did it cause a problem? The code he suggested worked for me, now I wonder if there is a hidden problem?
    When I created the php page using that example exactly, an extra "<?" disabled the script. Simply removing it, as in my example above, gave me the green light.

  6. #26
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Quote Originally Posted by MeltDown View Post
    When I created the php page using that example exactly, an extra "<?" disabled the script. Simply removing it, as in my example above, gave me the green light.
    Strange when I changed it to your script it did not work, changed back and it worked again.

    But now I have a checkout error. After clicking confirm order this error appears and the checkout process stops but the credit card is charged:

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customer_id=1' at line 1
    in:
    [update sc_customer set amount = amount - where customer_id=1]


    Any help solving this error will be appreciated!

  7. #27
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    I removed this:

    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

    from Line 58 in /admin/store_credit.php and now everything seems to work.

    Does removing that line cause some other problem?

  8. #28
    Join Date
    Apr 2005
    Posts
    150
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Now another error.

    When the customer has a credit due everything works fine.
    But when the customer does not have credit this error occurs after clicking confirm order.

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customer_id=1' at line 1
    in:
    [update sc_customer set amount = amount - where customer_id=1]

  9. #29
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Quote Originally Posted by gonewild View Post
    Now another error.

    When the customer has a credit due everything works fine.
    But when the customer does not have credit this error occurs after clicking confirm order.

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customer_id=1' at line 1
    in:
    [update sc_customer set amount = amount - where customer_id=1]
    Yes, I'm getting exactly the same error. In fact, because of other more pressing site issues I've removed the SQL completely and abandoned this module for the time being. It seems the module originator may have backed out and since there isn't enough other forum traffic to help resolve some of these problems, it isn't worth having it installed.
    It's a shame because I think it could be a very useful module for many people but I just don't have the php expertise to work out these problems without some guidance.
    I hope down the road interest will be peaked and the thread will be brought back to life.

  10. #30
    Join Date
    Apr 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Store Credit Module

    Well, I have it working after some tweaking. The only thing i can suggest for the above sql problem is in the ot_sc.php module in order_totals you might try someting like this

    function get_user_balance(){
    global $db;
    if(isset($_SESSION['customer_id'])){
    $check_query = $db->Execute("select amount from " . TABLE_STORE_CREDIT . " where customer_id = ".$_SESSION['customer_id']);
    $amount = $check_query->fields['amount'];
    return $amount;
    }else{
    $amount = 0;
    }
    }

    This may not work. I honestly can't remember what I did to fix the issue earlier lol. Sorry. If this doesn't work and I remember for sure I will post it. At this point its been a long night.

    WHAT I REALLY NEED FOR THIS DEAL TO DO IS allow the customer to select how much of the credit they want to use. If anyone knows how to do that I would really appreciate it. I will continue working on this option myself but any input would be great.

 

 
Page 3 of 14 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Store credit and reward point module
    By yellow1912 in forum Addon Payment Modules
    Replies: 170
    Last Post: 19 Mar 2021, 03:17 PM
  2. Replies: 0
    Last Post: 11 Mar 2010, 04:39 AM
  3. Replies: 2
    Last Post: 24 Jun 2008, 11:07 PM
  4. Replies: 1
    Last Post: 16 Mar 2008, 12:58 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR