...

View Full Version : Notice: Undefined property



JordanSmith
02-25-2012, 06:53 PM
Hi,

I was wondering if someone can help me, I keep getting these errors.

Notice: Undefined property: stdClass::$vOptionType in /default/commonFunctions.php on line 267

That is the line from the file.


if($rsOptions[$j]->vOptionType=='colour_fromcsv' || $rsOptions[$j]->vOptionType=='size_fromcsv')

I was wondering if someone could tell me what it means and possible point me in the right direction on how to fix the issue.

Thanks,
Jordan

chose
02-25-2012, 07:22 PM
You could post a little more code, but it looks like a property "vOptionType" is not definied,
define or check it before comparison

JordanSmith
02-25-2012, 07:34 PM
Hi,

Here is more of the code.


#PRODUCT(TABLE) OPTION ID
if($kit==1)
{
$this->ObTpl->set_var("TPL_VAR_FIELDNAME","option_kit_".$this->productId."_".$rsPoptions[$i]->iOptionid);
}
else
{
$this->ObTpl->set_var("TPL_VAR_FIELDNAME","option_".$this->productId."_".$rsPoptions[$i]->iOptionid);
}
if($rsOptions[$j]->iState){
$this->ObTpl->set_var("TPL_VAR_MANDATORY_CLASS","mandatory");
$this->ObTpl->set_var("STAR","*");
}else{
$this->ObTpl->set_var("TPL_VAR_MANDATORY_CLASS","formField");
$this->ObTpl->set_var("STAR","");
}

$this->ObTpl->set_var("TPL_VAR_TITLE",$this->libFunc->m_displayContent($rsOptions[$j]->vName));
if($rsOptions[$j]->vOptionType=='colour_fromcsv' || $rsOptions[$j]->vOptionType=='size_fromcsv')
{
$this->obDb->query="SELECT vSeoTitle FROM ".PRODUCTS." WHERE iProdid_PK='".$this->productId."'";
$seotitle = $this->obDb->fetchQuery();
$this->obDb->query ="SELECT vItem,vOptSku,iOptionValueid_PK,vImage,iUseInventory,";
$this->obDb->query.="fPrice,iInventory,iBackorder FROM ".OPTIONVALUES." WHERE ";
$this->obDb->query.="iOptionid_FK='".$rsOptions[$j]->iOptionid_PK."' AND vProdSeoTitle = '".$seotitle[0]->vSeoTitle."' ORDER BY iSort";
}else{
$this->obDb->query ="SELECT vItem,vOptSku,iOptionValueid_PK,vImage,iUseInventory,";
$this->obDb->query.="fPrice,iInventory,iBackorder FROM ".OPTIONVALUES." WHERE "; $this->obDb->query.="iOptionid_FK='".$rsOptions[$j]->iOptionid_PK."' ORDER BY iSort";
}
$rsOptionvalue=$this->obDb->fetchQuery();

$optValCount=$this->obDb->record_count;

if($optValCount>0)
{
$this->ObTpl->set_var("optvalue_blk","");
$this->ObTpl->set_var("optimg_blk","");
$arrOptId=0;

for($k=-1;$k<$optValCount;$k++)
{
if($k != "-1"){
$img=$this->libFunc->m_checkFile($rsOptionvalue[$k]->vImage,"options",$this->libFunc->m_displayContent($rsOptionvalue[$k]->vItem),0);
if(!$img || $adminSection==1)
{
$img= "";
}
}else{
$img= "";
}

Thanks,
Jordan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum