Posts by granttransition

    Is there an update on this please drewm? This issue is now nearly a year old, and this post is in its second alliteration? I know Byron Fitzgerald has done some great work but it would be nice if we could get an update on whether a solution is being worked on?


    Perhaps Byron Fitzgerald wouldn't mind his solution being integrated into Shop somehow?


    Thanks

    I am trying to display some text and relevant information from my Events Collection based on todays date.


    I started by writing a system varible in templates/pages/events/detail.php.

    PHP: detail.php
    1. // Set todays date
    2. PerchSystem::set_var('today', date('Y-m-d'));
    3. // Pass date into template
    4. perch_collection('Events', [
    5. 'template' => 'events/event/_enter.html',
    6. ]);

    <perch:showall> confirms that today is avaible for use.


    My Events Collection is quite verbose due to each event having three pricing levels, Early Rate, Reduced Rate and Standard Rate.


    I would like to take the closing day date for the relevant price level, see whether that date is in the past or future, and display the relevant pricing level text.


    I am having issues getting my conditional to display the correct text. Currently it displays the first two if statements, when I was expecting the third.

    events_price_indv_er_cl => 31/10/2019

    events_price_indv_rr_cl => 04/01/2020

    events_price_indv_sr_cl => 30/08/2020


    The way understand the to work is, if date is less than or equal to today's date display the content.


    I'd appreciate some guidance on the conditional as I am clearly not understanding this fully.

    Hi Hussein,


    Isn't it very, very late over there?


    Extended diagnostic shows…


    Production mode: Production (100)

    PERCH_DEVELOPMENT: 10

    PERCH_STAGING: 50

    PERCH_PRODUCTION: 100

    PERCH_DEBUG:


    Which explains why Debug isn't showing. So the next question is, why not? Something to do with my switch statement perhaps?

    Hi,


    I'm trying to debug a site https://staging.woodchesterhouse.com/ and just noticed the debug table isn't displaying?


    I'm getting the following PHP warning…

    Code
    1. PHP Warning: Illegal string offset 'html' in /home/#####/public_html/control/templates/layouts/global/page_head.php on line 14

    This refering to this code…

    PHP
    1. 12    $sitename = perch_content_custom('Site Name', [
    2. 13     'skip-template' => true,
    3. 14     'return-html' => true,
    4. 15    ])['html'];

    The code works, but would like to resolve the warning if possible.


    Thanks very much

    Hi,


    My Perch Shop tables have a huge amount of data, `shop_cart` for example has over a million rows. If I understand correctly, this table holds temp data whilst a customer is checking out. So is this data safe to truncate? It would probably be safer to remove everything apart from the last 50 entries just to be on the safe side.


    I'm just looking for conformation as to whether this is safe and in fact recommended?


    If that is, is there any other tables that would be safe to truncate on a regular basis to stop the database becoming too large. Should I even be worried about how large the database is?

    Hi,


    I am experiencing issues using Office 365 as a SMTP server. I'm aware that the `PERCH_EMAIL_FROM` and `PERCH_EMAIL_USERNAME` need to match, which they do, here is my settings minus sensitive information.


    HTML: SMTP Info
    1. define('PERCH_EMAIL_FROM', '######');
    2. define('PERCH_EMAIL_FROM_NAME', 'The Dudley Arms');
    3. define('PERCH_EMAIL_METHOD', 'smtp');
    4. define('PERCH_EMAIL_HOST', 'smtp.office365.com');
    5. define('PERCH_EMAIL_AUTH', true);
    6. define('PERCH_EMAIL_SECURE', 'tls');
    7. define('PERCH_EMAIL_PORT', 587);
    8. define('PERCH_EMAIL_USERNAME', '######');
    9. define('PERCH_EMAIL_PASSWORD', '######');

    Email settings are correct as I can log into their email.


    Do perch forms use TLS 1.2 or above? I'm lead to believe it won’t work with anything lower – that could possibly be the issue depending how Perch is programmed to connect to SMTP server?


    Thanks