Posts by tonyastley

    Just dawned on me to filter it on the php call:


    Code
    1. $floorCount = perch_content_custom('Clearance Offers', array(
    2. 'template' => 'offers/floor_count.html',
    3. 'filter' => 'type',
    4. 'match' => 'eq',
    5. 'value' => 'flooring',
    6. ), true);

    Then include the html template in a perch:after tag to get the very last result

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

    Is it possible to get the a count of the number of items returned from perch_content_custom?


    The use case is as follows:


    Our client is adding special offers to their website. The offers are categorised 'beds' or 'flooring'. I want to be able to get a count for either so I can show a conditional menu.


    I've tried:


    Code
    1. //PHP
    2. $floorCount = perch_content_custom('Clearance Offers', array(
    3. 'template' => 'offers/floor_count.html',
    4. ), true);
    5. //Floor count html template:
    6. <perch:if id="type" value="flooring" match="eq">
    7.     <perch:content id="perch_item_count"/>
    8. </perch:if>

    However that returns the total count of all offers not just flooring.


    Is this possible?

    Our client has queried on a couple of occasions why payment failed orders do not show in the admin list of their perch shop.


    They are correct, only paid orders appear. Is there a way to have perch shop show all orders.


    There is a status column, but it only ever shows 'PAID'


    P.S. - We can export the failed orders as a CSV, but it's not convenient to keep exporting just to check.

    We recently launched a Perch Shop, and have encountered a couple of outages due to server error 500.


    The log files from the mosts recent outage look like (I've replaced the domain with sitedomain.com for privacy):


    sitedomain.com [Sat Nov 21 17:03:42 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:04:46 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:06:33 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sat Nov 21 17:07:28 2020] [error] [client 109.158.176.47:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sun Nov 22 03:49:59 2020] [error] [client 114.119.144.62:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 12:30:21 2020] [error] [client 63.143.42.250:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 12:30:22 2020] [error] [client 63.143.42.250:0] End of script output before headers: start.php

    sitedomain.com [Sun Nov 22 23:18:54 2020] [error] [client 87.113.40.112:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516

    sitedomain.com [Sun Nov 22 23:18:57 2020] [error] [client 87.113.40.112:0] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/sites/sitedomain.com/public_html/perch/addons/apps/perch_shop/lib/PerchShop_Cart.class.php on line 516


    Could these be causing the issue?

    We have a perch shop with a checkout as guest option using the password less , the form has a next attribute that should forward the client onto a select delivery screen:

    Code
    1. <perch:form id="register" class="customerDetails" method="post" app="perch_shop" next="/shop/checkout/select-delivery">


    We use the next attribute on the standard customer create form and it works fine, however here it is simply reloading the create an account form?


    Has anyone an idea what might be happening?

    When I enable filters, adding any filter to the /addons/templates/filters.php file Perch outputs the contents of the filters.php file at the top of the document, then returns errors:


    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1399

    Warning: Cannot modify header information - headers already sent by (output started at/path-to-site/perch/addons/templates/filters.php:1) in/path-to-site/perch/core/lib/PerchUtil.class.php on line 1400

    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1401

    Warning: Cannot modify header information - headers already sent by (output started at /path-to-site/perch/addons/templates/filters.php:1) in /path-to-site/perch/core/lib/PerchUtil.class.php on line 1409


    I've seen other support tickets about whitespace before the runtime, there is no whitespace preceding the runtime call.


    Can anyone shed any light on this?

    Spot on Byron,


    The template was OK, it just wasn't in the right place. Once a set of the shop templates was copied into the normal templates folder the importer worked.


    Oddly, it always seems to loop back around to the start then throw an error for a duplicate SKU - but that doesn't bother me.


    Thank you so much, we can start testing the limits of the system now.