Jump to content

tslin

Member
  • Posts

    8
  • Joined

  • Last visited

About tslin

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

tslin's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hello all, I just updated to WHMCS 5.3.3 from 5.2.15 and I'm getting this error "Invalid filename for redirect: id=xxx" when my clients upgrade/downgrade configuration options after payment method was chosen and "Click to continue" button is clicked. Both "PayPal" or "Offline Credit Card" have same problem. When the problem occured, URL display is "http://www.mysite.com/upgrade.php?step=4". Please help. It is urgent. Or is there a way I can downgrade whmcs to previous release (5.2.15). Thanks in advanced!
  2. Hello everyone, My requirement is that let's say I have one configuration option called "personal computer" which is text box. User will fill 1, 2, 3, etc... When they check out ("Click to Continue" button), I need to check one value from my another site by calling web service. Eg. If they fill 3 and result from another site is less than 3, they cannot check out. My problem is I don't know whether there is a hook that run before user can checkout. I had tried following hooks but still can't find the solution. 1) ShoppingCartValidateProductUpdate, 2) ShoppingCartValidateCheckout 3) ShoppingCartValidateProductUpdate 4) ShoppingCartValidateCheckout 5) PreShoppingCartCheckout 6) PreCalculateCartTotals Most of them are not working, or, I don't know when will they fire. Please help me. Is this possible to achieve? Or is there any work around to achieve this? Thanks in advanced tslin
  3. hi, When i make api call to "addorder" when creating order into WHMCS, I found there are "noinvoice" and "noemail" options to supress creating invoice and sending order confirmation eamil for that order. ref: http://docs.whmcs.com/API:Add_Order Where can I change those options in WHMCS not by calling API and parsing parameters? Their default value is "true"? I can't find them under "Setup". Thanks in advanced.
  4. Hi, Is there any way to intercept the process from hook function? For example, I have a hook function at hook point "AcceptOrder" - Runs when the accepting the order through the Admin Area or API. In there, I check some data status from other site. If the status from other site is "Deny", I want to stop accepting order. I tried adding "return false" to the function. But it didn't work and order was accepted. WHMCS allowed us to do such things? Thanks in advanced!
  5. Thanks for the reply. But unfortunately, that hook didn't run when I make payment
  6. Hi, Is there any hook point that run after addon was paid? "AddonActivation" hook run on both (1) after order was accepted and (2) after order for addon was paid. This means my addon was activated even after the order was accepted while it was not paid yet. I want to have a hook that only run after number (2). Or is there any workaround to achieve this? Thanks in advance!
  7. Thanks for the response Pixelior I tried adding "require("init.php");" But I got "500 Internal Server Error". I think "init.php" should use only when creating pages. My "Sample.php" is not a page.
  8. I recently upgraded my whmcs version from 5.0.3 to 5.2.3. I'm having a problem with "dbconnect.php" to execute a sql statement. Following is the code in my Sample.php file located at whmcs_dir/Service directory. This file was used to call whmcs APIs from my site via HttpWebRequest. --------------------------------------------------- if( isset($_POST) ) { if( $_POST["action"] == "addorder") { // codes to call whmcs addorder api goes here and order was successfully saved into whmcs database. // after saving order, i need to execute one sql statement to meet with my project needs. $SQL = "UPDATE tblhosting SET username='xxx', domain='xxx' WHERE orderid=123"; ExecuteQuery($SQL); } } function ExecuteQuery($SQL) { define("CLIENTAREA", true); require("../dbconnect.php"); require("../includes/functions.php"); require("../includes/clientareafunctions.php"); $result = mysql_query( $SQL ) or die (mysql_error()); } --------------------------------------------------- In ExecuteQuery(...) function, after line 2 - require("../dbconnect.php"); , I got the error "Down for Maintenance (Err 2) An upgrade is currently in progress... Please come back soon ... ". Complete html codes returned to my HttpWebRequest is: <div style="border: 1px dashed #cc0000;font-family:Tahoma;background-color:#FBEEEB;width:100%;padding:10px;color:#cc0000;"><strong>Down for Maintenance (Err 2)</strong><br>An upgrade is currently in progress... Please come back soon...</div> I also tried with whmcs SQL helper function as follow but got the same result. $table = "tblhosting"; $update = array("username"=>"xxx","domain"=>"xxx"); $where = array("orderid"=>"123"); update_query($table,$update,$where); --------------------------------------------------- In WHMCS faq, this error occurs because of version mismatch between server files and database. But strange thing is that if I take out the line - require("../dbconnect.php"); from function "ExecuteQuery(...)" and put before calling that function, it works fine. So, I don't think this is because of version. $SQL = "UPDATE tblhosting SET username='xxx', domain='xxx' WHERE orderid=123"; require("../dbconnect.php"); ExecuteQuery($SQL); Any idea? functions.php and clientareafunctions.php have no problem. Is there anything that I need to configure to make this work? Thanks in advance!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated