Jump to content

Jono

Blesta Developers
  • Posts

    378
  • Joined

  • Last visited

  • Days Won

    38

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

×
×
  • Create New...