Posts by tonyastley

    Thanks Simon, There was a PHP function that captures output and allows you to save it as a variable so I can choose where to output it based on some conditions later on in the page.

    Code
    1. ob_start();
    2. form_builder('Landing Page Form');
    3. $formOutput = ob_get_clean();
    4. echo $formOutput;

    Try using:

    PHP
    1. <?php perch_page_modified(array(
    2. 'format' => '%d %B %Y, %H:%M',
    3. ));?>

    If you want to pass it into a template, set is as a system variable:

    PHP
    1. <?php
    2. $modified = perch_page_modified(array('format' => '%d %B %Y, %H:%M',), true);
    3. PerchSystem::set_var('modified', $modified);
    4. ?>

    Then the in the template template:

    Code
    1. <perch:content id="modified" />

    George G


    I think a weekly update from the development team, regardless of the content would be welcome by all on the forum.


    When it goes quiet, we can't help but feel nothing is happening to get version 4 and the first party apps over the line. I'm sure this isn't the case, but that's what it feels like.

    Achieved this using a perch template filter:


    Then wherever I want to show a base price plus vat:

    Code
    1. <perch:shop id="sale_price" format="#:2" filter="addVAT">

    Obviously this only applies to UK sales, but until Perch Shop adds a way to provide tax exclusive prices, but show prices with a default tax front end it will have to do.

    Hello,


    A client of ours queried the way Perch shop rounds the invoice totals. I looked in the admin at the total for the month of July. I then exported the orders as an excel spreadsheet and the two figure do not match up.


    Across the 35 orders with an average of approx £95 per order the admin area showed a figure £66.97 less than the exported orders spreadsheet for the same period. I checked off all the orders and the figure tallied OK - it was just the total Excel calculated that was out.


    The shop admin figure tallied up OK with Stripe.


    Can anyone he'd any light upon this.

    Do you find also, that even though a new page is behind a subfolder, that it still places it in the root of the site, i.e., in the UI?

    Yeah, location can be a bit confusing at first, just remember to set the subpage folder on the parent page (in settings) and it should place it at the correct location.

    I have a collection of news articles that our client has recently asked me to install a 'published' and 'unpublished' status.


    The 'status' id I have added will not exist on the already populated news articles. It only gets added on save.


    Hence I have the following filter:


    Code
    1.   perch_collection('News Articles', [
    2. 'filter' => 'status',
    3. 'match' => 'neq',
    4. 'value' => 'unpublished',
    5. 'template'=>'_news/news_list.html',
    6. 'sort' => 'newsDate',
    7. 'sort-order' => 'DESC',
    8. 'paginate' => true,
    9. 'count' => 20,
    10. ]);

    I expected perch to treat the absence of the 'status' id as the same as a not equal to match - however it doesn't it.


    So I don't get any results at all.


    Any ideas how I get around this?

    Does anyone else experience the issue of random order region creation? Having to open another tab and manually copy/paste information is a real drag actually, and should be addressed before Perch becomes a subscription-based service, at least in my opinion.


    Also, as stated before, having to press Save twice on the Details and Settings pages, is a real inconvenience so put these two things together and in my view at least you have a very user-unfriendly CMS notwithstanding that depending on what control or text field you have entered data; data may actually be lost which adds frustration to the whole experience.


    Are these the sorts of things that Perch developers and the developers of Perch want going forward?

    You're not alone in this. I had a similar thread a while back.


    A perch_region_order would be fantastic to semantically control the order regions are shown in the admin area as they are a little unpredictable when trying to insert a region in between two existing regions.

    Interestingly, If I remove the secret key it errors out, however if I enter anything in there whatsoever for example: 'XX' it works but all responses go into spam.


    So it is checking for the correct secret key, but not verifying the recaptcha response? Lets anything through.

    We have installed MKB forms on a site we launched yesterday: http://www.speechwrite.com


    The recaptcha challenge displays OK, however the form is able to be submitted regardless of whether or not it is filled in correctly (removing disabled from the button to allow it to be submitted).


    The documentation says the <perch:input type="hidden" id="g-recaptcha-response" class="g-recaptcha-response"> Should be filled in when a successful recaptcha is entered but it is not. Oddly the form submissions get through anyway even though this field remains empty on submit.


    Has anyone else experienced a similar issue and maybe have a pointer to help resolve?

    We have the following rules in our htaccess file:



    We have used this before without issue (I hope), however in this case trying to access 'http://www.speechwrite.com' (non https) brings up a 404 and the url shows the runway start page?


    Does anyone know what might be going wrong here?

    I think I've worked it out - this goes in the /perch/addons/templates/filters.php file:


    The tag then looks like:


    Code
    1. <perch:content type="text" id="tel" filter="formattedNo"/>


    Typical use case:


    Code
    1. Tel: <a href="tel:<perch:content type="text" id="tel" filter="formattedNo"/>" title="Call us on <perch:content type="text" id="tel" />"><perch:content type="text" id="tel" /></a>

    Hello,


    I frequently need to convert a telephone number to a <href="tel:..." friendly format.


    Currently I do this in php on every single page that requires it eg:



    Does anyone know how I could do this using a perch template filter? To enable something like:


    Code
    1. <perch:content type="text" id="tel" filter="formatted"/>


    PHP isn't my strong point, so whilst I don't necessarily need a finished filter as the answer (but feel free) a basic example to get me going would be great.