[TYPO3-commerce] ###SELECT_ATTRIBUTES_VALUE### resolved as empty string
Rainer Th
hsnews at web-me.de
Sat Jan 5 01:54:07 CET 2008
Voila! If I go back to the last revision of lib/class.tx_commerce_product.php the problem no longer exists: my attributes are shown
again.
Rastung: 8 x 45°
Durchmesser: 380 mm
ESD-Ableitung: keine
This is what I did:
typo3conf/ext/commerce/lib$ svn update -r PREV class.tx_commerce_product.php
G class.tx_commerce_product.php
Updated to revision 7382.
So the secret is within this diff and the last modification to class.tx_commerce_product.php should be reviewed - IMO. Possibly
there are related bug reports already pending (6599?).
typo3conf/ext/commerce/lib$ svn diff -r PREV:HEAD class.tx_commerce_product.php
Index: class.tx_commerce_product.php
===================================================================
--- class.tx_commerce_product.php (revision 7104)
+++ class.tx_commerce_product.php (revision 7825)
@@ -534,7 +534,7 @@
if (($result_value) && ($GLOBALS['TYPO3_DB']->sql_num_rows($result_value)>0)) {
while ($value=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($result_value))
{
- if (strlen($value['value_char'])>0) {
+ #if (strlen($value['value_char'])>0) {
if ($this->lang_uid>0) {
/**
@@ -569,7 +569,7 @@
$valuelist[]=$value['value_char'];
$valueshown=true;
}
- }
+ #}
}
}
@@ -582,7 +582,7 @@
if (($valueshown == false) && ($result_value) &&
($GLOBALS['TYPO3_DB']->sql_num_rows($result_value)>0)){
while ($value=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($result_value))
{
- if ($value['default_value']>0) {
+ #if ($value['default_value']>0) {
if ($this->lang_uid>0){
/**
@@ -614,7 +614,7 @@
$valuelist[]=$value['default_value'];
$valueshown=true;
}
- }
+ #}
}
}
@@ -816,24 +816,7 @@
- /**
- * Generates a Matrix fro these concerning products for all Attributes and the values therfor
- * Realy complex array, so have a lokk at the source
- *
- * @param $attribute Exclude List array (list auf attriubute uids to exclkude)
- * @param $showHiddenValues default true (if hidden values should be shown)
- * @return array of arrays
- * @todo split DB connects to db_class
- * @since 2005 11 02 $showHiddenValues
- * @since 2005 11 02 Array of arrays also contains valueformat
- * @since 2005 11 02 Array of arrays also contains internal_title
- * @drepricated
- */
- function get_product_atrribute_matrix($attribute_include=false, $showHiddenValues=true,$sortingTable =
'tx_commerce_products_attributes_mm'){
-
- return get_product_atrribute_matrix($attribute_include, $showHiddenValues,$sortingTable );
- }
/**
@@ -935,8 +918,7 @@
{
while ($value=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($result_value))
{
- if (strlen($value['default_value'])>0)
- {
+ #if (strlen($value['default_value'])>0){
if ($this->lang_uid>0)
{
@@ -970,7 +952,7 @@
$valueUidList[] = 0;
$valueshown=true;
}
- }
+ #}
}
}
$result_value=$GLOBALS['TYPO3_DB']->exec_SELECT_mm_query('distinct
tx_commerce_products_attributes_mm.uid_valuelist ',
@@ -1210,7 +1192,7 @@
function get_product_atrribute_matrix($attribute_include=false, $showHiddenValues=true,$sortingTable =
'tx_commerce_products_attributes_mm'){
- return get_product_atrribute_matrix($attribute_include, $showHiddenValues,$sortingTable );
+ return $this->get_product_attribute_matrix($attribute_include, $showHiddenValues,$sortingTable );
}
}
More information about the TYPO3-project-commerce
mailing list