Skip to content

Commit

Permalink
removing features and specs
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidpeywasti committed Jan 8, 2015
1 parent 56f5915 commit 0085bad
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 88 deletions.
48 changes: 6 additions & 42 deletions dca/tl_catalog_product.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,10 @@
'palettes' => array
(
'__selector__' => array('addEnclosure','published'),
'default' => '{title_legend},title,alias,model,date,featured;
'default' => '{title_legend},title,alias,model;
{config_legend:hide},featured,date;
{image_legend},singleSRC;
{meta_legend},keywords,description;
{feature_legend},features;
{spec_legend},specs;
{related_legend},related;
{enclosure_legend:hide},addEnclosure;
{publish_legend},published'
Expand Down Expand Up @@ -224,7 +223,7 @@
'exclude' => true,
'inputType' => 'textarea',
'search' => true,
'eval' => array('decodeEntities'=>true),
'eval' => array('style'=>'height:60px', 'decodeEntities'=>true),
'sql' => "text NULL"
),
'description' => array
Expand All @@ -233,46 +232,9 @@
'exclude' => true,
'inputType' => 'textarea',
'search' => true,
'eval' => array('rte'=>'tinyMCE','tl_class'=>'clr'),
'eval' => array('style'=>'height:60px', 'decodeEntities'=>true, 'tl_class'=>'clr'),
'sql' => "text NULL"
),
'features' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['features'],
'exclude' => true,
'sorting' => true,
'inputType' => 'listWizard',
'eval' => array(),
'sql' => "blob NULL",
),
'specs' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['specs'],
'exclude' => true,
'sorting' => true,
'inputType' => 'multiColumnWizard',
'eval' => array
(
'columnFields' => array
(
'spectitle' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['spectitle'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('style'=>'width:280px'),
),
'specvalue' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['specvalue'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('style'=>'width:280px'),
)
)
),
'sql' => "blob NULL",
),
'singleSRC' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_catalog_product']['singleSRC'],
Expand Down Expand Up @@ -591,7 +553,9 @@ public function getProducts(DataContainer $dc)

while( $objItems->next() )
{
if ($objItems->id !== $dc->activeRecord->id) {
$arrItems[$objItems->id] = $objItems->title . ' (' . $objItems->model . ')' ;
}
}

