Beispiel #1
0
 public function testAction()
 {
     //        $t = new OnlineShop_Framework_AbstractProduct();
     //        p_r($t);
     $x = OnlineShop_Framework_Factory::getInstance();
     //        p_r($x);
     $e = $x->getEnvironment();
     $e->setCurrentUserId(-1);
     p_r($e);
     //        p_r($e->getAllCustomItems());
     $cm = $x->getCartManager();
     //        $key = $cm->createCart(array("name" => "mycart"));
     $cm->addToCart(\Pimcore\Model\Object\Concrete::getById(430), 4, 14, array());
     //array("key" => 'mycart', "itemid" => 4459, "count" => 4));
     //        $e->setCustomItem("myitem2", "88776688");
     //        $e->save();
     $e = $x->getEnvironment();
     p_r($e);
     $x->saveState();
     //        $p = new OnlineShop_Plugin();
     //        p_r($p);
     die("meins");
 }
Beispiel #2
0
 /**
  * @param Document\Webservice\Data\Document\Element $wsElement
  * @param null $idMapper
  * @throws \Exception
  */
 public function getFromWebserviceImport($wsElement, $idMapper = null)
 {
     $data = $wsElement->value;
     if ($data->id !== null) {
         $this->type = $data->type;
         $this->subtype = $data->subtype;
         if (is_numeric($this->id)) {
             if ($idMapper) {
                 $id = $idMapper->getMappedId($this->type, $this->id);
             }
             if ($this->type == "asset") {
                 $this->o = Asset::getById($id);
                 if (!$this->o instanceof Asset) {
                     if ($idMapper && $idMapper->ignoreMappingFailures()) {
                         $idMapper->recordMappingFailure($this->getDocumentId(), $this->type, $this->id);
                     } else {
                         throw new \Exception("cannot get values from web service import - referenced asset with id [ " . $this->id . " ] is unknown");
                     }
                 }
             } else {
                 if ($this->type == "document") {
                     $this->o = Document::getById($id);
                     if (!$this->o instanceof Document) {
                         if ($idMapper && $idMapper->ignoreMappingFailures()) {
                             $idMapper->recordMappingFailure($this->getDocumentId(), $this->type, $this->id);
                         } else {
                             throw new \Exception("cannot get values from web service import - referenced document with id [ " . $this->id . " ] is unknown");
                         }
                     }
                 } else {
                     if ($this->type == "object") {
                         $this->o = Object::getById($id);
                         if (!$this->o instanceof Object\AbstractObject) {
                             if ($idMapper && $idMapper->ignoreMappingFailures()) {
                                 $idMapper->recordMappingFailure($this->getDocumentId(), $this->type, $this->id);
                             } else {
                                 throw new \Exception("cannot get values from web service import - referenced object with id [ " . $this->id . " ] is unknown");
                             }
                         }
                     } else {
                         p_r($this);
                         throw new \Exception("cannot get values from web service import - type is not valid");
                     }
                 }
             }
         } else {
             throw new \Exception("cannot get values from web service import - id is not valid");
         }
     }
 }
