MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
GOOGLE_ANALYTICS_ID=UA-4339912-10
+BACKPACK_LICENSE=YwdOWjeEczPAwy06GzkBJggW
protected $table = 'catalog_categories';
protected $_options = ['name' => 'category',
- 'plural' => 'categories',
+ 'singular' => 'catégorie',
+ 'plural' => 'catégories',
'route' => 'catalog_category'];
public function setFields()
protected $table = 'catalog_products';
protected $_options = ['name' => 'product',
- 'plural' => 'products'];
+ 'singular'=>'produit',
+ 'plural' => 'produits'];
public function setFields()
{
parent::setFields();
$this->addField(['name' => 'name',
- 'label' => 'Product name',
+ 'label' => 'Nom du produit',
'type' => 'Text',
'column' => true,
'tab' => 'General']);
$this->addField(['name' => 'reference',
- 'label' => 'SKU',
+ 'label' => 'SKU (référence)',
'type' => 'Text',
'column' => true,
'unique' => true,
}
}
}
+ if (!count($in)) {
+ continue;
+ }
$params = ['tab' => 'Specifications',
'name' => 's_' . Str::snake($spec->name),
'label' => $spec->name,
'when' => ['product_type' => $in],
];
+ if ($spec->prefix) {
+ $params['prefix'] = $spec->prefix;
+ }
+ if ($spec->unit) {
+ $params['suffix'] = $spec->unit;
+ }
+
if ($spec->type == 'numeric') {
$params['type'] = 'Number';
+ } else if ($spec->type == 'range') {
+ $params['type'] = 'Range';
+ } else if ($spec->type == 'text') {
+ $params['type'] = 'Text';
} else {
$params['type'] = 'SelectFromArray';
$options = [];
$this->addField(['name' => 'slug',
- 'type' => 'Slug',
+ 'type' => 'Slug (URL)',
'label' => 'Slug',
'column' => true,
'tab' => 'General']);
$this->addField(['name' => 'online',
'type' => 'Checkbox',
- 'label' => 'Online',
+ 'label' => 'En ligne',
'column' => true,
'tab' => 'General']);
$this->addField(['name' => 'public',
'type' => 'Checkbox',
- 'label' => 'Public',
+ 'label' => 'Publique',
'column' => true,
'tab' => 'General']);
$this->addField(['name' => 'supplier',
- 'label' => 'Supplier',
+ 'label' => 'Fournisseur',
'type' => 'Text',
'translatable' => false,
'tab' => 'Supplier']);
$this->addField(['name' => 'supplier_reference',
- 'label' => 'Supplier reference',
+ 'label' => 'Référence fournisseur',
'type' => 'Text',
'translatable' => false,
'tab' => 'Supplier']);
'tab' => 'Texts']);
$this->addField(['name' => 'images',
- 'label' => 'Product pictures',
+ 'label' => 'Images du produit',
'type' => 'Images',
'tab' => 'Media']);
'tab' => 'Texts']);
$this->addField(['name' => 'accessories',
- 'label' => 'Accessories',
+ 'label' => 'Accessoires',
'type' => 'Markdown',
'tab' => 'Texts']);
protected $_options = ['name' => 'product type',
'route' => 'producttype',
- 'plural' => 'product types'];
+ 'singular' => 'type de produit',
+ 'plural' => 'types de produit'
+ ];
public function setFields()
{
$this->addField(['name' => 'name',
- 'label' => 'Type name',
+ 'label' => 'Nom du type de produit',
'type' => 'Text',
'column' => true]);
);
$this->addField(['name' => 'featured_on_home',
- 'label' => 'Featured on homepage',
+ 'label' => 'Mis en avant sur la page d\'accueil',
'type' => 'Checkbox',
'column' => true,
'default' => 1]);
+ $this->addField(['name' => 'filters',
+ 'label' => 'Spécifications utilisées comme filtre',
+ 'type' => 'SelectFromModelMultiple',
+ 'model' => 'App\Models\Specification']);
+
$this->addField(['name' => 'specifications',
- 'label' => 'Specifications',
+ 'label' => 'Autre spécifications',
'type' => 'SelectFromModelMultiple',
'model' => "App\Models\Specification",
]);
{
return $this->relationship('specifications');
}
+
+ public function filters()
+ {
+ return $this->relationship('filters');
+ }
}
protected $table = 'catalog_specifications';
protected $_options = ['name' => 'specification',
- 'plural' => 'specifications'];
+ 'singular' => 'spécification',
+ 'plural' => 'spécifications'];
public function setFields()
{
parent::setFields();
$this->addField(['name' => 'name',
- 'label' => 'Specification name',
+ 'label' => 'Nom de la spécification',
'type' => 'Text',
'column' => true]);
'label' => 'Type',
'type' => 'SelectFromArray',
'column' => true,
- 'options' => ['numeric' => 'Numeric value', 'list' => 'Value in a list']]);
+ 'options' => ['numeric' => 'Numeric value', 'range' => 'Numeric range', 'list' => 'Value in a list', 'text' => 'Text value']]);
$this->addField(['name' => 'options',
'label' => 'Options',
'columns' => [
'name' => 'Name',
],
+ 'when' => ['type' => 'list'],
]);
+
+ $this->addField(['name' => 'prefix',
+ 'label' => 'Préfixe',
+ 'type' => 'SelectFromArray',
+ 'options' => ['' => 'no prefix', '>' => '>', '<' => '<', '±' => '±', '≥' => '≥', '≤' => '≤'],
+ 'when' => ['type' => 'numeric']
+ ]);
+
+ $this->addField(['name' => 'unit',
+ 'label' => 'Unité',
+ 'type' => 'Text',
+ 'when' => ['type' => ['numeric', 'interval']],
+ 'translatable' => false,
+ ]);
+ }
+
+ public function product_type_filters()
+ {
+ return $this->belongsToMany('App\Models\ProductType', 'catalog_product_types_filters_rel_btm');
}
- public function product_type()
+ public function product_type_specifications()
{
- return $this->belongsToMany('App\Models\ProductType', 'rel_btm_catalog_specifications_catalog_product_types');
+ return $this->belongsToMany('App\Models\ProductType', 'catalog_product_types_specifications_rel_btm');
}
}
|
*/
- 'locale' => 'en',
+ 'locale' => 'fr',
/*
|--------------------------------------------------------------------------
'translatable_field_icon_position' => 'right', // left or right
'locales' => [
+ 'fr' => 'French',
+ 'en' => 'English',
+ "de" => "German",
// "af_NA" => "Afrikaans (Namibia)",
// "af_ZA" => "Afrikaans (South Africa)",
// "af" => "Afrikaans",
// "en_GB" => "English (United Kingdom)",
// "en_US" => "English (United States)",
// "en_ZW" => "English (Zimbabwe)",
- 'en' => 'English',
+
// "eo" => "Esperanto",
// "et_EE" => "Estonian (Estonia)",
// "et" => "Estonian",
// "de_LI" => "German (Liechtenstein)",
// "de_LU" => "German (Luxembourg)",
// "de_CH" => "German (Switzerland)",
- "de" => "German",
+
// "el_CY" => "Greek (Cyprus)",
// "el_GR" => "Greek (Greece)",
// "el" => "Greek",