Just dawned on me to filter it on the php call:
Then include the html template in a perch:after tag to get the very last result
Just dawned on me to filter it on the php call:
Then include the html template in a perch:after tag to get the very last result
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:
However that returns the total count of all offers not just flooring.
Is this possible?
Thanks Jamie, will take a look!
Thanks Byron,
Rather than amend the index number I've set the code to show $Statuses->get_status_and_above('payment_failed').
This works fine for what we need. Thanks for the heads up.
When enabling debug we see there are multiple lines saying:
Looking up missing property statusTitle
0.0612 0.0002 [1] SELECT * FROM perch3_shop_order_statuses WHERE statusKey='paid' AND statusDeleted IS NULL LIMIT 1
Could this be linked to the issue?
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 launched a site a while back for a client, we recently dropped back onto the site to add a few more things and I noticed the perch_content_index table has grown to over 24k rows.
When compared to a similar site we launched recently that table is only ~3k rows.
I assumed this is some kind of historical record of updates - can it be purged?
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?
I see from the debug not all order statuses are shown:
o.orderStatus IN ('paid', 'processing', 'cancelled', 'dispatched', 'returned', 'partial_refund', 'refunded')
Is there anywhere we can ask it to show payment failed as well?
We have since changed the send trigger to be order paid. Thanks.
The order is accessible if the ID is changed in the url when looking at a normal order, is there anyway perch shop can show payment failed orders in the order view?
Yesterday our customer has reported receiving emails for orders from Perch Shop.
They only use Stripe for payment processing.
The payment was not taken, the order does not show in the admin area yet the emails were sent out.
Whereabouts could I begin to look to see what the issue could be?
(Unfortunately the client dispatched the orders without payment)
Thanks Hussein, I didn't think there was as I did it a couple of time but I will check.
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:
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?
Has there been any movement for Perch Shop's built-in integration to be updated to support the new API?
When adding regions to an existing page template, is it possible to control where in the list of regions it is added?
Say we have the following regions:
Intro
Content
Gallery
If I wanted to insert a region between Intro and Content and have appear there for pages already using the template - is it possible?
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.
Yeah, tried that earlier, that exact example doesn't work for me - I get the same error.