Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/18/2013 in all areas

  1. Just an update on the plugin I'm working on. The admin section seems to be working fine now. Not making it too fancy or complex. Simple categories with articles in them. I'll modify this post with updated information when I finish a release.
    4 points
  2. This has been assigned to CORE-589 and is scheduled for version 3.1 currently. It will likely be a setting for the company and client group.
    3 points
  3. FRH Dave

    Knowledge Base Plugin

    And so it begins: the great Blesta community module drive.
    3 points
  4. Download link for the module: http://www2.noc-ps.com/docs/blesta-module-installation/ (only useful if you already have a NOC-PS server to manage your racks)
    2 points
  5. Thanks to Cody, Tyson and Josh (Serverbin.net) for the code, together they helped get this code working for us the community and here is a little tutorial on how to get this working. Ok firstly you need to download the brand new API which Cody has developed to make it easier for developers from: https://github.com/phillipsdata/blesta_sdk (Click on download zip) Put the files into the root of the Blesta install. Then you need to make a API user and get the hash for the connection to your Blesta install. After you've done that you can do the following, you need to put this on the php file you wish the prices to be displayed on: If you aren't using a SSL on your installation change https://blestainstallationurl.com/api to http://blestainstallationurl.com/api <?php require_once "/home/username/public_html/blesta_api.php"; $user = "API USERNAME"; $key = "API KEY"; $url = "https://blestainstallationurl.com/api/"; $api = new BlestaApi($url, $user, $key); $company_id = 1; // Set acceptable currencies $valid_currencies = array("USD", "GBP", "EUR"); // Set default currency $selected_currency = "USD"; // Set another currency if given if (isset($_GET['currency']) && in_array(strtoupper($_GET['currency']), $valid_currencies)) $selected_currency = strtoupper($_GET['currency']); $price1 = getPackagePrice($api, 1, "month", 1); $price1_amount = formatCurrency($api, $price1->price, $price1->currency, $selected_currency, $company_id); function getPackagePrice($api, $package_id, $period, $term) { $package = $api->get("packages", "get", array('package_id' => $package_id))->response(); $package_price = null; foreach ($package->pricing as $price) { // Get monthly term if ($price->period == $period && $price->term == $term) { return $price; } } return false; } function formatCurrency($api, $amount, $from_currency, $to_currency, $company_id) { // Do the currency conversion $amount = $api->get("currencies", "convert", array('amount' => $amount, 'from_currency' => $from_currency, 'to_currency' => $to_currency, 'company_id' => $company_id))->response(); // Format the currency return $api->get("currencies", "toCurrency", array('value' => $amount, 'currency' => $to_currency, 'company_id' => $company_id))->response(); } ?> You can alter the code for more than one product like the example for mine: <?php require_once "/home/cwadminb/public_html/blesta_api.php"; $user = "CubicWebs_API"; $key = "dbf8a2e7bd87bea1c79d868dba5a56f3"; $url = "https://billing.cubicwebs.com/api/"; $api = new BlestaApi($url, $user, $key); $company_id = 1; // Set acceptable currencies $valid_currencies = array("USD", "GBP", "EUR"); // Set default currency $selected_currency = "USD"; // Set another currency if given if (isset($_GET['currency']) && in_array(strtoupper($_GET['currency']), $valid_currencies)) $selected_currency = strtoupper($_GET['currency']); $price1 = getPackagePrice($api, 1, "month", 1); $price2 = getPackagePrice($api, 2, "month", 1); $price3 = getPackagePrice($api, 3, "month", 1); $price4 = getPackagePrice($api, 4, "month", 1); $price1_amount = formatCurrency($api, $price1->price, $price1->currency, $selected_currency, $company_id); $price2_amount = formatCurrency($api, $price2->price, $price2->currency, $selected_currency, $company_id); $price3_amount = formatCurrency($api, $price3->price, $price3->currency, $selected_currency, $company_id); $price4_amount = formatCurrency($api, $price4->price, $price4->currency, $selected_currency, $company_id); function getPackagePrice($api, $package_id, $period, $term) { $package = $api->get("packages", "get", array('package_id' => $package_id))->response(); $package_price = null; foreach ($package->pricing as $price) { // Get monthly term if ($price->period == $period && $price->term == $term) { return $price; } } return false; } function formatCurrency($api, $amount, $from_currency, $to_currency, $company_id) { // Do the currency conversion $amount = $api->get("currencies", "convert", array('amount' => $amount, 'from_currency' => $from_currency, 'to_currency' => $to_currency, 'company_id' => $company_id))->response(); // Format the currency return $api->get("currencies", "toCurrency", array('value' => $amount, 'currency' => $to_currency, 'company_id' => $company_id))->response(); } ?> Where you wish the price to be put the following php code: <?php echo $price1_amount; ?> Change the number to the product price you wish to display. Again thanks to the coders for helping the community. If you used this code when I posted it please update it as it has a fix from Tyson to ensure the GBP prices don't just change the USD symbol.
    1 point
  6. Two things that would be nifty to have: Cancellation reason -- when a client cancels, give them a text box to say WHY they are canceling. Configurable credit for remaining time - if a client cancels with 25 days left, I'd like to issue an account credit for the remaining amount.
    1 point
  7. Looks awesome!! Thanks!
    1 point
  8. Counter-Strike: Global Offensive I'm not much a fan of CS:GO. I prefer the older versions from 5-10 years ago.
    1 point
  9. Paul

    Knowledge Base Plugin

    That's what it's all about!
    1 point
  10. I've added the cancel reason suggestion to CORE-590 and tentatively assigned it to version 3.1. The credit for cancelling early should be included in proration.
    1 point
  11. Michael

    Knowledge Base Plugin

    I think it's amazing and when your finished I'm hoping to be able to fully move over, I will need to find a way to fix the logicboxes module on my install as it doesn't want to connect unlike my current software.
    1 point
  12. Michael

    Licensecart

    not sure I'd rather learn the gist of Bootstrap and do it myself and that way it's not a cheap layout anyone can buy.
    1 point
  13. Good suggestion maybe even make them a promotion code to save that, but it has to be a optional thing so like tick boxes (settings on the settings pages).
    1 point
  14. Michael

    Licensecart

    Yeah my default one looks rubbish haha. My new wallpaper:
    1 point
  15. Michael

    Licensecart

    Got our new logo sorted and updated throughout the site / social networks. What's your opinion on it guys?
    1 point
×
×
  • Create New...