Get the lowest sku price of a product

10 views
Skip to first unread message

Marc Ackermann

unread,
Mar 1, 2021, 9:09:43 AM3/1/21
to Slatwall Commerce
Hi,

I would like to display the lowest sku price for every product on the product listing page.
Additionally if the product skus have different prices, there should be a string "from" like this example "from € 19,99".
Is there a smartlist function build in slatwall for that? I couldn't find somthing like that.
I could code it with an addional loop. But because of performance it would be nice if I could avoid it.

Greetings,
Marc

Chris Kent

unread,
Mar 1, 2021, 10:11:21 AM3/1/21
to Slatwall Commerce
Hi Marc,

Simple solution would be to add an addOrder('price') clause to the sku smartlist and get first & last array elements of getRecords() for a skuSmartlist.

This would give you the range of sku prices. This would not take into account any discounts, promotions or account pricing that may apply to any of the SKUs.

Chris.

Marc Ackermann

unread,
Mar 5, 2021, 4:39:11 AM3/5/21
to Slatwall Commerce
Hi Chris,

thanks for your support. Especially the hint for the discounts, promotions or account pricing was very useful.  I hadn't thought of that.
It's done now.

Marc
Reply all
Reply to author
Forward
0 new messages