Jump to content

kikloo

Members
  • Posts

    237
  • Joined

  • Last visited

Posts posted by kikloo

  1. Hi,

     

    I just made this quick domain sync (which updates reg. date and expiry date into the blesta database directly) php script which seems to be working fine for me, i am posting it here for anyone else's use:

     

    ITS FOR RESELLERCLUB ONLY

     

    BEFORE YOU USE: BACKUP DATABASE , BACKUP DATABASE

    <?php
    $db_host = "localhost";
    $db_name = "loremipsum"; // your blesta database name
    $db_username = "loremipsum"; // your blesta database username
    $db_password = "loremipsum"; // your blesta database password
     
    $uid = "123456"; // your logic boxes or reseller club user id
    $key = "loremipsumloremipsumloremipsum"; // your logic boxes or reseller club api key
     
    // ============================================
    // No change is required after this point
    //=============================================
    $conn = mysql_connect($db_host, $db_username, $db_password) or die("Unable to Connect");
    $db = mysql_select_db($db_name, $conn) or die("Unable to Select");
     
     
    $q0 = "SELECT * FROM `service_fields` WHERE `key` = 'domain-name'";
    $r0 = mysql_query($q0) or die("Query Failed: Get Domains");
     
    while ($a0 = mysql_fetch_array($r0))
    {
    $q1 = "SELECT * FROM services WHERE id_value = " . $a0["service_id"] . " LIMIT 1";
    $r1 = mysql_query($q1) or die("Query Failed: Get Record");
    $a1 = mysql_fetch_array($r1);
     
    $domain = $a0["value"];
    $url = "https://httpapi.com/api/domains/details-by-name.json?auth-userid=" . $uid . "&api-key=" . $key . "&domain-name=" . $domain . "&options=OrderDetails";
     
    $handle = fopen($url, "rb");
    $content = stream_get_contents($handle);
    $content = json_decode($content);  
    fclose($handle);
     
    $regdate = date("Y-m-d H:i:s", $content->creationtime);
    $expdate = date("Y-m-d H:i:s", $content->endtime);
     
    $q2 = "UPDATE services SET 
    date_added = '" . $regdate . "',
    date_renews = '" . $expdate . "' WHERE 
    id = " . $a1["id"] . " LIMIT 1";
    $r2 = mysql_query($q2) or die("Query Failed: Update Exp. Date for " . $domain);
    }
     
    echo "Done";
    ?>

    Its a quickly done script which has nothing to do with blesta, just put in the required details, upload an run once. It will update all your domain's reg / expiry date.

     

    Thanks.

  2. Hi,

     

    Thanks for the tip, but I went my way and it seems to be working. I am now adding orders 1 by 1 to the clients from WHMCS to Blesta.

    The only issue I am facing now is that I have to manaully set expiration date of domains. You do not have something like WHMCS domain sync ??

    It updates all the domain's expiry dates. Does Blesta have anything like that ? It would save me a lot of time. I will then just add the domain and run the script to sync the expiry dates.

     

    Thanks.

  3. Hi,

     

    I ran this query:

    TRUNCATE calendar_events;
    TRUNCATE invoices;
    TRUNCATE invoice_lines;
    TRUNCATE packages;
    TRUNCATE package_emails;
    TRUNCATE package_group;
    TRUNCATE package_groups;
    TRUNCATE package_meta;
    TRUNCATE package_pricing;
    TRUNCATE pricings;
    TRUNCATE services;
    TRUNCATE service_fields;
    TRUNCATE support_replies;
    TRUNCATE transactions;
    TRUNCATE transaction_applied;
    TRUNCATE transaction_types;

    Do i need to do anything else to make sure that client's accounts that have been left are clean and fine and won't cause any issue when I add orders to them ?

     

    Thanks.

  4. Hi,

     

    I have imported from WHMCS. Can i delete imported data everything in Blesta except the clients ? I want to delete invoices, orders, packages, transactions everything else just keep the clients. How do I do that ? Can I do that through phpmyAdmin ? Can you give me some sql code which would Truncate all the data and keep clients only ? You should put option in importer script on what to import. So we can check the boxes etc. and import only that data which is required.

     

    Thanks.

  5. You was using a trial and re-installed it so the key was removed and as it was already installed it won't install again, can you please email sales[a.t]blesta.com for a new trial key issued. Otherwise you can purchase a license which will fix the issue.

     

    As for how to use Blesta I recommend the videos I watch them now, they was made when 3.0 was in development: http://videos.blesta.com/ 

     

    If you have any questions you can post here I can help you with them.

     

    Hi,

     

    I have sent email to sales for key. Please issue fast as I have disabled whmcs for migration.

     

    Thanks.

  6. Hi,

     

    Okay now i understand that I had to add 3 different order forms for this to work. So I added Domain, Hosting and Client Reg. order forms respectively.

    Now the other issue I am facing is regarding currencies.

     

    I have 2 currencies setup i.e INR (default) and USD secondary.

    Client's default currency is INR.

    When I added a domain name I set its pricing in USD (as I am billed in USD) 

    But when as a client (who's currency is INR) I tried to order the domain it still showed me pricing in USD instead of INR. Why its not converting the price into INR from USD for that client ?

     

    Thanks.

  7. Hi,

     

    I am right now using WHMCS and I want to move to Blesta becuase it has open source and I need some modifcations doing which I cannot do in WHMCS. I had also installed the trial version which is going to expire very soon. I just want to know how do I setup Blesta so my clients can register, order domains / hostings by themselves ? Right now all I see is a login page and no reg. link, no order nothing. In WHMCS its all very easy. How do I setup blesta ? I am using Resellerclub for domains, cPanel for hosting and Paypal and 2Checkout for payments.

     

    Thanks.

×
×
  • Create New...