<?php

class GoogleProductFeedView extends Slot {

	var $SectionID = 19;
	var $ModuleID = 2;

	function __construct($pquery) {
		parent::__construct($pquery);
	}

	function init() {
		$this->Action->processEvent($this->SectionID,'collection',array(),$this);
		$this->setSchemeTemplate($this->Scheme);
	}

	function fillElements() {
		global $REGISTRY;
		header("Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate, post-check=0, pre-check=0, max-age=0",true);
		header("Pragma: no-cache",true);
		header("Content-type: text/xml");
		foreach($this->PreparedTemplates as $key => $value) {
			$this->TempFillEls['items'][$key] = $value;
			$this->TempFillEls['items'][$key]['name'] = trim(htmlentities(strip_tags($value['name'].' - '.$value['name'].' '.$value['product_class'].' '.$value['generation'].' '.$value['pid']),ENT_QUOTES, "UTF-8"));
			$this->TempFillEls['items'][$key]['desc'] = trim(htmlentities(strip_tags($value['name'].' '.$value['name'].' - high technology '.$value['product_class'].' device '.$value['desc']),ENT_QUOTES, "UTF-8"));
			$this->TempFillEls['items'][$key]['image'] = $this->ImageWPath.'/products/'.$value['image'].'/'.($value['itemtype']==1? 'big.jpg' : 'middle.png');
		}
	}
}
?>