diff --git a/dca/tl_module.php b/dca/tl_module.php index 408d498..f32af33 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -18,14 +18,14 @@ $GLOBALS['TL_DCA']['tl_module']['palettes']['product_list'] = '{title_legend},name,headline,type; {catalog_legend},product_catalogs,product_categories,product_featured,product_detailModule,product_sortBy,numberOfItems,perPage,skipFirst; {template_legend},product_metaFields,customTpl; - {product_legend},product_template,imgSize,product_perRow,product_Class; + {product_legend},product_template,imgSize,product_list_Class,product_Class; {protected_legend:hide},protected; {expert_legend:hide},guests,cssID,space'; $GLOBALS['TL_DCA']['tl_module']['palettes']['product_detail'] = '{title_legend},name,headline,type; {catalog_legend},product_catalogs; {template_legend},product_metaFields,customTpl; {product_legend},product_template; - {related_legend},related_show,related_template,related_imgSize,related_perRow,related_Class; + {related_legend},related_show,related_template,related_imgSize,product_list_Class,related_Class; {protected_legend:hide},protected; {expert_legend:hide},guests,cssID,space'; @@ -103,15 +103,13 @@ 'eval' => array('tl_class'=>'w50'), 'sql' => "varchar(64) NOT NULL default ''" ); -$GLOBALS['TL_DCA']['tl_module']['fields']['product_perRow'] = array +$GLOBALS['TL_DCA']['tl_module']['fields']['product_list_Class'] = array ( - 'label' => &$GLOBALS['TL_LANG']['tl_module']['product_perRow'], - 'default' => '4', - 'exclude' => true, - 'inputType' => 'select', - 'options' => array('1','2','3','4','5','6','7','8','9','10','11','12'), - 'eval' => array('tl_class'=>'w50'), - 'sql' => "varchar(64) NOT NULL default ''" + 'label' => &$GLOBALS['TL_LANG']['tl_module']['product_list_Class'], + 'exclude' => true, + 'inputType' => 'text', + 'eval' => array('maxlength'=>128, 'tl_class'=>'w50'), + 'sql' => "varchar(255) NOT NULL default ''" ); $GLOBALS['TL_DCA']['tl_module']['fields']['product_Class'] = array ( @@ -148,16 +146,6 @@ 'eval' => array('maxlength'=>128, 'tl_class'=>'w50'), 'sql' => "varchar(255) NOT NULL default ''" ); -$GLOBALS['TL_DCA']['tl_module']['fields']['related_perRow'] = array -( - 'label' => &$GLOBALS['TL_LANG']['tl_module']['related_perRow'], - 'default' => '4', - 'exclude' => true, - 'inputType' => 'select', - 'options' => array('1','2','3','4','5','6','7','8','9','10','11','12'), - 'eval' => array('tl_class'=>'w50'), - 'sql' => "varchar(64) NOT NULL default ''" -); $GLOBALS['TL_DCA']['tl_module']['fields']['related_imgSize'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_module']['related_imgSize'], diff --git a/languages/en/tl_module.php b/languages/en/tl_module.php index 8bcfce9..cc99ad0 100644 --- a/languages/en/tl_module.php +++ b/languages/en/tl_module.php @@ -23,13 +23,11 @@ $GLOBALS['TL_LANG']['tl_module']['product_sortBy'] = array('Sort by','Here you can select the sorting fields.'); $GLOBALS['TL_LANG']['tl_module']['product_template'] = array('Product template','Here you can select the product template.'); $GLOBALS['TL_LANG']['tl_module']['product_Class'] = array('Product CSS class','Here you can set one or more classes for products.'); -$GLOBALS['TL_LANG']['tl_module']['product_perRow'] = array('Product per row','Here you can set the image dimensions and the resize mode.'); +$GLOBALS['TL_LANG']['tl_module']['product_list_Class'] = array('Product list class','Here you can set one or more classes for products list.'); $GLOBALS['TL_LANG']['tl_module']['related_show'] = array('Show related product','Here you can set one or more classes for types.'); $GLOBALS['TL_LANG']['tl_module']['related_template'] = array('Related product template','Here you can select the related product template.'); $GLOBALS['TL_LANG']['tl_module']['related_Class'] = array('Related product CSS class','Here you can set one or more classes for related products.'); $GLOBALS['TL_LANG']['tl_module']['related_imgSize'] = array('Related product image width and height','Here you can set the image dimensions and the resize mode.'); -$GLOBALS['TL_LANG']['tl_module']['related_perRow'] = array('Type per row','The number of items per row.'); - /** diff --git a/languages/fa/tl_module.php b/languages/fa/tl_module.php index ad1808b..743e345 100644 --- a/languages/fa/tl_module.php +++ b/languages/fa/tl_module.php @@ -8,7 +8,7 @@ * * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL * - * last-updated: 2016-01-08T15:43:29+00:00 + * last-updated: 2017-07-29T07:20:39+00:00 */ $GLOBALS['TL_LANG']['tl_module']['all_product'] = 'همه محصولات'; @@ -24,16 +24,14 @@ $GLOBALS['TL_LANG']['tl_module']['catalogs']['0'] = 'کاتالوگ‌ها'; $GLOBALS['TL_LANG']['tl_module']['catalogs']['1'] = 'لطفا یک یا چند کاتالوگ را انتخاب نمایید.'; $GLOBALS['TL_LANG']['tl_module']['custom'] = 'ترتیب اختصاصی'; -$GLOBALS['TL_LANG']['tl_module']['date_asc'] = 'تاریخ (قدیمی‌تر)'; -$GLOBALS['TL_LANG']['tl_module']['date_desc'] = 'تاریخ (جدیدتر)'; +$GLOBALS['TL_LANG']['tl_module']['date_asc'] = 'تاریخ (جدیدتر)'; +$GLOBALS['TL_LANG']['tl_module']['date_desc'] = 'تاریخ (قدیمی‌تر)'; $GLOBALS['TL_LANG']['tl_module']['featured_product'] = 'محصولات ویژه'; $GLOBALS['TL_LANG']['tl_module']['product_Class']['0'] = 'کلاس سی‌اس‌اس محصول'; $GLOBALS['TL_LANG']['tl_module']['product_Class']['1'] = 'اینجا می‌توانید یک یا چند کلاس به محصولات تنظیم کنید.'; $GLOBALS['TL_LANG']['tl_module']['product_detailModule']['0'] = 'ماژول جزئیات محصول'; $GLOBALS['TL_LANG']['tl_module']['product_featured']['0'] = 'محصول ویژه'; $GLOBALS['TL_LANG']['tl_module']['product_legend'] = 'تنظیمات محصول'; -$GLOBALS['TL_LANG']['tl_module']['product_perRow']['0'] = 'محصول در هر ردیف'; -$GLOBALS['TL_LANG']['tl_module']['product_perRow']['1'] = 'اینجا می‌توانید ابعاد و حالت تغییر اندازه تصویر را تنظیم نمایید.'; $GLOBALS['TL_LANG']['tl_module']['product_sortBy']['0'] = 'مرتب‌سازی'; $GLOBALS['TL_LANG']['tl_module']['product_template']['0'] = 'قالب محصول'; $GLOBALS['TL_LANG']['tl_module']['product_template']['1'] = 'اینجا می‌توانید قالب محصول را انتخاب نمایید.'; @@ -51,16 +49,5 @@ $GLOBALS['TL_LANG']['tl_module']['related_template']['1'] = 'اینجا می‌توانید قالب محصول مرتبط را انتخاب نمایید.'; $GLOBALS['TL_LANG']['tl_module']['title_asc'] = 'عنوان (الف-ی)'; $GLOBALS['TL_LANG']['tl_module']['title_desc'] = 'عنوان (ی-الف)'; -$GLOBALS['TL_LANG']['tl_module']['type_Class']['0'] = 'کلاس سی‌اس‌اس کالای مشابه'; -$GLOBALS['TL_LANG']['tl_module']['type_Class']['1'] = 'اینجا می‌توانید یک یا چند کلاس برای کالای مشابه انتخاب نمایید.'; -$GLOBALS['TL_LANG']['tl_module']['type_imgSize']['0'] = 'عرض و ارتفاع تصویر کالای مشابه'; -$GLOBALS['TL_LANG']['tl_module']['type_imgSize']['1'] = 'اینجا می‌توانید ابعاد و حالت تغییر اندازه تصویر را تنظیم نمایید.'; -$GLOBALS['TL_LANG']['tl_module']['type_legend'] = 'تنظیمات انواع کالا'; -$GLOBALS['TL_LANG']['tl_module']['type_perRow']['0'] = 'کالای مشابه در هر ردیف'; -$GLOBALS['TL_LANG']['tl_module']['type_perRow']['1'] = 'تعداد آیتم‌ها در هر ردیف.'; -$GLOBALS['TL_LANG']['tl_module']['type_show']['0'] = 'نمایش کالاهای مشابه'; -$GLOBALS['TL_LANG']['tl_module']['type_show']['1'] = 'اینجا می‌توانید یک یا چند کلاس برای کالاهای مشابه تنظیم نمایید.'; -$GLOBALS['TL_LANG']['tl_module']['type_template']['0'] = 'قالب نوع‌ها'; -$GLOBALS['TL_LANG']['tl_module']['type_template']['1'] = 'اینجا می‌توانید قالب کالای مشابه را انتخاب نمایید.'; $GLOBALS['TL_LANG']['tl_module']['unfeatured_product'] = 'محصولات غیرویژه'; diff --git a/library/Respinar/Products/Frontend/Element/ContentProduct.php b/library/Respinar/Products/Frontend/Element/ContentProduct.php index bbdff73..efc6252 100644 --- a/library/Respinar/Products/Frontend/Element/ContentProduct.php +++ b/library/Respinar/Products/Frontend/Element/ContentProduct.php @@ -205,11 +205,9 @@ protected function parseProducts($objProducts, $blnAddCategory=false) { $objProduct = $objProducts->current(); - $arrProducts[] = $this->parseProduct($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->product_perRow) == 0) ? ' last_col' : '') . ((($count % $this->product_perRow) == 1) ? ' first_col' : ''), $count); + $arrProducts[] = $this->parseProduct($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : ''), $count); } - $arrProducts = array_chunk($arrProducts,$this->product_perRow); - return $arrProducts; } @@ -411,11 +409,9 @@ protected function parseRelateds($objProducts, $blnAddCategory=false) { $objProduct = $objProducts->current(); - $arrProducts[] = $this->parseRelated($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->related_perRow) == 0) ? ' last_col' : '') . ((($count % $this->related_perRow) == 1) ? ' first_col' : ''), $count); + $arrProducts[] = $this->parseRelated($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : ''), $count); } - $arrProducts = array_chunk($arrProducts,$this->related_perRow); - return $arrProducts; } diff --git a/library/Respinar/Products/Frontend/Module/ModuleProduct.php b/library/Respinar/Products/Frontend/Module/ModuleProduct.php index 83de58b..0af3b08 100644 --- a/library/Respinar/Products/Frontend/Module/ModuleProduct.php +++ b/library/Respinar/Products/Frontend/Module/ModuleProduct.php @@ -205,11 +205,9 @@ protected function parseProducts($objProducts, $blnAddCategory=false) { $objProduct = $objProducts->current(); - $arrProducts[] = $this->parseProduct($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->product_perRow) == 0) ? ' last_col' : '') . ((($count % $this->product_perRow) == 1) ? ' first_col' : ''), $count); + $arrProducts[] = $this->parseProduct($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : ''), $count); } - $arrProducts = array_chunk($arrProducts,$this->product_perRow); - return $arrProducts; } @@ -411,11 +409,9 @@ protected function parseRelateds($objProducts, $blnAddCategory=false) { $objProduct = $objProducts->current(); - $arrProducts[] = $this->parseRelated($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : '') . ((($count % $this->related_perRow) == 0) ? ' last_col' : '') . ((($count % $this->related_perRow) == 1) ? ' first_col' : ''), $count); + $arrProducts[] = $this->parseRelated($objProduct, $blnAddCategory, ((++$count == 1) ? ' first' : '') . (($count == $limit) ? ' last' : ''), $count); } - $arrProducts = array_chunk($arrProducts,$this->related_perRow); - return $arrProducts; } diff --git a/templates/modules/mod_product_detail.html5 b/templates/modules/mod_product_detail.html5 index dce099f..7bcfc39 100644 --- a/templates/modules/mod_product_detail.html5 +++ b/templates/modules/mod_product_detail.html5 @@ -2,20 +2,20 @@ block('content'); ?> - product; ?> + product; ?> relateds)): ?> -
-

relateds_headline; ?>

-