Beispiel #3
0
 public function fashAction()
 {
     //
     //        $string = '{"data":{"o_id":1953079,"o_classId":9,"o_virtualProductId":1953079,"o_virtualProductActive":true,"o_parentId":1953076,"o_type":"object","categoryIds":",829347,","parentCategoryIds":",829347,829346,","priceSystemName":"frischeis","active":true,"inProductList":true,"name":"UPM Veranda WPC Terrassendiele Silver Ash","combinedProductDescription":"UPM Veranda ist in den Farben\nBrasilian Walnut und Silver Ash erh\u00e4ltlich\nund ist beidseitig verwendbar.\n\nDie Oberfl\u00e4che mit Holzstruktur auf der\neinen Seite wie auch die fein geriffelte\nOberfl\u00e4che auf der anderen weisen\nnat\u00fcrlich wirkende unregelm\u00e4\u00dfige dunkle\nMaserungen auf.\n\nDie geschlossene Oberfl\u00e4che von UPM\nProFi Veranda zeichnet sich durch eine\ngute Widerstandsf\u00e4higkeit gegen\u00fcber\nFlecken und Verschmutzungen aus.\nDa UPM ProFi Veranda aus ligninfreien\nZellulosefasern gefertigt ist, bietet es zudem\noptimierte Farbbest\u00e4ndigkeit.\n\nUPM ProFi Veranda wird in Deutschland\nhergestellt.","remoteId":"55961\/4240","bk":"01","pme":"M","lme":"STK","thickness":25,"length":4000,"width":140,"vkPrice":13.9,"color":null,"qualitaet":null,"dauerhaftigkeitsklasse":null,"profileCoating":null,"profileProfileType":null,"profileSurface":null,"profileComposition":null,"terrassendieleTerraceType":"wpc","terrassendieleTerraceWoodSpecies":"terraceWoodSpecies31","timberQuality":null,"profiledTimberQuality":null,"constructionTimberDryness":null,"constructionTimberQualitySurface":null,"constructionTimberType":null,"constructionTimberSorting":null,"plywoodComposition":null,"plywoodSurface":null,"plywoodSurfaceStructure":null,"plywoodQuality":null,"plywoodBonding":null,"plywoodSpecies":null,"plywoodBondingGeneral":null,"plywoodSpeciesInnerPly":null,"brandName":null,"metaattributes":"#;#al#;#ok#;#","stockinformation01":null,"stockinformation02":null,"stockinformation03":null,"stockinformation04":null,"stockinformation05":null,"stockinformation08":null,"stockinformation09":null,"stockinformation10":null,"stockinformation13":null,"stockinformation14":null,"stockinformation15":null,"stockinformation21":null,"stockinformation22":null,"boardattributes":null,"boardProfiling":null,"boardRadiusBoard":null,"boardRadiusWindowSill":null,"boardDecking":null,"boardSinkMounting":null,"boardDecorOneSided":null,"boardWoodPanelLamella":null,"boardOsbJoint":null,"boardRawBoardJoint":null,"boardSupportingMaterial":null,"boardProductGroup":null,"boardClassification":null,"boardEmissionCategory":null,"boardCore":null,"decorDecortype":null,"decorHolzart":null,"decorFarbton":null,"decorBrightness":null,"decorTexture":null,"floorBodenbelag":null,"floorDesign":null,"floorVerbindung":null,"floorSurface":null,"floorStruktur":null,"floorColor":null,"floorsSpecies":null,"articleNumberSupplierFloor":null,"floorSorting":null,"floorSurfaceTreatment":null,"floorProfileType":null,"floorProfileHeightRange":null,"floorProfileSurface":null,"floorOilCapacity":null,"floorSkirtingSpecies":null,"floorProductLine":null,"floorComposition":null,"floorSkirtingFinish":null,"floorCollection":null,"floorBrightness":null,"floorTexture":null,"buildingMaterial":null,"buildingMaterialProduct":null,"buildingMaterialApplication":null,"buildingMaterialThermalConductivity":null,"buildingMaterialDensity":null,"doorSeries":null,"doorSurface":null,"doorWoodSpecies":null,"doorDirection":null,"doorGlazingType":null,"doorFrameType":null,"doorFrameEdgeFinish":null,"doorFittingType":null,"doorFittingSurface":null,"doorFittingKeyWay":null,"doorFittingEN1906Class":null,"doorFittingLayout":null,"doorFittingLeverOn":null,"doorFrameOrientation":null,"doorFrameWoodSpecies":null,"doorFittingSeries":null,"mainShopCategoryName":"WPC Terrasse","mainShopCategorySearchTerms":"  "},"relations":[{"src":1953079,"src_virtualProductId":1953079,"dest":36537,"fieldname":"mainProductImage","type":"asset"},{"src":1953079,"src_virtualProductId":1953079,"dest":829347,"fieldname":"mainShopCategory","type":"object"},{"src":1953079,"src_virtualProductId":1953079,"dest":1949893,"fieldname":"technologies","type":"object"},{"src":1953079,"src_virtualProductId":1953079,"dest":32886,"fieldname":"supplier","type":"object"}],"subtenants":[]}';
     //        $crc = crc32($string);
     //        p_r($crc);
     //
     //
     //
     //        $string = '{"data":{"o_id":1953079,"o_classId":9,"o_virtualProductId":1953079,"o_virtualProductActive":true,"o_parentId":1953076,"o_type":"object","categoryIds":",829347,","parentCategoryIds":",829347,829346,","priceSystemName":"frischeis","active":true,"inProductList":true,"name":"UPM Veranda WPC Terrassendiele Silver Ash..","combinedProductDescription":"UPM Veranda ist in den Farben\nBrasilian Walnut und Silver Ash erh\u00e4ltlich\nund ist beidseitig verwendbar.\n\nDie Oberfl\u00e4che mit Holzstruktur auf der\neinen Seite wie auch die fein geriffelte\nOberfl\u00e4che auf der anderen weisen\nnat\u00fcrlich wirkende unregelm\u00e4\u00dfige dunkle\nMaserungen auf.\n\nDie geschlossene Oberfl\u00e4che von UPM\nProFi Veranda zeichnet sich durch eine\ngute Widerstandsf\u00e4higkeit gegen\u00fcber\nFlecken und Verschmutzungen aus.\nDa UPM ProFi Veranda aus ligninfreien\nZellulosefasern gefertigt ist, bietet es zudem\noptimierte Farbbest\u00e4ndigkeit.\n\nUPM ProFi Veranda wird in Deutschland\nhergestellt.","remoteId":"55961\/4240","bk":"01","pme":"M","lme":"STK","thickness":25,"length":4000,"width":140,"vkPrice":13.9,"color":null,"qualitaet":null,"dauerhaftigkeitsklasse":null,"profileCoating":null,"profileProfileType":null,"profileSurface":null,"profileComposition":null,"terrassendieleTerraceType":"wpc","terrassendieleTerraceWoodSpecies":"terraceWoodSpecies31","timberQuality":null,"profiledTimberQuality":null,"constructionTimberDryness":null,"constructionTimberQualitySurface":null,"constructionTimberType":null,"constructionTimberSorting":null,"plywoodComposition":null,"plywoodSurface":null,"plywoodSurfaceStructure":null,"plywoodQuality":null,"plywoodBonding":null,"plywoodSpecies":null,"plywoodBondingGeneral":null,"plywoodSpeciesInnerPly":null,"brandName":null,"metaattributes":"#;#al#;#ok#;#","stockinformation01":null,"stockinformation02":null,"stockinformation03":null,"stockinformation04":null,"stockinformation05":null,"stockinformation08":null,"stockinformation09":null,"stockinformation10":null,"stockinformation13":null,"stockinformation14":null,"stockinformation15":null,"stockinformation21":null,"stockinformation22":null,"boardattributes":null,"boardProfiling":null,"boardRadiusBoard":null,"boardRadiusWindowSill":null,"boardDecking":null,"boardSinkMounting":null,"boardDecorOneSided":null,"boardWoodPanelLamella":null,"boardOsbJoint":null,"boardRawBoardJoint":null,"boardSupportingMaterial":null,"boardProductGroup":null,"boardClassification":null,"boardEmissionCategory":null,"boardCore":null,"decorDecortype":null,"decorHolzart":null,"decorFarbton":null,"decorBrightness":null,"decorTexture":null,"floorBodenbelag":null,"floorDesign":null,"floorVerbindung":null,"floorSurface":null,"floorStruktur":null,"floorColor":null,"floorsSpecies":null,"articleNumberSupplierFloor":null,"floorSorting":null,"floorSurfaceTreatment":null,"floorProfileType":null,"floorProfileHeightRange":null,"floorProfileSurface":null,"floorOilCapacity":null,"floorSkirtingSpecies":null,"floorProductLine":null,"floorComposition":null,"floorSkirtingFinish":null,"floorCollection":null,"floorBrightness":null,"floorTexture":null,"buildingMaterial":null,"buildingMaterialProduct":null,"buildingMaterialApplication":null,"buildingMaterialThermalConductivity":null,"buildingMaterialDensity":null,"doorSeries":null,"doorSurface":null,"doorWoodSpecies":null,"doorDirection":null,"doorGlazingType":null,"doorFrameType":null,"doorFrameEdgeFinish":null,"doorFittingType":null,"doorFittingSurface":null,"doorFittingKeyWay":null,"doorFittingEN1906Class":null,"doorFittingLayout":null,"doorFittingLeverOn":null,"doorFrameOrientation":null,"doorFrameWoodSpecies":null,"doorFittingSeries":null,"mainShopCategoryName":"WPC Terrasse","mainShopCategorySearchTerms":"  "},"relations":[{"src":1953079,"src_virtualProductId":1953079,"dest":36537,"fieldname":"mainProductImage","type":"asset"},{"src":1953079,"src_virtualProductId":1953079,"dest":829347,"fieldname":"mainShopCategory","type":"object"},{"src":1953079,"src_virtualProductId":1953079,"dest":1949893,"fieldname":"technologies","type":"object"},{"src":1953079,"src_virtualProductId":1953079,"dest":32886,"fieldname":"supplier","type":"object"}],"subtenants":[]}';
     //        $crc = crc32($string);
     //        p_r($crc);
     p_r($this->getParam("hugo"));
     die("done");
 }
