Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Notice: Undefined property

    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.

    PHP Code:
     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

  • #2
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    1
    Thanked 1 Time in 1 Post
    You could post a little more code, but it looks like a property "vOptionType" is not definied,
    define or check it before comparison

  • #3
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Here is more of the code.

    PHP 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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •