isactive condition added : ps
This commit is contained in:
parent
4fa4ba47ae
commit
6d5096ecd8
@ -285,6 +285,7 @@ class Template_Management_Model extends SPARQ_Model {
|
||||
$this->db->JOIN(ENTITY.' as ENTITY','TEMPLATE_MAP_V2.entity_id = ENTITY.entity_id','LEFT');
|
||||
$this->db->JOIN(PRODUCTS.' as PRODUCTS','TEMPLATE_MAP_V2.product_id = PRODUCTS.product_id','LEFT');
|
||||
$this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','TEMPLATE_MAP_V2.customer_segment_id = CUSTOMERSEGMENT.customer_segment_id','LEFT');
|
||||
$this->db->WHERE('TEMPLATE_MAP_V2.isactive',1);
|
||||
if(!empty($value)) {
|
||||
if(is_array($value)){
|
||||
if(isset($value['entity_id']))
|
||||
@ -312,6 +313,7 @@ class Template_Management_Model extends SPARQ_Model {
|
||||
$this->db->SELECT('TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_name as form_name,TEMPLATE_JSON_V2.json');
|
||||
$this->db->FROM(TEMPLATE_JSON_V2.' as TEMPLATE_JSON_V2');
|
||||
$this->db->JOIN(PDFORMS.' as PDFORMS','TEMPLATE_JSON_V2.form_id = PDFORMS.pd_form_id','LEFT');
|
||||
$this->db->WHERE('TEMPLATE_JSON_V2.isactive',1);
|
||||
$this->db->WHERE('TEMPLATE_JSON_V2.map_id',$value);
|
||||
$result = $this->db->GET()->result_array();
|
||||
return $result;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user