Source of file ElectronicDownloadProduct.php
Size: 1,668 Bytes - Last Modified: 2021-12-23T10:40:45+00:00
/var/www/docs.ssmods.com/process/src/code/ElectronicDownloadProduct.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 | <?php class ElectronicDownloadProduct extends Product { /** * Standard SS variable. */ private static $many_many = array( 'DownloadFiles' => 'File' ); /** * Standard SS variable. */ private static $icon = 'ecommerce_delivery_electronic/images/icons/ElectronicDownloadProduct'; /** * Standard SS variable. * @var String */ private static $description = "A product can be downloaded."; /** * Standard SS variable. */ private static $singular_name = "Electronic Download Product"; public function i18n_singular_name() { return _t("ElectronicDownloadProduct.SINGULAR_NAME", "Electronic Download Product"); } /** * Standard SS variable. */ private static $plural_name = "Electronic Download Products"; public function i18n_plural_name() { return _t("ElectronicDownloadProduct.PLURAL_NAME", "Electronic Download Products"); } /** * Standard SS Method */ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab('Root.Details', new UploadField('DownloadFiles', _t('ElectronicDownloadProduct.DOWNLOADFILES', 'Download Files'))); return $fields; } /** * This is used when you add a product to your cart * if you set it to 1 then you can add 0.1 product to cart. * If you set it to -1 then you can add 10, 20, 30, etc.. products to cart. * * @return Int **/ public function QuantityDecimals() { return 0; } } class ElectronicDownloadProduct_Controller extends Product_Controller { } |