Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Gazonice

Members
  • Content count

    92
  • Joined

  • Last visited

Everything posted by Gazonice

  1. Gazonice

    Request Product Reviews

    Another potential fix for blank emails when the script is run by a CRON Job is to change the line: $text_file = basename ($PHP_SELF, ".php") . '.tpl'; to: $text_file = 'review_mail.tpl'; Assuming the template file resides in the same folder as the script and the filename has not been changed. This fixed my problem completely. Garry.
  2. Thanks but I sorted it. Garry
  3. Hi, I hope someone can help me on this one: My hosting won't allow access to the lib folder or install any executable files on the shared server, php exec() is blocked by the firewall... changing hosting providers is not an option and I suspect any good hosting company will be tightening up their 'defences' in the coming months / years. So I looked for the alternative php version of the HSBC module but the links on this forum no longer work: http://www.downhomeconsulting.com/Downloads/downloads.php. What I did do was find an HSBC module from another shopping cart solution that does use a php class to generate the order hash from here: http://www.ecartservice.net/01012009/hsbc-cpi-payment-module/ I downloaded the file and took out orderHash.php and put it into the Oscommerce modules/classes folder. This orderHash.php script I found looks very similar to yet another one that I found here: http://www.davebarnes.co.uk/blog/2010/02/hsbc-php-cpi-integration-without-installing-software/ so I assume they both work fine. I am getting a hash generated but it isn't matching the HSBC hash, I know all the other fields are being sent to HSBC correctly because I phoned HSBC and asked them the status of the test orders - they said all the data was fine except for the matching hash codes. Obviously to get this far I had to modify modules/payment/hsbc.php to use the php class script (orderHash.php) instead of the OrderHash.e with libCcCpiTools.so and this is where my php strength fails: I made 2 changes to hsbc.php: Added: include(DIR_WS_CLASSES . 'orderHash.php'); and changed: //Function to generate a hash to perform the POST or to check received parameters function getHash($fields) { $cmd=""; reset($fields); while(list($k,$v)=each($fields)) { $cmd.=" \"$v\" "; } //Path where the TestHash.e executable is located $path='/home/sites/domain.co.uk/public_html/includes/modules/payment'; putenv("LD_LIBRARY_PATH=$path"); //Executes the TestHash to get the hash $cmd="$path/TestHash.e \"".MODULE_PAYMENT_HSBC_HASH."\" $cmd 2>&1"; $ret=exec($cmd, $output); $ret=split(':',$ret); //Returns the hash $hash=trim($ret[1]); return($hash); } to: //Function to generate a hash to perform the POST or to check received parameters function getHash($fields) { $cmd=""; reset($fields); while(list($k,$v)=each($fields)) { $cmd.=" \"$v\" "; } $cmd.=" 2>&1"; //Path where the TestHash.e executable is located //$path='/home/sites/domain.co.uk/public_html/includes/modules/payment'; //putenv("LD_LIBRARY_PATH=$path"); //Executes the TestHash to get the hash //$cmd="$path/TestHash.e \"".MODULE_PAYMENT_HSBC_HASH."\" $cmd 2>&1"; //$ret=exec($cmd, $output); $ret = generateHash($cmd, MODULE_PAYMENT_HSBC_HASH); //$ret=split(':',$ret); //Returns the hash $hash=$ret; return($hash); } I really am not sure if I have altered this correctly to get the correct hash from the php class so I would appreciate any help or assistance anyone could provide in getting this alteration correct. If this can be achieved it means we can create an HSBC module that works entirely in PHP which could be made available without the need to install executable files. Thanks in advance for your help, Garry.
  4. Gazonice

    CSS Menu

    Hi, I would like to split the sort orders on the menu so that the Top Level Categories sort alphabetically, but the Sub Categories sort by sort_order. Does anyone know how I would achieve this? Many Thanks, Garry
  5. Gazonice

    Two sort orders

    Oops. posted in wrong area by mistake ! sorry
  6. Gazonice

    Offical Google Checkout module for osCommerce Support Thread

    I gave up in the end and bought the solution by Graith Internet - which works like a charm ! Garry
  7. Gazonice

    Offical Google Checkout module for osCommerce Support Thread

    Hi, The path has to be wrong: (/home/sharpweb/public_html/shop/googlecheckout//includes/languages/english/modules/payment/googlecheckout.php Try replacing this code in googlecheckout.php (line 43 on...) require_once(DIR_FS_CATALOG .'/includes/languages/'. $language .'/modules/payment/googlecheckout.php'); require(DIR_FS_CATALOG .'/googlecheckout/shipping_methods.php'); require(DIR_FS_CATALOG .'/googlecheckout/shipping_methods_ccs.php'); with: require_once('/home/sites/[website address here]/public_html/includes/languages/english/modules/payment/googlecheckout.php'); require(DIR_FS_CATALOG .'/shipping_methods.php'); require(DIR_FS_CATALOG .'/shipping_methods_ccs.php'); This may fix the problem as it has for me. 'sites' might need to be 'sharpweb' in your specific case. Garry
  8. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi Joe, Nice one ! I don't suppose you know how I might replace the hard coded email address with store_owners_email_address in complete.php ? take: $Message2 .= "Congratulations!\n\nA successful order has been added to your shopping cart.\n\nOrder Number = $cid\n\n$custname\n$custaddress\n$custcity\n$custpostcode\n\nOrder Processed: $custdate\n\nThis order will be in your cart admin panel under PENDING\n\nhttp://www.admin_domain.com\n"; mail ("sales@admin_domain.com","SUCCESFUL EPDQ Transaction", $Message2, "From: Shopping Cart \nReply-To: \nX-Script-Author: GB\nX-ip:$REMOTE_ADDR\nX-Mailer: PHP/" . phpversion()); and take out the hard coded email address and replace it somehow with this: ' . STORE_OWNER_EMAIL_ADDRESS . ' Thanks if you can help, Garry
  9. Gazonice

    Urgent Help Needed with ePDQ Payments

    I don't think I like Barclays system much but my client was already a Barclays customer and felt compelled to use them. The epdq mod I have done works like this: The Customer selects their products goes to payment section, there the order is stored in the tables and status set to pending and stock deducted. If the customer continues shopping and comes back to the payment page the old order is marked as 'aborted' and a new order is stored in the tables. Customer goes to epdq makes their payment: If it succesful, complete.php changes status to 'pending' and sends 2 emails; 1 to client with their details (but not the full order) and 1 to the store owner. If it is declined complete.php sets the status to 'declined' and notifies the store owner. The customer never sees 'pending' or 'aborted' orders in their history, only 'pending', 'processing', 'despatched' or 'declined' orders - this is to keep things tidy from the customers end. 'Pending' and 'aborted' orders can be deleted through the admin panel re-stocking the products if neccessary. In all, a pretty good compromise from a crap system (epdq). I think that once complete.php was able to pull in order_id, from there you could generate a full order email but I couldnt be bothered. The cart might not be stocked if you visit but... http://www.incar-emporium.com/index.php Thanks for your guidance guys, it helped although I have been through a fast, steep upward learning curve. Garry
  10. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi, Thanks for that... What happens to your system if the customer does not press the continue button whilst they are at Barclays EPDQ? Is the order still stored? Regards, Garry
  11. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi, I couldn't work out how to send the actual order emails from complete.php but I did manage to get it to send a custom confirmation email which is adequate. It also sends a pass or fail email to the store owner. Thanks for your guidance. Regards, Garry
  12. Gazonice

    Urgent Help Needed with ePDQ Payments

    OK, Iv'e managed to throw together some bits of code to clear the basket when cpi/complete.php gets the OK from Barclays: if($status == "Success") { $selstr4 = "SELECT * FROM orders WHERE orders_id='$oid'"; $check_query = tep_db_query($selstr4); $status = tep_db_fetch_array($check_query); $cust = $status['customers_id']; $selstr5 = "DELETE FROM customers_basket WHERE customers_id ='$cust'"; $check_query = tep_db_query($selstr5); $selstr6 = "DELETE FROM customers_basket_attributes WHERE customers_id ='$cust'"; $check_query = tep_db_query($selstr6); } My next question is am I going in the right direction for asking complete.php to send the order emails too? Many thanks, Garry
  13. Gazonice

    Urgent Help Needed with ePDQ Payments

    OK, Thanks for that, could you tell me how I might get the 'customers_id' into complete.php? I have it in mind to do this: $selstr3 = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '$???'"; tep_db_query($selstr3); $selstr4 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '$???'"; tep_db_query($selstr4); But I am not sure where the Customer_id is located or what it looks like? Kind Regards, Garry
  14. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi, If I was clever enough I'd get complete.php to do it, but I just don't know enough about php - I'm pretty much bungling my way through this as it is! I have had checkout_confirmation.php empty the cart as soon as its loaded, and because the order is stored already there is no problem with this, except, if the customer decided they want to go back and add more items to their cart - they will find it's already been emptied. If I could keep the cart contents intact until at least they press the 'confirm' button the whole buying process would be better, unless they use 'back' from Barclays in which case it's tough luck and they would have to re add their contents. I guess I am asking if it's possible to add an 'onClick' type of event to the 'confirm' button that simply resets the cart before submitting the form? Many thanks, Garry
  15. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi, Thanks for the help so far - very much appreciated. Because I am working on a cart with shared ssl, and there is every likely hood that customers won't use continue and it seems almost impossible to recover the session to complete the sale, I have modified the epdq cont: 1) When a customer makes an order and selects the payment method (epdq being the only one available at present), epdq.php now adds the order to the dBase, deducts the stock and sets the status as PENDING [EPDQ]. 2) If the customer adjusts their order or selects a different pay method, the temp_order is no longer deleted, but has it's status set to ABORTED [EPDQ] - this gives the store owner the chance to delete the order and re stock the product (re stock selected by default now). 3) If Barclays Decline the transaction, the order status is set to DECLINED (via cpi/complete.php) and again the store owner has the chance to delete the order and restock the product. Because I am working on the basis the customer will not be logged in when (and if) they return to the cart, I am redirecting them to index.php - if they want to check their order, they simply log back in. The help I need is on checkout_confirmation.php: I simply need to know how to get the form to empty the cart before sending the customer on to Barclays? <?php if (isset($$payment->form_action_url)) { $form_action_url = $$payment->form_action_url; } else { $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); } echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n"; ?> is there a way to add in $cart->reset(true); when the button is hit? Kind Regards, Garry
  16. Gazonice

    Urgent Help Needed with ePDQ Payments

    Hi, Thanks. I have changed customer_notified to 1 and this works OK. I have added 2 lines to reset the cart and send the email, but my knowledge is very limited and I am not sure if I have done this correclty. I would appreciate it if someone could have a look and see what i have done wrong: Many Thanks, Garry if($status == "Success") { $new_status = 1; // [SEE HERE] Depends on your status setup } else { $new_status = 5; // [SEE HERE] Depends on your status setup } $selstr2 = "UPDATE orders SET orders_status = '$new_status', last_modified = NOW() WHERE orders_id = '$oid'"; //Make new insert into status history $sql_data_array = array('orders_id' => $oid, 'orders_status_id' => $new_status, //4 is Awaiting Card Transaction 'date_added' => 'now()', 'customer_notified' => '1', 'comments' => $order->info['comments']); tep_db_perform('orders_status_history', $sql_data_array); // tep_db_query($selstr); $result = mysql_query($selstr, $link); //Update order status to payment received but only if transaction status is success if($status == "Success") { $result2 = mysql_query($selstr2, $link), // Added 2 new lines to reset cart and send email ? $cart->reset(true), $customer_notification = (SEND_EMAILS == 'true') ? '1' : '0'; } else { $result2 = "Not updated, transaction not successful. Please follow up."; }
  17. Gazonice

    Urgent Help Needed with ePDQ Payments

    HI, I have installed the EPDQ on a cart that uses shared ssl. All goes well until the client (assuming they feel inclined to) presses the EPDQ Continue after payment is collected: The return URL has lost the session. This is not a problem since all they need do is log back in, but my question is: Is there any code that would enable complete.php to send the order email, update the status to customer notified and reset the basket - in the event of a successful process: Can some of the code above be used? Glad of any help... Kind Regards, Garry
  18. Gazonice

    HTMLArea v3.0

    Hi, Great contribution ! Did anyone actually manage to set the cont. to apply to ONLY ONE textarea on a page instead of using HTMLArea.replaceAll()" ? if so, i could really use your valued help! Also, does anyone know how to set the default values? e.g. setting text size to start at 10, Arial etc etc... ? Any help would be most appreciated. Thank You, Garry
  19. Gazonice

    PAYSYSTEMS GOES BUST

    Hi, I've just paid out for Worldpay. A bit expensive but still cheaper than the banks. WorldPay was helpful enough, I asked them a few questions and they answered them fully. I decided to go with them because I can?t do with all this messing about of Processors going bust or losing their gateway etc. and now at least I have credit and debit cards all in one place. Regards to all, Garry
  20. Gazonice

    PAYSYSTEMS GOES BUST

    Hi, I had a look at 2CO ? it?s a good system but I don?t think it?s ideally suited for GBP as a default since the buyer has to select his currency at purchase time and it?s then converted from USD. Has anyone found a system like Paysystems - where we can work in GBP directly - other than that incredibly expensive Worldpay outfit? Garry (UK)
  21. Gazonice

    PAYSYSTEMS GOES BUST

    Hi, I didn't even get the notices from Paysystems - but they have sent me the last settlement payout - so that?s good. I understand they may be keeping the holdback fund up to 6 months. If I can't get information out of them I'll have to watch this 'space here' - lol. Cheers for this posting Aus911 - Or I would till be in the dark! Gaz
  22. Hi, Ive just added this mod to MS2 and so far so good, except when Validation is on.. it's rejecting every card number as not being accepted by us, when in fact I have enabled every type of card. Have you experienced this? Garry
  23. Hello, I have installed this module (which is excellent (I think)) but, I cannot get it to accept any numbers when the verification is on. Simply gives one of the error messages. When verification is off, its excellent ! It's on a Fresh Install of MS2.2 + minor changes as in this forum. Has anyone else had this problem and been able to resolve it? Regards, Garry
×