-
Posts
3,638 -
Joined
-
Last visited
-
Days Won
241
Reputation Activity
-
Tyson got a reaction from Tjw in Custom Client Fields Value In The Invoice
It depends where you want to place the value in the PDF, but consider this example which places it below the "Due Date" field:
Update /components/invoice_templates/default_invoice/default_invoice_pdf.php (line 402):
private function drawInvoiceInfo() { $data = array( array( 'name'=>Language::_("DefaultInvoice.invoice_id_code", true), 'space'=>null, 'value'=>$this->invoice->id_code ), array( 'name'=>Language::_("DefaultInvoice.client_id_code", true), 'space'=>null, 'value'=>$this->invoice->client->id_code ), array( 'name'=>Language::_("DefaultInvoice.date_billed", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed)) ), array( 'name'=>Language::_("DefaultInvoice.date_due", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due)) ) );
to
private function drawInvoiceInfo() { $cf_data = array(); if (property_exists($this->invoice->client, "id")) { Loader::loadModels($this, array("Clients")); $field_id = 6; $values = $this->Clients->getCustomFieldValues($this->invoice->client->id); foreach ($values as $value) { if ($value->id == $field_id) { $cf_data = array( 'name' => $value->name . ":", 'space' => null, 'value' => $value->value ); break; } } unset($values, $value); } $data = array( array( 'name'=>Language::_("DefaultInvoice.invoice_id_code", true), 'space'=>null, 'value'=>$this->invoice->id_code ), array( 'name'=>Language::_("DefaultInvoice.client_id_code", true), 'space'=>null, 'value'=>$this->invoice->client->id_code ), array( 'name'=>Language::_("DefaultInvoice.date_billed", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed)) ), array( 'name'=>Language::_("DefaultInvoice.date_due", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due)) ) ); if (!empty($cf_data)) $data[] = $cf_data;
You need to update line 407 to set the integer to the correct custom field ID for your custom field. For example, if you go to edit the custom field in Blesta, the integer value will you're looking for appears at the end of the URL.
Note that this is a core file in Blesta, and future patches/updates from us may overwrite this file, and you will need to merge these changes with any subsequent update accordingly.
-
Tyson got a reaction from Ken in Custom Client Fields Value In The Invoice
It depends where you want to place the value in the PDF, but consider this example which places it below the "Due Date" field:
Update /components/invoice_templates/default_invoice/default_invoice_pdf.php (line 402):
private function drawInvoiceInfo() { $data = array( array( 'name'=>Language::_("DefaultInvoice.invoice_id_code", true), 'space'=>null, 'value'=>$this->invoice->id_code ), array( 'name'=>Language::_("DefaultInvoice.client_id_code", true), 'space'=>null, 'value'=>$this->invoice->client->id_code ), array( 'name'=>Language::_("DefaultInvoice.date_billed", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed)) ), array( 'name'=>Language::_("DefaultInvoice.date_due", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due)) ) );
to
private function drawInvoiceInfo() { $cf_data = array(); if (property_exists($this->invoice->client, "id")) { Loader::loadModels($this, array("Clients")); $field_id = 6; $values = $this->Clients->getCustomFieldValues($this->invoice->client->id); foreach ($values as $value) { if ($value->id == $field_id) { $cf_data = array( 'name' => $value->name . ":", 'space' => null, 'value' => $value->value ); break; } } unset($values, $value); } $data = array( array( 'name'=>Language::_("DefaultInvoice.invoice_id_code", true), 'space'=>null, 'value'=>$this->invoice->id_code ), array( 'name'=>Language::_("DefaultInvoice.client_id_code", true), 'space'=>null, 'value'=>$this->invoice->client->id_code ), array( 'name'=>Language::_("DefaultInvoice.date_billed", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_billed)) ), array( 'name'=>Language::_("DefaultInvoice.date_due", true), 'space'=>null, 'value'=>date($this->invoice->client->settings['date_format'], strtotime($this->invoice->date_due)) ) ); if (!empty($cf_data)) $data[] = $cf_data;
You need to update line 407 to set the integer to the correct custom field ID for your custom field. For example, if you go to edit the custom field in Blesta, the integer value will you're looking for appears at the end of the URL.
Note that this is a core file in Blesta, and future patches/updates from us may overwrite this file, and you will need to merge these changes with any subsequent update accordingly.
-
Tyson got a reaction from Daniel B in All Links In Admin Redirecting To Index.php
Alternatively, you could have gone to [settings] -> [system] -> [staff] -> [staff Groups], clicked to edit your staff group, and re-saved the settings in order to clear the cache.
-
Tyson got a reaction from Michael in All Links In Admin Redirecting To Index.php
Alternatively, you could have gone to [settings] -> [system] -> [staff] -> [staff Groups], clicked to edit your staff group, and re-saved the settings in order to clear the cache.
-
Tyson got a reaction from ariq01 in Universal Module Welcome Email Tags
You would set the email tags in the package welcome email.
Let's say you have a universal module product that you're creating. Under the "Package Options" section of your product, you can set a label, name, type, values, whether the field is required, and whether to encrypt the values.
e.g.
Label: My Package Option
Name: my_package_option
Type: Text
Required: No
Encrypted: No
Values:
Similarly, under the "Service Options" section of the product, you have the same fields available.
e.g.
Label: My Service Option
Name: my_service_option
Type: Text
Required: Yes
Encrypted: No
Values:
Now when you add/edit a package where you have selected this universal module product, the Welcome Email has tag support for your fields based on their "Name" value as set in the universal module.
Based on my example Package and Service options above, you would have these tags available to the package welcome email:
{package.my_package_option}
{service.my_service_option}
-
Tyson got a reaction from domaingood in Cpanel Extended Module
ModulesGarden had recently released their cPanel Extended module to us, and now after fixing some sanitization issues, we're recently the module unencoded for free (see attached).
Since we've made a few changes, it's possible we've introduced new issues, so we're considering this a beta version. Let us know if you find anything.
Based on our initial once-over of the module, it's evident that there are some bugs; which we did not attempt to fix. For example, attempting to unsuspend a service does not actually unsuspend the service.
You can upload the contents of the attached zip to your Blesta installation directory, and then head into Blesta's admin interface to install the module under [settings] -> [Modules] -> [Available].
NOTE: Version 2.0.0+ of this module requires Blesta v3.2.0+.
Changes:
## Version 1.0.2 ### Bug * [CORE-957] - cPanel Extended: Add Order drop-down missing language when setting server group * [CORE-958] - cPanel Extended: Special FTP Accounts can have their passwords changed * [CORE-959] - cPanel Extended: Cannot unsuspend an account * [CORE-960] - cPanel Extended: Client service expandable row shows no content ## Version 1.1.0 ### Requirements - For use with Blesta version 3.1.x. ### Improvement * [CORE-981] - cPanel Extended: Remove the action to fetch module options when changing module row/group ## Version 2.0.0 ### Requirements - For use with Blesta version 3.2.0 or greater. ### Bug * [CORE-1089] - cPanel Extended: Cron may fail to provision services due to "headers already sent" error via session ### Improvement * [CORE-1057] - cPanel Extended: Add service row info sections ### Sub-task * [CORE-1052] - cPanel Extended: Add support for bootstrap in client interface cpanelextended.zip
cpanelextended_v1.0.2.zip
cpanelextended_v1.1.0.zip
cpanelextended_v2.0.0.zip
-
Tyson got a reaction from Michael in Api Method Of Changing Client Id_Value
The id_value is not meant to be changed explicitly since it is a function of several company settings and previous values. The company settings that affect this are not fully implemented, but include clients_start, clients_increment, clients_pad_size, and clients_pad_str.
If you wanted to change the start value from 1500 to 2000, you could try the following (warning: I have not tested this):
<?php ... $api = new BlestaApi($url, $user, $key); $response = $api->put("companies", "setsetting", array('company_id' => 1, 'key' => "clients_start", 'value' => 2000)); ... ?> -
Tyson got a reaction from Michael in Importing Coupon Codes
Try using POST. The discount amount also needs to be in an array:
$id = $api->post("coupons", "add", array('code' => $coupon, 'company_id' => "1", 'max_qty' => "1", 'end_date' => "2013-11-17 03:59:59",'recurring' => "0", 'limit_recurring' => "0", 'packages' => array("10"), array(array('currency' => "USD", 'amount' => "100.0000"))))->response(); -
Tyson got a reaction from dotjason in Create Client - Always Sends Welcome Email
Fixed in CORE-817 for v3.0.5.
-
Tyson got a reaction from Michael in Create Client - Always Sends Welcome Email
Fixed in CORE-817 for v3.0.5.
-
Tyson got a reaction from Michael in 3.0.4 Upgrade
After patching, always run the upgrade. It should be the first thing you do after each patch.
-
Tyson got a reaction from Michael in Namecheap Module - All Domains Unavailable
Fixed in CORE-805 for v3.0.4 of Blesta.
-
Tyson got a reaction from Michael in Domain Always Not Available To Register
This is fixed in v3.0.4.
-
Tyson got a reaction from Michael in Links In Support Manager Emails Do Not Respect Https + Mailto Problem
mailto links in the Support Manager Ticket Updated email templates have been fixed in CORE-804 for v3.0.4 of Blesta.
-
Tyson got a reaction from Michael in Non Descriptive Errors In Api Calls
Are you using the API SDK to handle this, or are you calling models directly?
Validation errors are set when input fails validation, and you can access them by calling the errors() method, e.g.
<?php ... // Set input vars $vars = array(); // Attempt to create the client $client_id = $this->Clients->add($vars); // Show any validation errors if (($errors = $this->Clients->errors()) { print_r($errors); die; } ... ?>
You may want to also take a look at the source docs if you haven't already.
-
Tyson got a reaction from Michael in Super Simple Yet Super Useful Feature Request
I find scrolling results incredibly annoying, especially when looking for things that I know are 10 pages away. I find it much easier to click a pagination link to go to page 10, and look around page 9/10/11 than scroll down and search. But of course, that's just me.
This idea is still pagination though. Your scrolling just acts as the event to fetch more results. It's the 90s with a twist.
-
Tyson got a reaction from Alex in Super Simple Yet Super Useful Feature Request
I find scrolling results incredibly annoying, especially when looking for things that I know are 10 pages away. I find it much easier to click a pagination link to go to page 10, and look around page 9/10/11 than scroll down and search. But of course, that's just me.
This idea is still pagination though. Your scrolling just acts as the event to fetch more results. It's the 90s with a twist.
-
Tyson got a reaction from Michael in Universal Module Input Rules
Glad you got it fixed. I guess the universal module will be v1.0.10 for v3.0.4 of Blesta then.
-
Tyson got a reaction from Michael in Blesta Deletes All Plesk Websites When A Customer Cancels Just One!
This sounds like a separate issue. If you change the renew date, the domain name becomes blank in Plesk (and/or in Blesta)? What's in the Module Log regarding this?
The fix I included in the file above specifies a filter for a customer if one is available, so you shouldn't experience a "delete all" issue again. The additional check I mentioned to refuse attempts to delete something without a filter set is indeed in a different file (the main plugin file), which Paul can attach to this thread.
-
-
Tyson got a reaction from Michael in Blesta Deletes All Plesk Websites When A Customer Cancels Just One!
I found the issue. The API from the Plesk module was not properly setting the customer login name as you mentioned, which Plesk interprets as "delete all customers". And when Plesk deletes a customer, it also automatically deletes subscriptions assigned to those customers, so inevitably everything was deleted.
Attached is the fix for this problem. You can replace /components/modules/plesk/apis/commands/plesk_customer_accounts.php in your Blesta installation with the one attached.
plesk_customer_accounts.php
-
Tyson got a reaction from Michael in Domain Registrar Modules?
I'll have to defer to Cody on that. Not sure where it stands currently.
-
Tyson got a reaction from Michael in Domain Registrar Modules?
Trials are only limited in duration (time).
-
Tyson got a reaction from Michael in Stripe / Coupon Math Bug -- Causes Payment Error
I can't imagine identical behavior concluding in different results in this instance, but to me, this looks like a rounding issue in Stripe (or lack thereof) since only integers should be sent.
By the way, Stripe expects the amount in cents, so 1499.5 = $14.995
-
Tyson got a reaction from Michael in Delete Clients
The best way to manage test information is to separate it from your live system. In other words, use a developer installation to do the testing, and use your other installation as the live system.