diff --git a/dca/tl_catalog_product.php b/dca/tl_catalog_product.php index 6631ed9..d3d9dfe 100644 --- a/dca/tl_catalog_product.php +++ b/dca/tl_catalog_product.php @@ -72,7 +72,6 @@ 'href' => 'act=edit', 'icon' => 'header.gif' ), - 'type' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['type'], @@ -125,7 +124,8 @@ 'palettes' => array ( '__selector__' => array('addEnclosure','published'), - 'default' => '{title_legend},title,alias,featured,date; + 'default' => '{title_legend},title,alias,model,date; + {config_legend},featured; {meta_legend},description,keywords; {feature_legend},features; {spec_legend},spec; @@ -185,6 +185,15 @@ ), 'sql' => "varchar(128) NOT NULL default ''" ), + 'model' => array + ( + 'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['model'], + 'exclude' => true, + 'search' => true, + 'inputType' => 'text', + 'eval' => array('maxlength'=>128, 'tl_class'=>'w50'), + 'sql' => "varchar(128) NOT NULL default ''" + ), 'date' => array ( 'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['date'], diff --git a/languages/en/tl_catalog_product.php b/languages/en/tl_catalog_product.php index 9f4aa28..ac41dc7 100644 --- a/languages/en/tl_catalog_product.php +++ b/languages/en/tl_catalog_product.php @@ -16,7 +16,8 @@ * Fields */ $GLOBALS['TL_LANG']['tl_catalog_product']['title'] = array('Product title', 'Please enter the product title.'); -$GLOBALS['TL_LANG']['tl_catalog_product']['alias'] = array('Product code or alias', 'Please enter the product code.'); +$GLOBALS['TL_LANG']['tl_catalog_product']['alias'] = array('Product alias', 'Please enter the product alias.'); +$GLOBALS['TL_LANG']['tl_catalog_product']['model'] = array('Product model', 'Please enter the product model.'); $GLOBALS['TL_LANG']['tl_catalog_product']['date'] = array('Date', 'Please enter date.'); $GLOBALS['TL_LANG']['tl_catalog_product']['description'] = array('Description','Please enter description.'); $GLOBALS['TL_LANG']['tl_catalog_product']['keywords'] = array('Meta keywords','Here you can enter a list of comma separated keywords. Keywords, however, are no longer relevant to most search engines (including Google).'); diff --git a/modules/ModuleCatalog.php b/modules/ModuleCatalog.php index 2413233..176d11c 100644 --- a/modules/ModuleCatalog.php +++ b/modules/ModuleCatalog.php @@ -98,8 +98,13 @@ protected function parseProduct($objProduct, $blnAddCategory=false, $strClass='' $objTemplate->title = $objProduct->title; $objTemplate->alias = $objProduct->alias; + $objTemplate->model = $objProduct->model; - $objTemplate->features = deserialize($objProduct->features); + print_r($objProduct->features); + if (!empty($objProduct->features)) + { + $objTemplate->features = deserialize($objProduct->features); + } $objTemplate->specs = deserialize($objProduct->spec); $objTemplate->description = $objProduct->description; diff --git a/templates/product/product_full.html5 b/templates/product/product_full.html5 index 3997f14..4bace25 100644 --- a/templates/product/product_full.html5 +++ b/templates/product/product_full.html5 @@ -2,7 +2,7 @@

title; ?>

-

alias; ?>

+

model; ?>

hasMetaFields): ?>

@@ -29,8 +29,9 @@ + features); ?> - features) { ?> + features !== null) { ?>

ویژگی‌ها

- specs) { ?> + specs !== null) { ?>

خصوصیات