Exemple #1
0
                        ?>
" 
		           <?php 
                        echo $atts;
                        ?>
		         >
		          <div class="left">
		             <?php 
                        echo qTranslate($val_item['item_name'], 'item_name', $val_item);
                        ?>
		             <?php 
                        //echo Widgets::displaySpicyIcon($val_item['spicydish'],'',$merchant_id);
                        ?>
             
		             <?php 
                        echo Widgets::displaySpicyIconNew($val_item['dish']);
                        ?>
             
		          </div>
		          <div class="right food-price-wrap">
		             <?php 
                        if (is_array($val_item['prices']) && count($val_item['prices']) >= 1) {
                            ?>
		              <?php 
                            if (!empty($val_item['discount'])) {
                                ?>
		              <div class="normal-price left">
		               <?php 
                                echo displayPrice(getCurrencyCode(), prettyFormat($val_item['prices'][0]['price']));
                                ?>
		               </div>
Exemple #2
0
        ?>
	    <?php 
    }
    ?>
	  </div>
	  <div class="uk-width-1-2">
	  <h1 class="uk-h2"><?php 
    echo qTranslate($data['item_name'], 'item_name', $data);
    ?>
</h1>
	  <?php 
    //echo Widgets::displaySpicyIcon($data['spicydish'],'',$data['merchant_id']);
    ?>
 
	  <?php 
    echo Widgets::displaySpicyIconNew($data['dish']);
    ?>
 
	  <p class="uk-text-muted"><?php 
    echo qTranslate($data['item_description'], 'item_description', $data);
    ?>
</p>
	  </div>
  </div> <!--uk-grid-->
  
  <?php 
    if (is_array($data['prices']) && count($data['prices']) >= 1) {
        ?>
  
  
  <div class="section">
Exemple #3
0
 public function categoryList()
 {
     $mtid = Yii::app()->functions->getMerchantID();
     $slug = $this->data['slug'];
     $stmt = "\r\n\t\t\tSELECT * FROM\r\n\t\t\t{{category}}\r\n\t\t\tWHERE\r\n\t\t\tmerchant_id='" . Yii::app()->functions->getMerchantID() . "'\r\n\t\t\tORDER BY cat_id DESC\r\n\t\t\t";
     $connection = Yii::app()->db;
     $rows = $connection->createCommand($stmt)->queryAll();
     if (is_array($rows) && count($rows) >= 1) {
         foreach ($rows as $val) {
             $chk = "<input type=\"checkbox\" name=\"row[]\" value=\"{$val['cat_id']}\" class=\"chk_child\" >";
             $option = "<div class=\"options\">\r\n    \t    \t\t<a href=\"{$slug}/id/{$val['cat_id']}\" >" . Yii::t("default", "Edit") . "</a>\r\n    \t    \t\t<a href=\"javascript:;\" class=\"row_del\" rev=\"{$val['cat_id']}\" >" . Yii::t("default", "Delete") . "</a>\r\n    \t    \t\t</div>";
             /*$date=date('M d,Y G:i:s',strtotime($val['date_created']));    	    		
             		$date=Yii::app()->functions->translateDate($date);*/
             $date = FormatDateTime($val['date_created']);
             if (!empty($val['photo'])) {
                 $img = Yii::app()->request->baseUrl . "/upload/{$val['photo']}";
                 $photo = "<img class=\"uk-thumbnail uk-thumbnail-mini\" src=\"{$img}\" >";
             } else {
                 $photo = '';
             }
             $feed_data['aaData'][] = array($chk, stripslashes($val['category_name']) . $option, stripslashes($val['category_description']), $photo, Widgets::displaySpicyIconNew($val['dish']), $date . "<div>" . Yii::t("default", $val['status']) . "</div>");
         }
         $this->otableOutput($feed_data);
     }
     $this->otableNodata();
 }
Exemple #4
0
    public function displayMenu($menu = '', $mode = '', $mtid = '')
    {
        ?>
		<?php 
        if ($mode == 2 || $mode == 1) {
            ?>
		<div class="<?php 
            echo $mode == 2 ? "active-menu-2" : "active-menu-{$mode}";
            ?>
">
				
		<div class="categories-wrap-mobile">
		<div data-uk-dropdown="{mode:'click'}" class="uk-button-dropdown">
	    <button class="uk-button"><?php 
            echo Yii::t("default", "Categories");
            ?>
 <span class="sortby_text"></span><i class="uk-icon-caret-down"></i></button>
	    <div class="uk-dropdown" >
	        <ul class="uk-nav uk-nav-dropdown">
	        <?php 
            foreach ($menu as $val) {
                ?>
	        <li>
	        <a href="javascript:;" data-id="cat-<?php 
                echo $val['category_id'];
                ?>
" class="goto-category">
	        <?php 
                echo ucwords($val['category_name']);
                ?>
	        </a>
	       </li>
	        <?php 
            }
            ?>
    
	        </ul>
	    </div>
	    </div>	  
	    </div> <!--categories-wrap-->  
	    <!--<div class="clear"></div>-->
		
		<?php 
            foreach ($menu as $val) {
                //dump($val);
                ?>
		  <h2 class="cat-<?php 
                echo $val['category_id'];
                ?>
">
		  <?php 
                echo qTranslate($val['category_name'], 'category_name', $val);
                ?>
		  <?php 
                //echo Widgets::displayCatSpicyIconByID($val['category_id'])
                ?>
		  <?php 
                echo Widgets::displaySpicyIconNew($val['dish']);
                ?>
		  </h2>
		  
		  <?php 
                if (!empty($val['category_description'])) {
                    ?>
		  <p><?php 
                    echo qTranslate($val['category_description'], 'category_description', $val);
                    ?>
</p>
		  <?php 
                }
                ?>
		  
		  <p style="margin-top:-10px;" class="uk-text-small uk-text-muted"><?php 
                echo Widgets::categorySpicyNotes($val['category_id']);
                ?>
</span>
		  <?php 
                if (is_array($val['item']) && count($val['item']) >= 1) {
                    ?>
		  
		  <?php 
                    $x = 1;
                    ?>
		  		 
		  <?php 
                    foreach ($val['item'] as $item) {
                        //dump($item);
                        ?>
		 
		  <?php 
                        $atts = '';
                        if ($item['single_item'] == 2) {
                            $atts .= 'data-price="' . $item['single_details']['price'] . '"';
                            $atts .= " ";
                            $atts .= 'data-size="' . $item['single_details']['size'] . '"';
                        }
                        ?>
           <a href="javascript:;" rel="<?php 
                        echo $item['item_id'];
                        ?>
" class="menu-item" 
		   data-single="<?php 
                        echo $item['single_item'];
                        ?>
" 		   
		   <?php 
                        echo $atts;
                        ?>
		   >

		  <div class="table-div <?php 
                        echo count($val['item']) == $x ? "last" : '';
                        ?>
">
		    <div class="table-col-1"><?php 
                        Widgets::displayMenuPic($item['photo']);
                        ?>
</div>
		    <div class="table-col-2">
		        <div class="ux-price">
		         <samp></samp>
		         <h4>
		         <?php 
                        echo qTranslate($item['item_name'], 'item_name', $item);
                        ?>
		         <?php 
                        echo Widgets::displaySpicyIconNew($item['dish']);
                        ?>
 
		         </h4>
		         <?php 
                        //echo Widgets::displaySpicyIcon($item['spicydish'],'',$mtid);
                        ?>
 		         
		         
		         <h5 class="hide-food-price">
		         <?php 
                        if (!empty($item['discount'])) {
                            ?>
		           <span class="strike-tru">
		           <?php 
                            echo displayPrice(getCurrencyCode(), prettyFormat($item['prices'][0]['price']));
                            ?>
		           </span>
                  <?php 
                            echo displayPrice(getCurrencyCode(), prettyFormat($item['prices'][0]['price'] - $item['discount']));
                            ?>
		         <?php 
                        } else {
                            ?>
		         <?php 
                            echo displayPrice(getCurrencyCode(), prettyFormat($item['prices'][0]['price']));
                            ?>
		         <?php 
                        }
                        ?>
		         
		         </h5>
		        </div>
		        <p><?php 
                        echo qTranslate($item['item_description'], 'item_description', $item);
                        ?>
</p>
		    </div>
		  </div>
		  </a>
		  <?php 
                        $x++;
                        ?>
		  <?php 
                    }
                    ?>
		  
		  <?php 
                } else {
                    ?>
		  <p class="uk-text-muted"><?php 
                    echo t("No food item");
                    ?>
</p>
		  <?php 
                }
                ?>
		<?php 
            }
            ?>
		</div> <!--active-menu-2-->
		<?php 
        }
        ?>
		
		<?php 
    }