danxg
19-03-2013, 13:03
Witam,
potrzebuje pomocy w poniższym problemie:
Po wykonaniu poniższego kodu :
for($i = 0; $i < count ( $rowitem ); $i ++)
{
$product = $producthelper->getProductById ( $rowitem[$i]->product_id );
$zm = $producthelper->getzm( $rowitem[$i]->product_id ); //moje modyfikacja
$manufacturerData = $producthelper->getSection("manufacturer",$product->manufacturer_id);
if(count($manufacturerData)>0)
{
if($manufacturerData->manufacturer_email!='')
{
$manufacturer_email[$i] = $manufacturerData->manufacturer_email;
$tabzm[$i] = $zm; //moje modyfikacja
}
}
$supplierData = $producthelper->getSection("supplier",$product->supplier_id);
if(count($supplierData)>0)
{
if($supplierData->supplier_email!='')
{
$supplier_email[$i] = $supplierData->supplier_email;
}
}
ścieżka pliku: components/com_redshop/helpers
oraz dodaniu całkowicie nowej przezemnie napisanej funkcji:
function getzm($product_id)
{
$query = $this->_db->getQuery(true);
$query->select(' zmienna_dodatkowa ');
$query->from($this->_table_prefix.'product');
$query->where('product_id = "'. $product_id.'"');
if($this->_id != $product_id )
{
$this->_db->setQuery($query);
$this->setId($product_id);
$result = $this->_data = $this->_db->loadObject();
}else{
$result = $this->_data;
}
return $result;
}
ścieżka pliku: administrator/components/com_redshop/helpers
Wyskakuje po wywołaniu tablicy $tabzm[] poniższy error:
"Catchable fatal error: Object of class stdClass could not be converted to string in"
Może ktoś pomóc jak wydobyć z bazy potrzebną tablice kolumny "zmienna_dodatkowa"?
Problem jest z konwertowaniem i nie wiem jak to przeskoczyć :(:zagubiony:
Proszę o pomoc
pzdr
potrzebuje pomocy w poniższym problemie:
Po wykonaniu poniższego kodu :
for($i = 0; $i < count ( $rowitem ); $i ++)
{
$product = $producthelper->getProductById ( $rowitem[$i]->product_id );
$zm = $producthelper->getzm( $rowitem[$i]->product_id ); //moje modyfikacja
$manufacturerData = $producthelper->getSection("manufacturer",$product->manufacturer_id);
if(count($manufacturerData)>0)
{
if($manufacturerData->manufacturer_email!='')
{
$manufacturer_email[$i] = $manufacturerData->manufacturer_email;
$tabzm[$i] = $zm; //moje modyfikacja
}
}
$supplierData = $producthelper->getSection("supplier",$product->supplier_id);
if(count($supplierData)>0)
{
if($supplierData->supplier_email!='')
{
$supplier_email[$i] = $supplierData->supplier_email;
}
}
ścieżka pliku: components/com_redshop/helpers
oraz dodaniu całkowicie nowej przezemnie napisanej funkcji:
function getzm($product_id)
{
$query = $this->_db->getQuery(true);
$query->select(' zmienna_dodatkowa ');
$query->from($this->_table_prefix.'product');
$query->where('product_id = "'. $product_id.'"');
if($this->_id != $product_id )
{
$this->_db->setQuery($query);
$this->setId($product_id);
$result = $this->_data = $this->_db->loadObject();
}else{
$result = $this->_data;
}
return $result;
}
ścieżka pliku: administrator/components/com_redshop/helpers
Wyskakuje po wywołaniu tablicy $tabzm[] poniższy error:
"Catchable fatal error: Object of class stdClass could not be converted to string in"
Może ktoś pomóc jak wydobyć z bazy potrzebną tablice kolumny "zmienna_dodatkowa"?
Problem jest z konwertowaniem i nie wiem jak to przeskoczyć :(:zagubiony:
Proszę o pomoc
pzdr