<?php

include "inc/global.php";
MagratheaModel::IncludeAllModels();
$shorts = new ShortControl();
$all = $shorts->GetAllShorts();
p_r($all);
Beispiel #5
0
 /**
  * Receives a Webservice_Data_Document_Element from webservice import and fill the current tag's data
  *
  * @abstract
  * @param  Webservice_Data_Document_Element $data
  * @return void
  */
 public function getFromWebserviceImport($wsElement)
 {
     $data = $wsElement->value;
     if ($data->id !== null) {
         $this->type = $data->type;
         $this->subtype = $data->subtype;
         $this->id = $data->id;
         if (is_numeric($this->id)) {
             if ($this->type == "asset") {
                 $this->o = Asset::getById($this->id);
                 if (!$this->o instanceof Asset) {
                     throw new Exception("cannot get values from web service import - referenced asset with id [ " . $this->id . " ] is unknown");
                 }
             } else {
                 if ($this->type == "document") {
                     $this->o = Document::getById($this->id);
                     if (!$this->o instanceof Document) {
                         throw new Exception("cannot get values from web service import - referenced document with id [ " . $this->id . " ] is unknown");
                     }
                 } else {
                     if ($this->type == "object") {
                         $this->o = Object_Abstract::getById($this->id);
                         if (!$this->o instanceof Object_Abstract) {
                             throw new Exception("cannot get values from web service import - referenced object with id [ " . $this->id . " ] is unknown");
                         }
                     } else {
                         p_r($this);
                         throw new Exception("cannot get values from web service import - type is not valid");
                     }
                 }
             }
         } else {
             throw new Exception("cannot get values from web service import - id is not valid");
         }
     }
 }
