Source of file EcommerceSideReportNoPriceProducts.php
Size: 0,948 Bytes - Last Modified: 2021-12-23T10:39:35+00:00
/var/www/docs.ssmods.com/process/src/src/Reports/EcommerceSideReportNoPriceProducts.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445 | <?php namespace Sunnysideup\Ecommerce\Reports; use SilverStripe\Reports\Report; use Sunnysideup\Ecommerce\Pages\Product; /** * Selects all products without a price. * * @authors: Nicolaas [at] Sunny Side Up .co.nz * @package: ecommerce * @sub-package: reports */ class EcommerceSideReportNoPriceProducts extends Report { use EcommerceProductReportTrait; protected $dataClass = Product::class; /** * @return string */ public function title() { return _t('EcommerceSideReport.NOPRICE', 'E-commerce: Products without Price'); } /** * @param null|mixed $params */ protected function getEcommerceWhere($params = null): string { return '"Product"."Price" IS NULL OR "Product"."Price" = 0 '; } /** * @param null|mixed $params */ protected function getEcommerceSort($params = null): array { return ['FullSiteTreeSort' => 'ASC']; } } |