function Celebros_Conversionpro_Model_Api_QwiserConcept($ConceptNode) { if (is_object($ConceptNode)) { $this->Id = $ConceptNode->get_attribute("Id"); $this->Name = $ConceptNode->get_attribute("Name"); $this->Rank = $ConceptNode->get_attribute("Rank"); $this->Type = $ConceptNode->get_attribute("Type"); $this->DynamicProperties = GetQwiserSimpleStringDictionary(current($ConceptNode->get_elements_by_tagname("DynamicProperties"))); } }
function Celebros_Conversionpro_Model_Api_QwiserAnswer($AnswerNode) { if (is_object($AnswerNode)) { $this->Id = $AnswerNode->get_attribute("Id"); $this->ImageHeight = $AnswerNode->get_attribute("ImageHeight"); $this->ImageSku = $AnswerNode->get_attribute("ImageSku"); $this->ImageUrl = $AnswerNode->get_attribute("ImageUrl"); $this->ImageWidth = $AnswerNode->get_attribute("ImageWidth"); $this->ProductCount = $AnswerNode->get_attribute("ProductCount"); $this->Text = $AnswerNode->get_attribute("Text"); $this->Type = $AnswerNode->get_attribute("Type"); $this->DynamicProperties = GetQwiserSimpleStringDictionary(current($AnswerNode->get_elements_by_tagname("DynamicProperties"))); } }
function Celebros_Conversionpro_Model_Api_QwiserQuestion($QuestionNode) { if (is_object($QuestionNode)) { $this->Id = $QuestionNode->get_attribute("Id"); $this->Rank = $QuestionNode->get_attribute("Rank"); $this->SideText = $QuestionNode->get_attribute("SideText"); $this->Text = $QuestionNode->get_attribute("Text"); $this->Type = $QuestionNode->get_attribute("Type"); $this->Answers = Mage::getModel('conversionpro/Api_QwiserAnswers', current($QuestionNode->get_elements_by_tagname("Answers"))); $this->ExtraAnswers = Mage::getModel('conversionpro/Api_QwiserAnswers', current($QuestionNode->get_elements_by_tagname("ExtraAnswers"))); $this->HasMoreAnswers = $this->ExtraAnswers->Count > 0 ? true : false; //Question dynamic properties $QuestionDynamicProperties = null; $childNodes = $QuestionNode->child_nodes(); $childNodes = getDomElements($childNodes); for ($i = 0; $i <= count($childNodes) - 1; $i++) { $childNode = $childNodes[$i]; if ($childNode->node_name() == "DynamicProperties") { $QuestionDynamicProperties = $childNode; } } $this->DynamicProperties = GetQwiserSimpleStringDictionary($QuestionDynamicProperties); } }