Posts by tonyastley

    Thanks Ellimondo,


    I've tried categories but have kind of ended up in the same place:


    Article Template:

    Code
    1. <perch:content id="newsTitle" type="text" label="News Title" title />
    2. <perch:content id="newsDate" type="date" label="Date" format="D d F y"></perch:content>
    3. <perch:categories id="newsCategories" label="Categories" set="news-categories">
    4. <a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a>
    5. </perch:categories>


    Related Template:

    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Related News">
    2. <perch:content id="newsTitle" type="text" />
    3. <perch:content id="newsDate" type="date" />
    4. <perch:categories id="newsCategories" set="news-categories">
    5. <a href="/category/<perch:category id="catPath">"><perch:category id="catTitle"></a>
    6. </perch:categories>
    7. </perch:related>


    The categories show fine when a normal collections call, however they are not visible when the related news is displayed on the homepage?


    My target is:


    Create News Article with 'Tags' - relate news article to a page and have tags show on the page alongside article.

    Hello,


    I'm running Perch Runway. We have a collection for 'News Articles', and a separate collection for 'News Tags'. When creating a news article the user can relate a tag to it (similar in the way a blog post tag system works).


    When we relate the news article to a page, we are struggling to get the tags related to that news article to show. Is a nested relationship even possible?


    News Article Template:

    Code
    1. <perch:content id="newsTitle" type="text" label="News Title" title />
    2. <perch:content id="newsDate" type="date" label="Date" format="D d F y"></perch:content>
    3. <perch:related id="newsTags" collection="News Tags" label="Tags">
    4. <perch:content id="newsTag" type="text" />
    5. </perch:related>


    News Tags Template:

    Code
    1. <perch:content id="newsTag" type="text" label="Tag Name" required title />


    Related News Template:

    Code
    1. <perch:related id="relatedNews" collection="News Articles" label="Related News">
    2. <perch:content id="newsTitle" type="text" />
    3. <perch:content id="newsDate" type="date" />
    4. <perch:related id="newsTags" collection="News Tags" label="Tags">
    5. <perch:content id="newsTag" type="text" />
    6. </perch:related>
    7. </perch:related>


    It's this nested tag relationship for "newsTags" we cannot get to show. The tags show perfectly fine with a normal collection call.

    We're currently developing a site in Perch Runway and we're looking for a way to add related blog posts to standard pages and other blog posts.


    Is there a custom field type we can employ?

    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?