return $arrItems;
Expand Down
13 changes: 3 additions & 10 deletions languages/en/tl_catalog_product.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@
$GLOBALS['TL_LANG']['tl_catalog_product']['title'] = array('Product title', 'Please enter the product title.');
$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']['date'] = array('Date', 'Please enter the date according to the global date format.');
$GLOBALS['TL_LANG']['tl_catalog_product']['description'] = array('Product description','Here you can enter a short description of the product which will be evaluated by search engines like Google or Yahoo. Search engines usually indicate between 150 and 300 characters.');
$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).');
$GLOBALS['TL_LANG']['tl_catalog_product']['spec'] = array('Specifications','Please eneter the product specifications.');
$GLOBALS['TL_LANG']['tl_catalog_product']['features'] = array('Features','Please eneter the product features.');
$GLOBALS['TL_LANG']['tl_catalog_product']['spectitle'] = array('Title','Specifications title');
$GLOBALS['TL_LANG']['tl_catalog_product']['specvalue'] = array('Value','Specifications value');
$GLOBALS['TL_LANG']['tl_catalog_product']['singleSRC'] = array('Source file','Please select an image.');
$GLOBALS['TL_LANG']['tl_catalog_product']['addEnclosure']= array('Add enclosures', 'Add one or more downloadable files to the news item.');
$GLOBALS['TL_LANG']['tl_catalog_product']['enclosure'] = array('Enclosures', 'Please choose the files you want to attach.');
Expand All @@ -40,12 +36,9 @@
*/
$GLOBALS['TL_LANG']['tl_catalog_product']['title_legend'] = 'Product title';
$GLOBALS['TL_LANG']['tl_catalog_product']['meta_legend'] = 'Meta information for SEO';
$GLOBALS['TL_LANG']['tl_catalog_product']['spec_legend'] = 'Other specifications';
$GLOBALS['TL_LANG']['tl_catalog_product']['feature_legend'] = 'Feature specifications';
$GLOBALS['TL_LANG']['tl_catalog_product']['config_legend'] = 'Date and feature';
$GLOBALS['TL_LANG']['tl_catalog_product']['enclosure_legend'] = 'Enclosures';
$GLOBALS['TL_LANG']['tl_catalog_product']['image_legend'] = 'Image settings';
$GLOBALS['TL_LANG']['tl_catalog_product']['table_legend'] = 'Specifications table';
$GLOBALS['TL_LANG']['tl_catalog_product']['description_legend'] = 'Description';
$GLOBALS['TL_LANG']['tl_catalog_product']['related_legend'] = 'Related products';
$GLOBALS['TL_LANG']['tl_catalog_product']['protected_legend'] = 'Access protection';
$GLOBALS['TL_LANG']['tl_catalog_product']['publish_legend'] = 'Publish setting';
Expand Down
11 changes: 1 addition & 10 deletions modules/ModuleCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Class ModuleCatalog
*
* Parent class for kitchenware modules.
* Parent class for catalog modules.
* @copyright Hamid Abbaszadeh 2014
* @author Hamid Abbaszadeh <https://respinar.com>
* @package Kitchenware
Expand Down Expand Up @@ -100,15 +100,6 @@ protected function parseProduct($objProduct, $blnAddCategory=false, $strClass=''
$objTemplate->new_product = true;
}

$objTemplate->features = deserialize($objProduct->features);
if ($objTemplate->features[0] == null) {
$objTemplate->features = null;
}
$objTemplate->specs = deserialize($objProduct->specs);
if ($objTemplate->specs[0] == null) {
$objTemplate->specs = null;
}

$objTemplate->link = $this->generateProductUrl($objProduct, $blnAddCategory);
$objTemplate->more = $this->generateLink($GLOBALS['TL_LANG']['MSC']['moredetail'], $objProduct, $blnAddCategory, true);

Expand Down
22 changes: 0 additions & 22 deletions templates/product/product_full.html5
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,6 @@

</figure>

<?php if($this->features) { ?>
<div class="features">
<h3><?php echo $this->features_text; ?></h3>
<ul>
<?php foreach($this->features as $feature) { ?>
<li><?php echo $feature; ?></li>
<?php } ?>
</ul>
</div>
<?php } ?>

<?php if($this->specs) { ?>
<div class="specs">
<h3><?php echo $this->specs_text; ?></h3>
<ul>
<?php foreach($this->specs as $spec) { ?>
<li><?php echo $spec[spectitle]; ?>:<?php echo $spec[specvalue]; ?></li>
<?php } ?>
</ul>
</div>
<?php } ?>

<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
Expand Down
8 changes: 4 additions & 4 deletions templates/product/product_full.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

</figure>

<?php if($this->features !== null) { ?>
<?php if($this->features) { ?>
<div class="features">
<h3>ویژگی‌ها</h3>
<h3><?php echo $this->features_text; ?></h3>
<ul>
<?php foreach($this->features as $feature) { ?>
<li><?php echo $feature; ?></li>
Expand All @@ -38,9 +38,9 @@
</div>
<?php } ?>

<?php if($this->specs !== null) { ?>
<?php if($this->specs) { ?>
<div class="specs">
<h3>خصوصیات</h3>
<h3><?php echo $this->specs_text; ?></h3>
<ul>
<?php foreach($this->specs as $spec) { ?>
<li><?php echo $spec[spectitle]; ?>:<?php echo $spec[specvalue]; ?></li>
Expand Down

0 comments on commit 0085bad

Please sign in to comment.