The return type could not be reliably inferred; please add a @return annotation.
Our type inference engine in quite powerful, but sometimes the code does not
provide enough clues to go by. In these cases we request you to add a @return
annotation as described here.
Loading history...
47
{
48
$fields = parent::getCMSFields();
49
$fields->addFieldToTab('Root.Details', new UploadField('DownloadFiles', _t('ElectronicDownloadProduct.DOWNLOADFILES', 'Download Files')));
50
return $fields;
51
}
52
53
/**
54
* This is used when you add a product to your cart
55
* if you set it to 1 then you can add 0.1 product to cart.
56
* If you set it to -1 then you can add 10, 20, 30, etc.. products to cart.
57
*
58
* @return Int
59
**/
60
public function QuantityDecimals()
61
{
62
return 0;
63
}
64
}
65
66
67
class ElectronicDownloadProduct_Controller extends Product_Controller
PSR1 recommends that each class should be in its own file to aid autoloaders.
Having each class in a dedicated file usually plays nice with PSR autoloaders
and is therefore a well established practice. If you use other autoloaders, you
might not want to follow this rule.
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.