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