Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 04/20/2019 in all areas

  1. 3 points
    I think Blesta version 4.6 may solve this for you. Beta soon.
  2. 3 points
    Tyson

    Mass Mailer, SMTP setting

    Created as CORE-3111.
  3. 2 points
    Hi everyone! I just wanted to share this with you because I think it would be useful to those who aren't necessarily familiar with PHP and want to display different currencies based upon the user's IP address. Big thanks to @Blesta.Store for sharing a big portion of this code already on the forum. This will pull prices from Blesta's API and allow you to use multiple currencies. After you've uploaded the API SDK, you're going to want to download this file: https://www.geoplugin.com/_media/webservices/geoplugin.class.phps Upload that file into your site's directory, then take the contents below and place it at the top of your site files (or the pages where you will be displaying the prices). <?php require_once('geoplugin.class.php'); $geoplugin = new geoPlugin(); $geoplugin->locate(); // create a variable for the country code $var_country_code = $geoplugin->countryCode; // redirect based on country code: if ($var_country_code == "AU") { $selected_currency = "AUD"; } else if ($var_country_code == "CA") { $selected_currency = "CAD"; } else if ($var_country_code == "AT") { $selected_currency = "EUR"; } else if ($var_country_code == "BE") { $selected_currency = "EUR"; } else if ($var_country_code == "BG") { $selected_currency = "EUR"; } else if ($var_country_code == "CY") { $selected_currency = "EUR"; } else if ($var_country_code == "CZ") { $selected_currency = "EUR"; } else if ($var_country_code == "DK") { $selected_currency = "EUR"; } else if ($var_country_code == "EE") { $selected_currency = "EUR"; } else if ($var_country_code == "FI") { $selected_currency = "EUR"; } else if ($var_country_code == "DE") { $selected_currency = "EUR"; } else if ($var_country_code == "GR") { $selected_currency = "EUR"; } else if ($var_country_code == "HU") { $selected_currency = "EUR"; } else if ($var_country_code == "IE") { $selected_currency = "EUR"; } else if ($var_country_code == "IT") { $selected_currency = "EUR"; } else if ($var_country_code == "LV") { $selected_currency = "EUR"; } else if ($var_country_code == "LU") { $selected_currency = "EUR"; } else if ($var_country_code == "MT") { $selected_currency = "EUR"; } else if ($var_country_code == "NL") { $selected_currency = "EUR"; } else if ($var_country_code == "PL") { $selected_currency = "EUR"; } else if ($var_country_code == "PT") { $selected_currency = "EUR"; } else if ($var_country_code == "RO") { $selected_currency = "EUR"; } else if ($var_country_code == "SK") { $selected_currency = "EUR"; } else if ($var_country_code == "SI") { $selected_currency = "EUR"; } else if ($var_country_code == "ES") { $selected_currency = "EUR"; } else if ($var_country_code == "SE") { $selected_currency = "EUR"; } else if ($var_country_code == "GB") { $selected_currency = "GBP"; } else if ($var_country_code == "IN") { $selected_currency = "INR"; } else if ($var_country_code == "MX") { $selected_currency = "MXN"; } else { $selected_currency = "USD"; } require_once "/home/username/public_html/blesta/api/blesta_api.php"; $user = "username"; $key = "key"; $url = "url"; $api = new BlestaApi($url, $user, $key); $company_id = 1; // Set acceptable currencies $valid_currencies = array("USD", "GBP", "EUR", "INR", "MXN", "AUD"); // Set default currency // Set another currency if given if (isset($_GET['currency']) && in_array(strtoupper($_GET['currency']), $valid_currencies)) $selected_currency = strtoupper($_GET['currency']); $price1 = getPackagePrice($api, 4, "month", 1); $price2 = getPackagePrice($api, 57, "year", 1); $price3 = getPackagePrice($api, 29, "month", 1); $price4 = getPackagePrice($api, 50, "month", 1); $price5 = getPackagePrice($api, 298, "year", 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); $price5_amount = formatCurrency($api, $price5->price, $price5->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(); } ?> Next, you're going to want to create your API credentials in Blesta and fill them in appropriately. After you've done this, simply place the following code (changing the numbers appropriately) where you would like to display the prices. <?php echo $price1_amount; ?> Of course you can make modifications as you desire, but I wanted to share this with you in case anyone wanted to do the same.
  4. 1 point
    Hello, this is not the first time i talk/claim about this, but this is causing us a lot of problems and claims and money lose . we talked in and here but until now no fix is provided . a sample case from us Service Created in 10-4-2018 14:00 . Renew date are 10-4-2019 14:00 Invoice Due Date 10-4-2019 00:00 Suspend Services Days After Due 1 Day this service will be suspended in 12-4-2019 when cronjob run . as you see we have here 2 days of latency in suspension system, we need the service to be suspended the same day if invoice is not paid (in our example should be 10-4-2019 14:01) , i wouldn't talk about times in blesta as we have talked a lot and we have arrived to no solution, my ask if blesta staff can make a new setting or anything to achieve this simple request? we need the service to be suspended after their expiration date immediately, in some services letting services for two days active (and this is the minimum in blesta) before suspending them will consume a lot of resources and licenses fees.
  5. 1 point
    we also waiting this feature, it will solve one of our issues.
  6. 1 point
    You can configure your packages now for pro-rata, if they purchased a 1 year term then it would be prorated to June 1st or July 1st depending on what you set for the cutofff day. Then you can adjust the renew date and generate a 2nd invoice for June 1st - Jan 1st. After that it'll renew on Jan 1st each year. So, an extra manual step in there unfortunately. We might be interested in adding a prorata month option for yearly services if you want to make a feature request. Prorata option works best with monthly services, so if you have a monthly service you want to renew on the 1st each month, then placing an order will prorate it.. and you pay either partial month or partial month + whole month to get it to renew on the 1st. It doesn't work so well with yearly terms because it will still prorate it to the 1st of the next month not the 1st of a particular month.
  7. 1 point
    Paul

    Mass Mailer, SMTP setting

    One thing I'd like to see is an export directly to Campaign Monitor list, or Mailchimp, etc. Separate feature for a separate time though. CORE-3111 sounds fine with me, so long as the default option is to use system mail settings.
  8. 1 point
    Tyson

    Mass Mailer, SMTP setting

    How do you think that should work? Should you add SMTP details that the Mass Mailer plugin will save? Then you can select which details you would like to use when you create the email piece?
  9. 1 point
    Blesta Addons

    Order Search

    it would be nice to add orders to searchable items . like tickets ect ...
  10. 1 point
    Joseph H

    Order Search

    Been through this, It's a very useful to be able to search for order number as well. So +1
  11. 1 point
    Blesta Addons

    Balance In PDF invoice

    not applying to invoice , i'm talking about printed invoice to client. the clients need to see if there are a credit left or solde left after the payment applied to invoice. the remaining amount to pay is shown in the invoice as balance (positive), and normally he should be negative because we own money to client . if client owe money to us then the balance should be shown with positive value . this is what we do in our accounting system in our country, not sure if this is the same as USA .
  12. 1 point
    Paul

    Remove/Disable cPanel login

    You can remove it from the templates under /components/modules/cpanel/ I don't have explicit instructions, but it should be in a file ending in .pdt
  13. 1 point
    Blesta Addons

    stripe new europe law

    Stripe Will change their payment System for New Europe law sales, i think this will infect the API also, https://stripe.com/en-US/guides/strong-customer-authentication https://stripe.com/en-US/payments/strong-customer-authentication
  14. 1 point
    Paul

    stripe new europe law

    This has to do with 3D Secure right? We are planning to add 3DS support to Stripe. Not totally sure all that is involved in making that happen yet, but it is on our radar and we'll be taking a closer look very soon.
  15. 1 point
    Chris

    Trutone Blesta Integration

    It's very smooth. Nice work. The blue reminded me of that song blue Da ba dee
  16. 1 point
    austenite

    mysql 5.7

    Hi there Did you try searching for this? As the answer is here - https://docs.blesta.com/display/user/Requirements
  17. 1 point
    Paul

    Trutone Blesta Integration

    Little late on the reply, but I like it it. Not a big fan of all the blue, but it does fit together well.
  18. 1 point
    HostKoala

    Trutone Blesta Integration

    So blue
  19. 1 point
    Looks good! One thing you could do in the future to improve on this is to create a plugin for Blesta that accepts an IP address and uses the GeoIP2 database already supported by Blesta to determine the country (i.e. replaces the geoplugin.com file), then your plugin can do the mapping and return the appropriate currency for the country.
×
×
  • Create New...