Beispiel #6
0
 public function importAction()
 {
     $importService = new Element_Import_Service($this->getUser());
     $this->removeViewRenderer();
     $parentId = $this->_getParam("parentId");
     $type = $this->_getParam("type");
     $overwrite = $this->_getParam("overwrite");
     if ($type == "document") {
         $rootElement = Document::getById($parentId);
     } else {
         if ($type == "object") {
             $rootElement = Object_Abstract::getById($parentId);
         } else {
             if ($type == "asset") {
                 $rootElement = Asset::getById($parentId);
             }
         }
     }
     if (!$rootElement) {
         throw new Exception("Invalid root element for import");
     }
     $exportName = "export_" . Zend_Session::getId();
     $exportDir = PIMCORE_TEMPORARY_DIRECTORY . "/" . $exportName;
     $exportArchive = $exportDir . ".zip";
     $tmpDirectory = PIMCORE_TEMPORARY_DIRECTORY . "/element_import_" . Zend_Session::getId();
     if (is_dir($tmpDirectory)) {
         recursiveDelete($tmpDirectory);
     }
     $zip = new ZipArchive();
     if ($zip->open($exportArchive) === TRUE) {
         $zip->extractTo($tmpDirectory);
         $zip->close();
     }
     $importService->doImport($tmpDirectory, $rootElement, $overwrite);
     p_r($importService->getImportInfo());
     // cleanup
     recursiveDelete($tmpDirectory);
 }
        ?>
</em> is now known as <em><?php 
        echo ph($l->newnick);
        ?>
.</em>
						</td>
					<?php 
    }
    ?>
					</tr>
				<?php 
}
?>
				<tr style="display: none;" class="user_connection">
					<td class="user-action user-connection" data-user-list='<?php 
echo p_r(json_encode($users_fallback));
?>
'></td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="vertical-nav">
	<?php 
