OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
delivery_articles.php
Go to the documentation of this file.
1 <?php
2 
3 
4 
5 
13 {
20  public function render()
21  {
23 
24  $soxId = $this->getEditObjectId();
25 
26  if ( $soxId != "-1" && isset( $soxId)) {
27  $this->_createCategoryTree( "artcattree");
28 
29  // load object
30  $oDelivery = oxNew( "oxdelivery" );
31  $oDelivery->load( $soxId);
32  $this->_aViewData["edit"] = $oDelivery;
33 
34  //Disable editing for derived articles
35  if ($oDelivery->isDerived())
36  $this->_aViewData['readonly'] = true;
37  }
38 
39  $iAoc = oxConfig::getParameter("aoc");
40  if ( $iAoc == 1 ) {
41  $oDeliveryArticlesAjax = oxNew( 'delivery_articles_ajax' );
42  $this->_aViewData['oxajax'] = $oDeliveryArticlesAjax->getColumns();
43 
44  return "popups/delivery_articles.tpl";
45  } elseif ( $iAoc == 2 ) {
46  $oDeliveryCategoriesAjax = oxNew( 'delivery_categories_ajax' );
47  $this->_aViewData['oxajax'] = $oDeliveryCategoriesAjax->getColumns();
48 
49  return "popups/delivery_categories.tpl";
50  }
51 
52  return "delivery_articles.tpl";
53  }
54 }