Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

SS-Shop: how display products with zero price - solved


Go to End


2 Posts   1426 Views

Avatar
suoko

Community Member, 4 Posts

11 May 2014 at 9:10am

Edited: 11/05/2014 9:55am

In shop/code/product/ProductCategory.php

if (self::config()->must_have_price){
			$products =  $products->filter("BasePrice:GreaterThan", 0);
		}

changed to

if (self::config()->must_have_price){
			$products =  $products->filter("BasePrice:GreaterThan", -1);
		}

Avatar
Jedateach

Forum Moderator, 238 Posts

7 October 2014 at 9:03am

Edited: 07/10/2014 9:03am

Hey Suko,
just wondering why you didn't instead set your yaml configuration as such?:

ProductCategory:
         must_have_price: false