@@ -444,84 +444,6 @@ public static function getProductsCount($filter = array())
444444 $ filter = Filter::create ($ filter );
445445 return self ::getCount ('/products/count ' . $ filter ->toQuery ());
446446 }
447-
448- /**
449- * Checks if a product resource is valid for counting
450- *
451- * @param array $resource
452- * @return bool if product resource is valid for counting
453- */
454- public static function validProductResourceCount ( $ resource ='' )
455- {
456- return in_array ( $ resource , array ('images ' ,'videos ' ,'rules ' ,'skus ' ,'custom_fields ' ,'configurable_fields ' ) );
457- }
458-
459- /**
460- * Returns count of all product resources of a specific type
461- *
462- * @param array $resource
463- * @return int number of resources of specific type or zero if an invalid type
464- */
465- public static function getProductResourceCount ($ resource )
466- {
467- if ( self ::validProductResourceCount ( $ resource ) ) {
468- return Client::getCount ("/products/ {$ resource }/count " );
469- } return 0 ;
470- }
471-
472- /**
473- * Returns count of all product images
474- *
475- * @return int number of resources of images type
476- */
477- public static function getProductImagesCount () {
478- return static ::getProductResourceCount ('images ' );
479- }
480-
481- /**
482- * Returns count of all product videos
483- *
484- * @return int number of resources of videos type
485- */
486- public static function getProductVideosCount () {
487- return static ::getProductResourceCount ('videos ' );
488- }
489-
490- /**
491- * Returns count of all product rules
492- *
493- * @return int number of resources of rules type
494- */
495- public static function getProductRulesCount () {
496- return static ::getProductResourceCount ('rules ' );
497- }
498-
499- /**
500- * Returns count of all product skus
501- *
502- * @return int number of resources of skus type
503- */
504- public static function getProductSKUSCount () {
505- return static ::getProductResourceCount ('skus ' );
506- }
507-
508- /**
509- * Returns count of all product custom fields
510- *
511- * @return int number of resources of custom fields type
512- */
513- public static function getProductCustomFieldsCount () {
514- return static ::getProductResourceCount ('custom_fields ' );
515- }
516-
517- /**
518- * Returns count of all product configurable fields
519- *
520- * @return int number of resources of configurable fields type
521- */
522- public static function getProductConfigurableFieldsCount () {
523- return static ::getProductResourceCount ('configurable_fields ' );
524- }
525447
526448 /**
527449 * Returns a single product resource by the given id.
0 commit comments