Forum
Paypal shop and no results
Hi,
I have a similar problem to this thread - I did post on that thread, but realised because it's resolved no-one will see it! I'm using the Paypal shop app, but cannot get noresults to work in my templates.
I've also tried the code on the thread mentioned above which doesn't work either. I'm using the following code at present:
$result = perch_shop_products_by_category(perch_get('cat'), 12);
if (trim($result)) {
echo $result;
}else{
echo '<div class="no-products">Sorry, we have no products in this range at the moment but please check back soon!</div><hr>';
}
Do you have any idea what I might be able to do to display a no results message?
I'm using the latest version of the Paypal app, but my diagnostic is here:
SUMMARY INFORMATION
Perch: 2.8.25, PHP: 5.6.10, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25), perch_events (1.7), perch_shop_paypal (1.2.3), perch_blog (3.6.1), perch_plantcats (3.6.1)
App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_plantcats/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_shop_paypal/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); ?>
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/alexbennett/Desktop/Job Folder/Cooks Lane Herbs/Test-website/admin
PERCH_CORE: /Users/alexbennett/Desktop/Job Folder/Cooks Lane Herbs/Test-website/admin/core
PERCH_RESFILEPATH: /Users/alexbennett/Desktop/Job Folder/Cooks Lane Herbs/Test-website/admin/resources
Image manipulation: GD
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: dc1fef2ad0fcd9f943c02ebb43d85dbc
Resource folder writeable: Yes
HTTP_HOST: cookslaneherbs:8888
DOCUMENT_ROOT: /Users/alexbennett/Desktop/Job Folder/Cooks Lane Herbs/Test-website
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Thanks, Alex
I think PayPal shop predates the
showall
functionality.Is this a new site, or are you updating something old?
Yes - I'm updating something old, hence the reluctance to install a whole new shop. I imagine that using the latest perch shop would require significant changes? My client is only paying a small fee for various updates!
Yes, if it's something old better to proceed with workarounds.
Change this:
to
Thanks Drew - that code is perfect!