Jump to content

Jono

Blesta Developers
  • Posts

    376
  • Joined

  • Last visited

  • Days Won

    37

Posts posted by Jono

  1. As far as the sandbox, I believe the results are based on which domains are already taken specifically in their sandbox environment.

    Care to describe your first error more? At which step does it redirect you back to the search?  Is there any error message or anything?

  2. So plugins will usually have a parent controller that their other controllers inherit from that has a name in the format my_plugin_controller.php  In that file/class there should be a method called preAction and you should add that code at the end of that method.

  3. An iframe huh?  That sounds gross X)  Anyhow, you can look at plugins/order/views/templates/wizard/checkout_complete.pdt, ../ajax/checkout_complete.pdt, ../standard/checkout_complete.pdt.  At the bottom of each you will see:

    
                <div class="col-md-12">
                    <div class="btn-group pull-right">
                        <a href="<?php echo $this->Html->safe($this->base_uri . 'order/main/index/' . $this->Html->ifSet($order_form->label));?>" class="btn btn-plain btn-sm"><i class="fa fa-arrow-left"></i> <?php $this->_('Checkout.complete.order_more_btn');?></a>
                    </div>
                </div>

    So you'll want to update that.

  4. X) How are you outputting it?  $contact_numbers is an array of objects.  I guess in your case you are looking for a particular number so maybe just grab the first one

    <?php
    $verify_phone = $this->Html->ifSet($contact_numbers[0]->number);
    ?>
    <script>
      window.intercomSettings = {
        app_id: "app_id",
        phone: "<?php echo $verify_phone; ?>",
        name: "<?php echo $this->Html->_($contact->first_name, true) . ' ' . $this->Html->_($contact->last_name, true);?>",
        email: "<?php echo $verify_email; ?>", // Email address
        user_hash: "<?php echo $email_sig; ?>" // HMAC using SHA-256
      };
    </script>

    You may also want to submit the $type argument to Contacts::getNumbers() to get only 'phone' type numbers.

  5. Yea, so you would load the Contacts model inside your controller.  You said you want this to be passed to structure.pdt?  I assume this is for client interface?  You can update client_controller.php in the preAction() and load the contacts controller:

    $this->uses(['Contacts']);

    Then set the numbers to the structure:

    $this->structure->set('contact_numbers', $this->Contacts->getNumbers($this->client->contact_id));

    That will make the $contact_numbers variable available to app/views/client/bootstrap/structure.pdt

  6. Hmm this is would actually require a rather involved change to the code base.  Basically what we are showing in the drop down is the simple price from the package.  What appears in the cart is a breakdown created by a robust pricing library we've written that takes into account many things like proration, tax, discounts, etc.  To change the drop downs from the first to the second would take a decent amount of work.

  7. You are saying these do not work? What use cases are not failing/succeeding as expected?

    A couple notes on the username regex.  The i modifier at the end makes it case insensitive so it can be upper or lower case.  Also you allow for the $%^ characters in the username, is that intentional?

    Also I notice that you use the negate option for the domain rule. So you are validating that the submitted domain does NOT match that regex.

    Finally, you are missing a comma after the curly brace just before the start of the "password" rule.

  8. That field comes from the Stripe Elements and Stripe JS API.  It is an iframe that Blesta does not control directly and the zip code field I believe appears conditionally on the kind of card you enter.  You may be able to find some option in the API to alter this behavior.  In that case you would modify the JS in components/gateways/merchant/stripe_payments/views/default/cc_form.pdt 

    The API reference is here https://stripe.com/docs/js

  9. This is really gonna depend on how you set up Stripe in Blesta.  So first, since these are from some time ago, it's safe to say that they are using "Stripe" rather than the new "Stripe Payments".

    One thing to note is that one time payments will not have an associated Stripe customer.  Only payments made with payment accounts stored in Blesta will have that association.  

    The first place I would look is in the gateway settings under Settings > Company > Gateways when you click Manage on the Stripe gateway.  Is the "Store Card Information Offsite" box checked?  If not then the customer never would have been created in Stripe.

    If the box is checked, then I'd say to look at your database in the accounts_cc table.  Find one of the payment accounts associated with stripe (you can compare the gateway_id to the stripe id in the gateways table) and see if that record has a value for the reference_id column.  If it does not then it was created at a time when the box was unchecked and thus would not have a matching customer in Stripe.

    If it does have a reference_id then you should be able to use that as the id to search for the client in stripe.  If the client doesn't exist in stripe then it must have been deleted from outside Blesta.

     

    Hope this was helpful :)

  10. Those are all included in the {ticket} tag which is listed in available tags.  Occasionally there are undocumented tags though, you are correct.

    The update_ticket_url tag is currently only available in the Ticket Updated email that is sent to the client, though https://dev.blesta.com/browse/CORE-3347 adds that to the Ticket Received email as well.  If you would like similar links to be included in the admin emails, you can create a feature request here https://requests.blesta.com/.

×
×
  • Create New...