Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/05/2014 in all areas

  1. Naja7host has a slotuion for you. No more template editing http://www.blesta.com/forums/index.php?/topic/3437-plugin-css-javascript-toolbox-magic-box/ Hide TAX ID field in client edit page : Add Custom css advanced Controllers : client_main_edit Markup to set in : head tag CSS To Add : #tax_id {display:none} [for="tax_id"] { display: none;} Save .
    3 points
  2. Yeah I had that all correct, what I didn't change was our API's IP address to our new box's IP derp... That fixed my issue right away.
    2 points
  3. Found it! In components/email/email.php at line 90 private function newMessage() { $this->message = Swift_Message::newInstance(); $this->message->setMaxLineLength($this->max_line_length); $this->message->setCharset($this->charset); } add this line before the closing curly bracket: $this->message->setReturnPath('bounces@example.com'); so that you end up with this: private function newMessage() { $this->message = Swift_Message::newInstance(); $this->message->setMaxLineLength($this->max_line_length); $this->message->setCharset($this->charset); $this->message->setReturnPath('bounces@example.com'); } It will add your custom return-path to outgoing mail. It would be nice to see this as an option for each company in Settings.
    2 points
  4. I've been using the Blesta API in conjunction with the SDK; however I have recently noticed that the error handling it does with cURL is incorrect. For example we have this code in blesta_api.php private function submit($model, $method, array $args = array(), $action = "POST") { $url = $this->url . $model . "/" . $method . "." . self::$format; $this->last_request = array( 'url' => $url, 'args' => $args ); if ($action == "GET") { $url .= "?" . http_build_query($args); $args = null; } $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $action); curl_setopt($ch, CURLOPT_URL, $url); if ($args) { curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($args)); } curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($ch, CURLOPT_USERPWD, $this->user . ":" . $this->key); //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $response = curl_exec($ch); $response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return new BlestaResponse($response, $response_code); } Then we have this code inside blesta_response.php /** * @var string The raw response from the API */ private $raw; /** * @var int The HTTP response code from the API */ private $response_code; /** * Initializes the Blesta Response * * @param string $response The raw response data from an API request * @param int $response_code The HTTP response code for the request */ public function __construct($response, $response_code) { $this->raw = $response; $this->response_code = $response_code; } /** * Returns the response from the request * * @return mixed A stdClass object representing the response returned from the request, null if no response returned */ public function response() { $response = $this->formatResponse(); if (isset($response->response)) return $response->response; return null; } /** * Returns the HTTP response code * * @return int The HTTP response code for the request */ public function responseCode() { return $this->response_code; } /** * Returns the raw response * * @return string The raw response */ public function raw() { return $this->raw; } /** * Returns all errors contained in the response * * @return stdClass A stdClass object representing the errors in the response, false if invalid response */ public function errors() { if ($this->response_code != 200) { $response = $this->formatResponse(); if (isset($response->errors)) return $response->errors; else { $error = new stdClass(); $error->error = $response; return $error; } } return false; } /** * Formats the raw response into a stdClass object * * @return stdClass A stdClass object representing the resposne */ private function formatResponse() { return json_decode($this->raw); } Giving particular notice to the errors method, first off it does this: if ($this->response_code != 200) { Just because the response code is != 200 doesn't mean there was an error, a response code of `301` will still return a valid response and shouldn't be treated as a possible error. Secondly, if there is an error it is not going to be contained within $this->raw; this will simply contain boolean false. The correct way to get errors would be via the function curl_error(). So with the above in mind, shouldn't it be done similar to: Add the below line to the submit method in blesta_api.php $response_error = curl_error($ch); CHANGE: return new BlestaResponse($response, $response_code); TO: return new BlestaResponse($response, $response_error, $response_code); Then update blesta_response.php ADD: /** * @var int The cURL error (if any) from the API */ private $response_error; UPDATE the constructor.. public function __construct($response, $response_error, $response_code) { $this->raw = $response; $this->response_error = $response_error; $this->response_code = $response_code; } Then changing the errors method to something like this: public function errors() { if ($this->response_code != 200 or $this->response_error) { $response = $this->formatResponse(); if (isset($response->errors)) return $response->errors; else { $error = new stdClass(); $error->error = ($response) ? $response : $this->response_error; return $error; } } return false; } I had to allow for Blesta errors, which aren't cURL errors so I left in some of the code.
    1 point
  5. Just so anyone else knows - make sure to clear your blesta cache after doing this, as nav elements are cached (and this is related to nav). Thanks again. Sam
    1 point
  6. Purevoltage

    Release 3.3.0

    Very happy with it so far! Can't wait for a few more features and it's going to be the blest-around!
    1 point
  7. Nope you don't need one with Stripe, we use it . And 60% off our payments go threw Stripe now.
    1 point
  8. Blesta Addons

    Selling Reseller?

    You can limit resellers by limit disk and bandwith and even if limit number of account should be created . all that from reseller center , priv/nameserver
    1 point
  9. Slight edit to the errors method above, this would probably be the best way to handle it actually.. public function errors() { $response = $this->formatResponse(); if (isset($response->errors) or $this->response_error) { if (isset($response->errors)) return $response->errors; else { $error = new stdClass(); $error->error = $this->response_error; return $error; } } return false; }
    1 point
  10. If you have the subscribe option enabled in the gateway settings, clients can click the PayPal subscribe button instead of the pay now button on the payment page.
    1 point
  11. Blesta Addons

    Selling Reseller?

    Zamfoo is not cpanel core package . is a third party plugin. Ask him for a module .
    1 point
  12. I think this was answered on your other thread but you need to uninstall the portal plugin. Whenever clients visit your blesta url they will be redirected to the login page, or if already logged in then the client dashboard.
    1 point
  13. Sorry to up this thread , is just to remember the staff about CORE-1320 .
    1 point
  14. Licensecart is correct, but note that it doesn't create an invoice, just adds credit to the clients account. I don't think you should ever create an invoice without providing services, you can create a receipt though. If you just created an invoice, the payment would go towards the invoice so wouldn't be added as credit on the account.
    1 point
  15. Sorry I put it on your other thread: Go to /config/routes.php edit the following: /** * Admin panel directory name */ Configure::set("Route.admin", "admin"); /** * Client panel directory name */ Configure::set("Route.client", "clients");
    1 point
  16. Michael

    Set Client Fields As Required

    I know how you feel, I always feel that way when Blesta is stable, however there's going to be some more big changes in 3.4 as always
    1 point
  17. Michael

    Release 3.3.0

    I love it, and it's amazing as usual roll on 3.4
    1 point
  18. I'll +1 that password shouldn't be included by default however you can add it in if you wish. As for the email rotate I'm going to -1 that since a customer will probably go well you didn't email me that before... Yes we did!
    1 point
  19. Good found , that should be encrypted or removed when loged to database .
    1 point
  20. If you want to dive deep, I just reapplied a customization I had made. On the order form for new customer signups, I wanted to force users to use their email address. In order to do this you need to change the following: MAKE A BACKUP BEFORE ALTERING {install directory}/plugins/order/views/templates/standard/main_signup.pdt To force e-mail, you'll need to change line 247 to: $this->Form->fieldHidden("username_type", "email"); Then you'll need to delete lines 248-256, and 246 Be cautious about editing, and if in doubt, change the field type to hidden as above and give it a static value then remove the label.
    1 point
×
×
  • Create New...