Forum

Thread tagged as: Question, Addons, PayPal

perch_shop_custom exclude a category

Hi, I'm trying to exclude a category from my call to perch_shop_custom, but it's not returning anything. Just wondering if there is something obviously wrong with my code ?

$array = perch_shop_custom(array(
    'category'=>'!reenrolment',
    'skip-template'=>'True',
    'sort'=>'productCode',
    'sort-order'=>'ASC '
));

When I remove the line:

'category'=>'!reenrolment',

I get all the products in all categories which is fine. The documentation says: "To exclude a category, prefix its name with an exclamation point." Which I think I'm doing ? I'd really appreciate some help, Thanks Dylan

Dylan Rynhart

Dylan Rynhart 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The shop apps are of an older generation and aren't using the same core functionality as some of the newer apps. It looks like category exclusion is one of those things that isn't supported.