Enable editing of supplier products and listing services connected to them
This commit is contained in:
@@ -15,8 +15,6 @@ final class Broadband extends Type implements ProductItem
|
||||
|
||||
protected $table = 'product_broadband';
|
||||
|
||||
protected const category_name = 'Broadband';
|
||||
|
||||
// Information required during the order process
|
||||
protected array $order_attributes = [
|
||||
'options.address'=>[
|
||||
|
@@ -12,8 +12,6 @@ final class Domain extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_domain';
|
||||
|
||||
protected const category_name = 'Domain Name';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceDomain::class;
|
||||
|
||||
|
@@ -12,8 +12,6 @@ final class Email extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_email';
|
||||
|
||||
protected const category_name = 'Email Hosting';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceEmail::class;
|
||||
|
||||
|
@@ -12,8 +12,6 @@ final class Generic extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_generic';
|
||||
|
||||
protected const category_name = 'Generic';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceGeneric::class;
|
||||
|
||||
|
@@ -12,8 +12,6 @@ final class Host extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_host';
|
||||
|
||||
protected const category_name = 'Web Hosting';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceHost::class;
|
||||
|
||||
|
@@ -12,8 +12,6 @@ final class Phone extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_phone';
|
||||
|
||||
protected const category_name = 'Telephone';
|
||||
|
||||
protected array $order_attributes = [
|
||||
'options.phonenumber'=>[
|
||||
'request'=>'options.phonenumber',
|
||||
|
@@ -12,8 +12,6 @@ final class SSL extends Type implements ProductItem
|
||||
{
|
||||
protected $table = 'product_ssl';
|
||||
|
||||
protected const category_name = 'SSL Certificate';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceSSL::class;
|
||||
|
||||
|
@@ -32,9 +32,11 @@ abstract class Type extends Model
|
||||
* other logic of these types.
|
||||
*
|
||||
* @return string
|
||||
* @deprecated - can this be replaced with product->supplied->category?
|
||||
*/
|
||||
final public function getCategoryAttribute(): string
|
||||
{
|
||||
abort(500,'use product->supplied->category_name');
|
||||
return strtolower((new \ReflectionClass($this))->getShortName());
|
||||
}
|
||||
|
||||
@@ -42,9 +44,11 @@ abstract class Type extends Model
|
||||
* Return a friendly name for this product, used for display
|
||||
*
|
||||
* @return string
|
||||
* @deprecated - can this be replaced with product->supplied->category_name
|
||||
*/
|
||||
final public function getCategoryNameAttribute(): string
|
||||
{
|
||||
abort(500,'use product->supplied->category_name');
|
||||
return static::category_name;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user