if ($start <= $max_pagination) {
    $fstring = $full_width ? 'full/' : '';
    if ($start != 1) {
        $i = $start > 5 ? $start - 5 : 1;
        while ($start != $i) {
            ?>
<a href="<?php 
 public function productDetailSpecification($property, $product)
 {
     //p_r($property);
     if ($property instanceof Elements\OutputDataConfigToolkit\ConfigElement\Operator\Group) {
         $labeledValue = $property->getLabeledValue($product);
         if ($labeledValue) {
             $result = "\n                            <tr>\n                                <th colspan='2'>" . $this->view->translate("attr." . $property->getLabel()) . "</th>\n                            </tr>\n                ";
             foreach ($property->getChilds() as $child) {
                 $result .= $this->view->productDetailSpecification($child, $product);
             }
             return $result;
         }
     } else {
         if ($property instanceof Elements\OutputDataConfigToolkit\ConfigElement\Value\DefaultValue || $property instanceof Elements\OutputDataConfigToolkit\ConfigElement\Operator\Concatenator) {
             $labeledValue = $property->getLabeledValue($product);
             if ($labeledValue->def instanceof Object_Class_Data_Select) {
                 $value = $this->getSelectValue($labeledValue->def, $labeledValue->value);
             } else {
                 if ($labeledValue->def instanceof Object_Class_Data_Multiselect) {
                     $values = $labeledValue->value;
                     $translatedValues = array();
                     if (is_array($values)) {
                         foreach ($values as $value) {
                             $translatedValues[] = $this->getSelectValue($labeledValue->def, $value);
                         }
                         $value = "<div class='optionvalue'>" . implode("</div><div class='optionvalue'>", $translatedValues) . "</div>";
                     } else {
                         $value = '';
                     }
                 } else {
                     if ($labeledValue->def instanceof Object_Class_Data_Objects) {
                         $names = array();
                         if (is_array($labeledValue->value)) {
                             foreach ($labeledValue->value as $entry) {
                                 if ($entry instanceof Object_Abstract && method_exists($entry, "getName")) {
                                     $names[] = $entry->getName();
                                 }
                             }
                         }
                         $value = implode(", ", $names);
                     } else {
                         if ($labeledValue->value instanceof Object_Abstract && method_exists($labeledValue->value, "getName")) {
                             $value = $labeledValue->value->getName();
                         } else {
                             if ($labeledValue->def instanceof Object_Class_Data_Checkbox) {
                                 $value = $this->view->translate("optionvalue." . ($labeledValue->value ? "true" : "false"));
                             } else {
                                 if ($labeledValue->def instanceof Object_Class_Data_Image) {
                                     $value = '<img src="' . $labeledValue->value . '" />';
                                 } else {
                                     $value = $labeledValue->value;
                                     if (is_object($value)) {
                                         p_r($labeledValue);
                                         p_r($property);
                                         die;
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
             if (is_numeric($value)) {
                 $value = Zend_Locale_Format::toNumber($value, array('locale' => Zend_Registry::get('Zend_Locale')));
             }
             if ($labeledValue->value) {
                 $result = "\n                            <tr>\n                                <td class=\"firstcol\">" . $this->view->translate("attr." . $labeledValue->label) . "</td>\n                                <td class=\"secondcol\">" . $value . "</td>\n                            </tr>\n                ";
                 return $result;
             }
         } else {
             p_r($property);
         }
     }
 }
Beispiel #9
0
 public function checkForErrors()
 {
     if ($error = $this->_getParam('error_handler')) {
         if ($error->exception) {
             if ($error->exception instanceof Zend_Controller_Router_Exception) {
                 header('HTTP/1.1 404 Not Found');
                 //$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
                 $this->getResponse()->setHttpResponseCode(404);
             } else {
                 header('HTTP/1.1 503 Service Temporarily Unavailable');
                 //$this->getResponse()->setRawHeader('HTTP/1.1 503 Service Temporarily Unavailable');
                 $this->getResponse()->setHttpResponseCode(503);
             }
             Logger::emergency($error->exception);
             try {
                 $document = Zend_Registry::get("pimcore_error_document");
                 $this->setDocument($document);
                 $this->_setParam("document", $document);
                 $this->disableLayout();
             } catch (Exception $e) {
                 p_r($error->exception);
                 exit;
             }
         }
     }
 }
 /**
  * Returns a fully formated string without any HTML-Markup and replaced brackets
  * @param string $string The string to format
  * @param boold $nl2br use nl2br or not
  * @return string The formated string
  */
 function d($string, $nl2br = false)
 {
     $return = p_r(h($string));
     if ($nl2br) {
         return nl2br($return);
     }
     return $return;
 }