Thread: Questions
View Single Post
  #12  
Old 09-01-2013, 01:36 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,671
IntoRain is on a distinguished road
Default

My item-related files are kinda modified at the moment, so they don't really have this mistake anymore, but I'll try to help

In class_shoplist

PHP Code:
 protected function setfetchmode($fetchmode){
     
// This method determines the fetchmode of shoplist
     
$whereclause "shoptype = '{$this->type}' ";
     switch(
$fetchmode){
        case 
"invisible":
           
$whereclause .= "and status='invisible'";
           break;
        case 
"open":
               
$whereclause .= "and status='open'";
               break;
           case 
"closed":
               
$whereclause .= "and status='closed'";
        default:
           
$whereclause .= "";        
     }
     
// End of Switch Statement
     
return $whereclause;
  } 
Is it like this? When you create a shoplist in Shop (or any other page you make for the hidden shops) you have to count the Construct which takes a fetchmode (open, closed or invisible), I don't know which arguments yours takes but I think it's at least fetchmode. So it's like:

$shoplist = new Shoplist("open") will only retrieve Shops with status = open
__________________


asp.net stole my soul.
Reply With Quote