Forum

Thread tagged as: Configuration, PayPal

Sort products by a custom field in PayPal Shop app

I would like to be able to sort the products in the PayPal Shop by a new custom field.

I'm adding the field to the product.html and product_in_list.html templates as follows:

<perch:shop id="productOrdering" type="text" label="Order to display (1=top of page)" />

Then I'm calling this up in a page as follows:

<?php
perch_shop_custom(array(
'template'=>'shop/product_in_list.html',
'sort'=>'productOrdering',
'sort-order'=>'ASC'
));
?>

That returns no products at all. But if I sort by one of the standard fields eg productPrice, this works fine.

Is it possible to sort products by a custom field?

Mark Melling

Mark Melling 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Unfortunately that's not possible with some of the older apps.

P K

P K 0 points

Can I jump in with a quick question related to the above...

I gather then it's not possible to filter by a custom field at all when using the old Paypal shop app?

I want to allow editors to choose featured products for display on the homepage. When I try to filter by the custom checkbox I added to the products.html template, I don't get any results coming through on the homepage. Filtering by the standard fields works fine.

Is there any way I can allow editors to choose featured paypal shop app products for inclusion on the homepage? Or will I need to use the new shop app that's in beta? (I'm doing my first Perch build so hesitating to use the beta shop app as I get to know how all the basics work).

Thanks Paul

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Paul - you've jumped onto a 5 month old thread.

If you need help please post your own thread - thanks!