Jump to content


  • Content count

  • Joined

  • Last visited

Posts posted by jdw814

  1. I'm looking for some add-ons -- and haven't been able to find them on the osC site. I am hoping I am just "blind"... B)


    1. Sometimes, we have a Customer call in who wants us to just process their order while they're on the phone. They're usually willing to provide CC details, etc... Is there an add-on that will allow someone with access to the osC Admin Tools for my website to go to a particular Customer's record and place an order for them -- all the way through Checkout?


    2. The other situation we see a lot is when a Sales Rep is talking to a Customer who is planning to buy in Quantity -- or who simply needs to get a purchase approved with someone higher up in their company before placing the order. Is there an add-on that will allow our Sales Reps to generate a Quote -- with a discount, when applicable -- and email a link to the Customer? (Sometimes, the person who requested the Quote will not be the person who actually places the purchase -- so I would really like the link to contain the information necessary to complete the transaction, no matter what Customer ends up logging in to actually do the Checkout...)


    Any help would be greatly appreciated!!



    Julie Williams

  2. This is very helpful -- and the comment below raises another question...


    I generally start with an existing module for a processor that works the same way as your new processor does.


    Being new to osCommerce -- and having used only a handful of Payment Modules (PayPal Standard, Authorize.net, and COD) -- I'm not sure what would be a good module to start from as an example. The processor I'm trying to write the interface for works much like PayPal, when PayPal is in the mode where the customer is taken to the PayPal site and has to login to complete payment, then is sent back to the original vendor's site when payment is complete.


    Do you have any suggestions on a good payment module to use as a starting example in this particular case? (I'm going to go peruse the osCommerce distribution, just in case I can figure this out on my own... :) )


    Thank you for your help!


  3. Hi,


    I am hoping that someone has some experience here -- and is willing to share it...


    I need to write a Payment Module -- or at least some Mods -- to make osCommerce work with an unsupported payment provider. (GoldKeySecureTransactions)


    Their interface is fairly simple (and I've coded it in HTML/CGI previously) but I am not as familiar with PHP -- and have no idea where I have to "hook in" to the osC code that is already in place.


    Does anyone have some general Payment Module development guidelines? (Like an API?) Or know where I might be able to find the information I need to get started?


    Thank you!


  4. Hi all,


    Okay, we recently got this contribution working for exports to PeachTree 2006 (Accountants Edition). In the process, there was a LOT of debugging and "tweaking" that had to be done. I don't really have the time to put everything we learned into a new version of the contribution (unless it would be for the State tax version only) -- so I thought I would just pass it along here.


    Some of these fixes may not be "elegant", but they work...




    1. Additional Fields:

    (This applies to both osc_export.php and osc_export_batch.php, but I am using approx. line #s from the original osc_export_batch.php.)


    ~Line 91 (between "$ship_to_zip" and "$payment"), insert:

    $ship_to_country = $tabel1['delivery_country'];


    ~Line 98 (after "$source_file"), insert:

    $showfalse = "FALSE";



    ~Line 59, change the "headings" from:

    $output = "Customer ID,Sales Order #,Date,Ship to Name,Ship to Address-Line One,Ship to City,Ship to State,Ship to Zipcode,Ship to Country,
    Accounts Receivable Account,Sales Tax Code,Number of Distributions,So Distribution,Quantity,Item ID,Description,G/L Account,
    Unit Price,Tax Type,Amount,Sales Tax Authority \n";



    $output = "Customer ID,Sales Order #,CRMemo,Date,Ship to Name,Ship to Address-Line One,Ship to City,Ship to State,Ship to Zipcode,Ship to Country,
    Due Date,Terms,Accounts Receivable Account,Sales Tax Code,Number of Distributions,SO Distribution,Quantity,Item ID,Description,G/L Account,
    Unit Price,Tax Type,Amount,Sales Tax Authority \n";


    (The new fields are "CRMemo", "Due Date", and "Terms"... At least in PeachTree 2006, the import will NOT work properly without the "CRMemo" field. The addition of "Due Date" and "Terms" are optional.)



    ~Line 117, change the "common data" to look like the following:

    (I've indicated the new lines, or changes, with comments.)

    $common = $peachtreeaccount.$fieldseparator
    .$showfalse.$fieldseparator // CRMemo addition
    .$ship_to_country.$fieldseparator // corrected from $telephone
    .$date.$fieldseparator // Due Date addition, optional
    .$payment.$fieldseparator // Terms addition, optional




    2. Addition of quote marks around values that might have commas in them -- to prevent "extra", unintended fields in some rows:

    (This also applies to both osc_export.php and osc_export_batch.php -- and I am still using approx. line #s from the original osc_export_batch.php.)


    ~Line 12 (after "$fieldseparator"), insert:

    $fieldquote = '"';


    Then, add "$fieldquote" around any fields that might have commas in the value. Examples below:


    ~Line 164

    .$object[$i]['products_quantity'] . $fieldseparator . $object[$i]['products_model']. $fieldseparator . $fieldquote . 
    str_replace(""","",str_replace("\"","",$object[$i]['products_name'])). $fieldquote . $fieldseparator .$glsalesaccount . 
    $fieldseparator . $fieldquote . number_format($object[$i]['final_price'], 2, '.', ',') . $fieldquote . $fieldseparator . 
    "1" . $fieldseparator . $fieldquote . "-" . number_format($myamount, 2, '.', ',') . $fieldquote .$fieldseparator . "\n";

    (Make the same changes at ~Line 200)


    ~Line 174

    ."0" . $fieldseparator . $fieldseparator . $fieldquote . $freightdescription . $fieldquote . $fieldseparator . 
    $glfreightaccount . $fieldseparator . "0" . $fieldseparator . "26" . $fieldseparator . $fieldquote . "-" . $freight . 
    $fieldquote .$fieldseparator . "\n";

    (Make the same changes at ~Line 211)


    ~Line 185

    ."0" . $fieldseparator . $fieldseparator . $fieldquote . $salestaxdescription . $fieldquote . $fieldseparator .
    $glsalestaxaccount . $fieldseparator . "0" . $fieldseparator . "0" . $fieldseparator . $fieldquote . "-" . $salestax . 
    $fieldquote .$fieldseparator .$salestaxauthority ."\n";





    3. Correcting data exported for items with Qty greater than 1:

    (This also applies to both osc_export.php and osc_export_batch.php -- and I am still using approx. line #s from the original osc_export_batch.php.)


    ~Line 158 (after "$glsalesaccount"), insert:

    $myamount = $object[$i]['final_price'] * $object[$i]['products_quantity'];

    (Make the same change at ~Line 194)


    ~Line 164 change the second reference to

    number_format($object[$i]['final_price'], 2, '.', ',')

    to read as follows:

    number_format($myamount, 2, '.', ',')

    (Make the same change at ~Line 200)




    4. Assigning values to "loop" variables, so that they are consistently accurate:

    (This really only applies to osc_export_batch.php. We were seeing a situation where if one customer ordered 3 items -- and the next one only ordered 1, the second order would be "padded" with the last two items from the previous order. The problem was that variables used in the loop were not being properly reset at the beginning of each loop.)


    ~Line 142

    Changed assignment of "$ii" to read as follows:


    (Note that I am NOT assigning a value to "$no_of_rows" at this point.)


    ~Line 149 removed assignments for "$i", "$ii", and "$h".

    Changed assignment of "$no_of_rows" to read as follows:



    ~Line 169 changed while loop to read as follows:

    while($h<=$ii) {



    ~Line 179, insert following assignment:



    ~Line 189, remove comment codes in front of while loop and changed to read as follows:

    while($h<=$ii) {


    ~Line 199, change:





    ~Line 202, remove comment codes in front of "$h++;" - now need to increment the while loop

    ~Line 203, remove comment codes in front of "}" - now need to end the while loop




    I hope that this information is helpful to someone!


    Best Regards,


  5. Ok. I found the solution to that problem. For anyone else interested in using this module with the batch export, the instructions that include the batch functionality are in the directory for the "County" sales tax option -- but not in the "State" sales tax option.




    Now, I have another issue... :rolleyes:


    I am probably going "blind", but I can't see where in the database the data on how the order was shipped is stored...? (I've looked in all the "orders" tables...) I know it has to be tied to the individual order somehow -- otherwise the system couldn't display it in the Order History -- but I am not finding it. (My accountant has requested I add that information to the export...)


    Knowledgeable assistance would be greatly appreciated!!



    Julie Williams

  6. I've installed this module -- and it seems to be working for individual exports, but I can't find the batch export button. (I just read back over the install instructions, to make sure I didn't miss something -- but I drew a blank...)


    Where is the "Batch Export" button supposed to be located? (Which admin screen?)



    Julie Williams

  7. Alex,


    I did actually try that first. That section of the code for the Order Confirmation email sent by the PayPal Payments Standard module in the original file from the Add On is not working either. (I restored my backup of that file just now, and placed an order -- just to make sure I wasn't remembering incorrectly...)


    The email looks like this:




    Order Number: 59

    Detailed Invoice: http://[mysite]/goldkey/account_history_info.php?order_id=59

    Date Ordered: Wednesday 01 July, 2009




    1 x Evaluation Package - 1 Master, 3 User Tokens (GKPKE3) = $659.00



    Delivery Address


    Julie Testing


    [City], [sT] [Postal]

    United States


    Billing Address


    Julie Testing


    [City], [sT] [Postal]

    United States


    Payment Method




    The missing information should display immediately after the list of products ordered and before the Delivery Address...




    The code in the original, unedited file for this add on reads as follows:

    (includes/modules/payments/paypal_standard.php, Line #515 - 517)

    	  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
    	$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";


    Has anyone run into -- and solved -- this problem? I would be grateful for some assistance. (I am fairly new to osCommerce, but I do have a bit more experience with PHP. Not enough to be considered adept at it, but I manage.)


    Any help would be appreciated.


    Thank you!


  8. Hi all,


    I have the PayPal Payments Standard add-on working on my site -- except for one annoyance.


    The Order Confirmation that goes to the Customer does not include the Sub-Total, Shipping, Tax & Total.


    I am guessing I have a syntax error of some kind, but I cannot see it.


    Below is a piece of the code I'm using: (paypal_standard.php)


      $email_order = "Dear " . $order->customer['firstname'] . ",\n\n" .
     				 "Thank you for your recent " . STORE_NAME . 
    			 " purchase!  You will find a complete summary of your order below.\n\n" .
     				 "If you have any questions, please call us at: " . $use_phone . " or email us at: <a href='mailto:" .
     				 "Regards,\n" .
     				 STORE_NAME . "\n\n" . 
                    EMAIL_SEPARATOR . "\n" . 
     				 "Order Summary\n" .
                    EMAIL_SEPARATOR . "\n" . 
                    EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .
                    EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" .
                    EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . 
    			 	$order_id, 'SSL', false) . "\n\n";
     if (is_object($$payment)) {
    $payment_class = $$payment;
       $email_order .= EMAIL_TEXT_PAYMENT_METHOD . ": " . $payment_class->title . "\n\n";
       if ($payment_class->email_footer) { 
         $email_order .= $payment_class->email_footer . "\n\n";
     for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
       $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
     if ($order->content_type != 'virtual') {
       $email_order .= "\n" . EMAIL_SEPARATOR . "\n" . 
     				    EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . 
                       EMAIL_SEPARATOR . "\n" .
                       tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n\n";


    The part that doesn't seem to be working is:

     for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
       $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";




    But that same section of code works just fine in the non-PayPal Order Confirmation Email. It generates data like the following:


    Sub-Total: $1,834.00

    United Parcel Service (1 x 3.3lbs) (3 Day Select): $9.34

    MO TAX 7.35%: $134.80

    Total: $1,978.14




    Does anyone know what I can do to fix this? (Or where to point me to find the answer...?)


    Any help would be greatly appreciated!