Posts by Byron Fitzgerald

    In a MySQL DB ordering is case sensitive and needs to be customised to allow for case insensitive ordering. In raw SQL you'd need to do something like

    Code
    1. Select col
    2. from myTable
    3. order by lower(col)

    Though as perch adds quotes to the order column I'm not sure you'd be able to create a query in this manner

    Could be a timezone thing? Your web server is likely running on UTC, so depending on the timezone of whoever created the post it might have published the post in the future according to the server, so it takes an hour or so for the post to match the UTC time

    At the moment Perch Shop uses Omnipay to provide a unified API to manage the different payment gateways. Currently Omnipay doesn't support recurring billing so adding Paypal subscriptions directly to shop would be difficult.


    Your best option would probably be to create a stand alone app to handle subscriptions

    I have a form very similar to yours which works fine, the only differences to your select is I have a name attribute on it. I'm also calling perch_content_custom instead of perch_content


    Code
    1. <perch:input type="select" id="position" name="position" class="c-select__field" options="<perch:content id="positions" type="text"/>" allowempty/>

    The perch:input namespace is used to generate form fields, but doesn't handle data passed to the template. You'll need to add a perch:content tag inside you value attribute.

    Code
    1. <perch:input id="someid" type="checkbox" value="<perch:content id="edition"/>" />

    With the basic 2 lines of code Outlook365 thinks the email is spam, this is quite common when not using SMTP to send emails. This would be different for every email client though.


    As with the SMTP issues, this is not an error with Perch but with the SMTP connection. In the debug you have SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting. This indicates that the SMTP server could not be authenticated, this is most likely down to incorrect configuration (incorrect server name, PORT, auth details e.t.c). It could be due to downtime on the SMTP server, but this is unlikely to be the case.

    Maybe I've missed something but I think you might be overcomplicating this a bit.


    If you have a related field in your 'Album' collection you can use that related field in your template to fetch your 'Photo' collection items.


    I'm not sure how your template is set up so the code supplied was a best guess. You can print out the array to check to see exactly how you need to set it. Once the spec_min is set you'll be able to use it in any namespace, but you'll still need to call the scoped namespace to use it. So in your case you'll need to use <perch:productvalues id="spec_min">.


    It could be the case that the spec_min is set in the variants, so you might need to do some more digging in the array.

    Your best option is to then set the spec_min as a global variable. You can run a callback on the 'each' property when fetching the product and find the spec min key and assign it as a global variable there. Something along the lines of the following.


    Think it's an issue with the array map, should probably be

    Code
    1. // Map the array like we do in the previously used each property
    2. $comments = array_map( function($post) {
    3. $post['postAgo'] = get_time_ago(strtotime($post['commentDateTime']));
    4. return $post;
    5. }, $comments);

    Hi Glen,


    Had a lovely break thanks, hope you did to.


    I think it might be because the comments app is a bit outdated and doesn't have the full available options when rendering the templates. I'm pretty sure the each option doesn't exists for perch_comments. You'll need to return all the comments, then loop through them, then pass to perch_template. Something like below should work