Jump to content

Cody

Blesta Developers
  • Posts

    1,574
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Cody

  1. You should be using $api->post('clients', 'create', $vars); But aside from that, the 'Failed to retrieve the default value' error is the result of a bug in ionCube. I've never seen it happen in a non-encoding file, though. So it must be calling something in AppModel which is encoded. I hate ionCube so much.
  2. Cody

    Release 3.6.0-B1

    As soon as it's ready.
  3. It's important that the correct subdivision be assigned because it's used for taxing, mailing, and other purposes. I want to make sure we get it right. The problem I'm finding is that there is apparently no accurate data available anywhere.
  4. One problem I think we'll have is determining which subdivisions to include in countries that have multiple levels of subdivisions. For example, GB's first level is country, of which there are 3 (England, Wales, and Scotland). Obviously we can't just include those three, we have to dig deeper. However, that's not necessarily the case for other countries. I don't believe there is an automated way of determining that, which is probably why we included all subdivisions, rather than to exclude some. This is also probably why there are no correct complete data sets available. Even ISO doesn't identify which subdivisions are in common use within a country.
  5. Here's what our data provider has for ISO 3166-2 for Morocco: 3166-1 3166-2 name MA AGD Agadir Ida-Outanane MA AOU Aousserd MA ASZ Assa-Zag MA AZI Azilal MA BEM Beni Mellal MA BER Berkane MA BES Ben Slimane MA BOD Boujdour MA BOM Boulmane MA CAS Casablanca MA CHE Chefchaouen MA CHI Chichaoua MA CHT Chtouka-Aït Baha MA ERR Errachidia MA ESI Essaouira MA ESM Es-Semara MA FAH Fahs-Beni Makada MA FES Fès-Dar-Dbibegh MA FIG Figuig MA GUE Guelmim MA HAJ El Hajeb MA HAO Al Haouz MA HOC Al-Hoceima MA IFR Ifrane MA INE Inezgane-Aït Melloul MA JDI El Jadida MA JRA Jerada MA KEN Kénitra MA KES Kelâat Es-Sraghna MA KHE Khémisset MA KHN Khénifra MA KHO Khouribga MA LAA Laâyoune MA LAR Larache MA MED Médiouna MA MEK Meknès MA MMD Marrakech-Médina MA MMN Marrakech-Ménara MA MOH Mohammédia MA MOU Moulay Yacoub MA NAD Nador MA NOU Nouaceur MA OUA Ouarzazate MA OUD Oued Ed-Dahab-Lagouira MA OUJ Oujda-Angad MA RAB Rabat MA SAF Safi MA SAL Salé MA SEF Sefrou MA SET Settat MA SIK Sidi Kacem MA SKH Skhirat-Témara MA SYB Sidi Youssef Ben Ali MA TAI Taourirt MA TAO Taounate MA TAR Taroudant MA TAT Tata MA TAZ Taza MA TET Tétouan MA TIZ Tiznit MA TNG Tanger-Asilah MA TNT Tan-Tan MA ZAG Zagora 3166-1 3166-2 name MA 1 Tanger-Tetouan MA 2 Gharb-Chrarda-Beni Hssen MA 3 Taza-Al Hoceima-Taounate MA 4 L'Oriental MA 5 Fes-Boulemane MA 6 Meknes-Tafilalet MA 7 Rabat-Salé-Zemmour-Zaer MA 8 Grand Casablanca MA 9 Chaouia-Ouardigh MA 10 Doukkala-Abda MA 11 Marrakech-Tensift-Al Haouz MA 12 Tadla-Azilal MA 13 Souss-Massa-Draa MA 14 Guelmim-Es Smar MA 15 Laayoune-Boujdour-Sakia El Hamra MA 16 Oued ed Dahab-Lagouira MA AGD Agadir-Ida-Outanane MA AOU Aousserd MA ASZ Assa-Zag MA AZI Azilal MA BEM Beni Mellal MA BER Berkane MA BES Ben Slimane MA BOD Boujdour MA BOM Boulemane MA CAS Casablanca [Dar el Beïda]* MA CHE Chefchaouen MA CHI Chichaoua MA CHT Chtouka-Ait Baha MA ERR Errachidia MA ESI Essaouira MA ESM Es Smara MA FAH Fahs-Beni Makada MA FES Fès-Dar-Dbibegh MA FIG Figuig MA GUE Guelmim MA HAJ El Hajeb MA HAO Al Haouz MA HOC Al Hoceïma MA IFR Ifrane MA INE Inezgane-Ait Melloul MA JDI El Jadida MA JRA Jrada MA KEN Kénitra MA KES Kelaat es Sraghna MA KHE Khemisset MA KHN Khenifra MA KHO Khouribga MA LAA Laâyoune* MA LAR Larache MA MED Mediouna MA MEK Meknès MA MMD Marrakech-Medina MA MMN Marrakech-Menara MA MOH Mohammadia MA MOU Moulay Yacoub MA NAD Nador MA NOU Nouaceur MA OUA Ouarzazate MA OUD Oued ed Dahab MA OUJ Oujda* MA RAB Rabat MA SAF Safi MA SAL Connaught Salé MA SEF Sefrou MA SET Settat MA SIK Sidi Kacem MA SKH Skhirate-Témara MA SYB Sidi Youssef Ben Ali MA TAI Taourirt MA TAO Taounate MA TAR Taroudant MA TAT Tata MA TAZ Taza MA TIZ Tiznit MA TNG Tanger-Assilah MA TNT Tan-Tan MA ZAG Zagora I think we may need to find a different data source, possibly directly from ISO, because the information does not appear to be correct.
  6. ISO 3166-2 is the subdivision standard. It may be that countries like Morocco and Italy have multiple subdivisions registered with ISO 3166-2. I'll look into our ISO 3166-2 dataset and see if there's a way to differentiate them. Since Blesta only allows one subdivision, Blesta should probably only include the top most subdivision, whereas now it appears that Blesta includes them all.
  7. Cody

    Release 3.6.0-B1

    Version 3.6.0-b1 is now available. You can download it in the Client Area. This is a BETA feature release. This release is not considered stable enough for production use. Please report any bugs in the 3.6 beta bug forum. Installing Blesta See Installing Blesta in the User Manual for instructions. Upgrading Blesta See Upgrading Blesta in the User Manual for instructions. Release Notes See Blesta Core - Version 3.6.0-b1. For older releases see all Change Logs.
  8. Closing since others have confirmed unable to duplicate. If the issue is reproducible open a new thread with steps to duplicate.
  9. @naja7host, why do you rely on modifying the core? You can easily create a new invoice template and simply extend the original template, without having to write much code. /components/invoice_templates/custom_invoice/custom_invoice_pdf.php <?php require_once '../default_invoice/default_invoice_pdf.php'; CustomInvoicePdf extends DefaultInvoicePdf {} /components/invoice_templates/custom_invoice/custom_invoice.php <?php require_once '../default_invoice/default_invoice.php'; require_once 'customer_invoice_pdf.php'; CustomInvoice extends DefaultInvoice { public function __construct() { parent::__construct(); Language::loadLang("custom_invoice", null, dirname(__FILE__) . DS . "language" . DS); } public function setMeta($meta) { parent::setMeta($meta); // Load different language for this template if given if (isset($meta['language'])) Language::loadLang("custom_invoice", $meta['language'], dirname(__FILE__) . DS . "language" . DS); $this->pdf = new CustomInvoicePdf("P", "px", $this->meta['paper_size'], true, 'UTF-8', false, $font); // Set the meta data to use for this invoice $this->pdf->meta = $this->meta; } } Then just supply your own custom language file, you can even extend the language: /components/invoice_templates/custom_invoice/language/en_us/custom_invoice.php <?php $lang['DefaultInvoice.invoice_id_code'] = "Number:"; $lang['DefaultInvoice.date_billed'] = "Date:";
  10. This could be accomplished with a plugin. For users being a proxy, it would require reliance on the X-Forwarderd-For header (which we are looking to support in a future version). But I think two-factor authentication is a much better solution that IP restriction.
  11. Blesta makes no distinction between a page refresh and visiting a separate page. Your browser probably received the HTTP 403 header and loaded from the cache instead.
  12. Did you uninstall a module or remove a module record after already having created the package you are trying to add a service for? If so, you need to resave the package with the correct details.
  13. This reminds me of the Matrix, when Morpheus offers Neo the blue pill or the red pill. You can only choose one, and you only get one chance. There is no going back, no reordering. Would be cool if the Order plugin supported the ability (on the order form) to limit re-orders. Of course, it would only apply to that particular order form, and only to the products listed on that order form.
  14. You can look at two different events (you'll need to create a plugin that can listen for these events). One of the following: Transactions.add Invoices.setClosed The first is triggered when a transaction is added. The second is triggered when an invoice is closed, which happens when it's paid. Sounds like you'd want to go with #2
  15. Sorry dude, I've got to close this. The original topic has been shown to be not a bug. If you have something else to report please open a new thread.
  16. Blesta DOES NOT store credentials of any kind in a cookie. The only thing Blesta will put in a cookie is the session ID.
  17. We've recently released a Blesta extension installer so users of composer can install Blesta extensions into their Blesta installation. This makes it super easy to install open source Blesta extensions, or your own customer proprietary extensions using a private composer repository (such as satis). This installer supports the following extensions: Plugins Modules Merchant Gateways Non-merchant Gateways Invoice Templates Reports See the instructions for usage in the README. Note that for Plugins, Modules and Gateways, the installer simply makes these extensions available in Blesta. You still need to complete installation in Blesta, like you would normally, for each of your companies.
  18. Cody

    Release 3.5.3

    Version 3.5.3 is now available. You can download it in the Client Area. This is a patch release that corrects issues with 3.5.0. Patching Blesta See Patching Blesta in the User Manual for instructions. Release Notes See Blesta Core - Version 3.5.3. See all Change Logs.
  19. Yes that's what Blesta does now. I'm not stating that you can't have 1 minute cron jobs that work. I'm just saying, in practice, it's not really a good idea as the risk of a collision is high. Plus, why have 1 minute cron jobs when you have can SMTP polling every 15 seconds?
  20. 1 minute cron jobs are a bad idea. It's too easy for them to pile up and execute on top of each other. If the point is to pull email from SMTP/IMAP server in near real time, create a script that runs constantly and polls the SMTP/IMAP server every 30 to 60 seconds. For example: <?php while (true) { $window = 60; $start = microtime(true); // TODO: do stuff $runtime = microtime(true) - $start; // wait until we can run again... sleep(max(0, (int) $window - $runtime)); }
  21. Your solution suffers from the same serialization problem. A better solution would be something like: gateway_sessions uuid, gateway_id, expire_date gateway_session_invoices gateway_session_uuid, invoice_id, amount Then you simply pass the uuid to the gateway and read it back on the response.
  22. Hm. Blesta always added the base URI in the links. I don't think we made any changes around that recently. But I do like the idea of actions opening external URLs. I think that's something we could support. Could someone open a feature request?
  23. Cody

    Release 3.5.2

    Version 3.5.2 is now available. You can download it in the Client Area. This is a patch release that corrects issues with 3.5.0. Patching Blesta See Patching Blesta in the User Manual for instructions. Release Notes See Blesta Core - Version 3.5.2. See all Change Logs.
  24. Yeah, that's the gray area, and I'm not a lawyer, but my interpretation is that if it is completely optional and not enabled by default (e.g. the download does not happen automatically unless and until someone checks a box), then it should be ok.
×
×
  • Create New...