Beispiel #1
0
            ?>
		       <?php 
        }
        ?>
		       
		       <?php 
        if ($data['order_change'] >= 0.1) {
            ?>
	
				<div class="input-block">
		         <div class="label"><?php 
            echo Yii::t("default", "Change");
            ?>
 :</div>
		         <div class="value"><?php 
            echo displayPrice(baseCurrency(), normalPrettyPrice($data['order_change']));
            ?>
</div>
		         <div class="clear"></div>
		       </div>		       
		       <?php 
            $print[] = array('label' => Yii::t("default", "Change"), 'value' => $data['order_change']);
            ?>
				<?php 
        }
        ?>
 
		       
	       
	       <?php 
    }
</td>
<td width="5%"><?php 
        echo t($val['trans_type']);
        ?>
</td>
<td width="5%">
  <a href="javascript:;" class="view-receipt" data-id="<?php 
        echo $val['order_id'];
        ?>
"><?php 
        echo $val['order_id'];
        ?>
</a>
</td>
<!--<td width="5%"><?php 
        echo displayPrice(getCurrencyCode(), standardPrettyFormat($val['voucher_amount']));
        ?>
</td>-->
<td width="5%"><?php 
        echo FormatDateTime($val['date_created']);
        ?>
</td>
</tr>
<?php 
    }
    ?>
</tbody>
</table>

      
<?php 
Beispiel #3
0
      <?php 
        $merchant_maximum_order = Yii::app()->functions->getOption("merchant_maximum_order", $merchant_id);
        ?>
      <?php 
        if (is_numeric($merchant_maximum_order)) {
            ?>
      <?php 
            echo CHtml::hiddenField('merchant_maximum_order', unPrettyPrice($merchant_maximum_order));
            echo CHtml::hiddenField('merchant_maximum_order_pretty', baseCurrency() . prettyFormat($merchant_maximum_order));
            ?>
      <p class="uk-text-muted"><?php 
            echo Yii::t("default", "Maximum Order is");
            ?>
 
         <?php 
            echo displayPrice(baseCurrency(), prettyFormat($merchant_maximum_order, $merchant_id));
            ?>
      </p>      
      <?php 
        }
        ?>
      
      <div class="delivery_options uk-form" style="margin-top:10px;">
       <h5><?php 
        echo Yii::t("default", "Delivery Options");
        ?>
</h5>
       <?php 
        echo CHtml::dropDownList('delivery_type', $now, (array) Yii::app()->functions->DeliveryOptions($merchant_id));
        ?>
       
Beispiel #4
0
 public function MerchantSendBankInstruction($merchant_id = '', $amount = '', $ref = '')
 {
     $amount = standardPrettyFormat($amount);
     $link = Yii::app()->getBaseUrl(true) . "/store/depositverify/?ref=" . $ref;
     $links = "<a href=\"{$link}\" target=\"_blank\" >" . Yii::t("default", "Click on this link") . "</a>";
     $sender = Yii::app()->functions->getOption('merchant_deposit_sender', $merchant_id);
     $subject = Yii::app()->functions->getOption('merchant_deposit_subject', $merchant_id);
     $instructions = Yii::app()->functions->getOption('merchant_deposit_instructions', $merchant_id);
     $instructions = smarty('amount', displayPrice(adminCurrencySymbol(), $amount), $instructions);
     $instructions = smarty('verify-payment-link', $links, $instructions);
     $client_info = Yii::app()->functions->getClientInfo(Yii::app()->functions->getClientId());
     if (is_array($client_info) && count($client_info) >= 1) {
         Yii::app()->functions->sendEmail($client_info['email_address'], '', $subject, $instructions);
     }
     return false;
 }
Beispiel #5
0
 public function searchArea()
 {
     $resto_cuisine = '';
     $rating = '';
     $minimum = '';
     $pay_by = '';
     $minus_has_delivery_rates = 0;
     $cuisine_list = Yii::app()->functions->Cuisine(true);
     $country_list = Yii::app()->functions->CountryList();
     $this->data['s'] = isset($this->data['s']) ? $this->data['s'] : "";
     $search_str = explode(",", $this->data['s']);
     if (is_array($search_str) && count($search_str) >= 2) {
         $city = isset($search_str[1]) ? trim($search_str[1]) : '';
         $state = isset($search_str[2]) ? trim($search_str[2]) : '';
     } else {
         $city = trim($this->data['s']);
         $state = trim($this->data['s']);
     }
     $from_address = $this->data['s'];
     if (empty($from_address)) {
         $from_address = isset($this->data['st']) ? $this->data['st'] : '';
         if (!empty($this->data['st'])) {
             $_SESSION['kr_search_address'] = $this->data['st'];
         }
     }
     if ($res = Yii::app()->functions->searchByArea($city, $state)) {
         if (is_array($res) && count($res) >= 1) {
             $total = Yii::app()->functions->search_result_total;
             $feed_datas['sEcho'] = $this->data['sEcho'];
             $feed_datas['iTotalRecords'] = $total;
             $feed_datas['iTotalDisplayRecords'] = $total;
             /*dump($feed_datas);
               die();*/
             foreach ($res as $val) {
                 $merchant_address = $val['street'] . " " . $val['city'] . " " . $val['post_code'];
                 $miles = 0;
                 $kms = 0;
                 $ft = false;
                 $new_distance_raw = 0;
                 if ($distance = getDistance($from_address, $merchant_address, $val['country_code'], false)) {
                     $miles = $distance->rows[0]->elements[0]->distance->text;
                     //dump($miles);
                     if (preg_match("/ft/i", $miles)) {
                         $ft = true;
                         $miles_raw = $miles;
                         $new_distance_raw = str_replace("ft", '', $miles);
                         $new_distance_raw = ft2kms(trim($new_distance_raw));
                     } else {
                         $miles_raw = str_replace(array(" ", "mi"), "", $miles);
                         $kms = miles2kms(unPrettyPrice($miles_raw));
                         $new_distance_raw = $kms;
                         $kms = standardPrettyFormat($kms);
                     }
                 }
                 /*get merchant distance */
                 $mt_delivery_miles = Yii::app()->functions->getOption("merchant_delivery_miles", $val['merchant_id']);
                 $merchant_distance_type = Yii::app()->functions->getOption("merchant_distance_type", $val['merchant_id']);
                 /*dump($mt_delivery_miles);
                 		dump($miles_raw);*/
                 $resto_cuisine = '';
                 $cuisine = !empty($val['cuisine']) ? (array) json_decode($val['cuisine']) : false;
                 if ($cuisine != false) {
                     foreach ($cuisine as $valc) {
                         if (array_key_exists($valc, (array) $cuisine_list)) {
                             $resto_cuisine .= $cuisine_list[$valc] . ", ";
                         }
                     }
                     $resto_cuisine = !empty($resto_cuisine) ? substr($resto_cuisine, 0, -2) : '';
                 }
                 $resto_info = "<h5><a href=\"" . baseUrl() . "/store/menu/merchant/" . $val['restaurant_slug'] . "\">" . $val['restaurant_name'] . "</a></h5>";
                 //$resto_cuisine="<span class=\"cuisine-list\">".$resto_cuisine."</span>";
                 $resto_cuisine = wordwrap($resto_cuisine, 50, "<br />\n");
                 $resto_info .= "<p class=\"uk-text-muted\">" . $val['street'] . " " . $val['city'] . " " . $val['post_code'] . "</p>";
                 if (array_key_exists($val['country_code'], (array) $country_list)) {
                     $resto_info .= "<p class=\"uk-text-bold\">" . $country_list[$val['country_code']] . "</p>";
                 }
                 $resto_info .= "<p class=\"uk-text-bold\">" . Yii::t('default', "Cuisine") . " - " . $resto_cuisine . "</p>";
                 $delivery_est = Yii::app()->functions->getOption("merchant_delivery_estimation", $val['merchant_id']);
                 $distancesya = $miles_raw;
                 $unit_distance = $merchant_distance_type;
                 if (!empty($from_address)) {
                     if ($ft == TRUE) {
                         $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Distance") . ": </span> {$miles_raw} </p>";
                         if ($merchant_distance_type == "km") {
                             $distance_type = Yii::t("default", "km");
                         } else {
                             $distance_type = Yii::t("default", "miles");
                         }
                     } else {
                         if ($merchant_distance_type == "km") {
                             $distance_type = Yii::t("default", "km");
                             $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Distance") . ": </span> {$kms} " . Yii::t("default", "km") . "</p>";
                             $distancesya = $kms;
                         } else {
                             $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Distance") . ": </span> {$miles_raw} " . Yii::t("default", "miles") . "</p>";
                             $distance_type = Yii::t("default", "miles");
                         }
                     }
                 }
                 $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Delivery Est") . ": </span> " . $delivery_est . "</p>";
                 if (is_numeric($mt_delivery_miles)) {
                     $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Delivery Distance") . ": </span> " . $mt_delivery_miles . " " . $distance_type . "</p>";
                 }
                 $shipping_enabled = Yii::app()->functions->getOption("shipping_enabled", $val['merchant_id']);
                 //delivery rates table
                 $delivery_fee = $val['delivery_charges'];
                 if ($shipping_enabled == 2) {
                     $FunctionsK = new FunctionsK();
                     //$distancesya=round($distancesya);
                     //dump($distancesya);
                     $delivery_fee = $FunctionsK->getDeliveryChargesByDistance($val['merchant_id'], $distancesya, $unit_distance, $delivery_fee);
                     if ($delivery_fee >= 0.01) {
                         if (isset($_GET['filter_promo'])) {
                             if (preg_match("/free-delivery/i", $_GET['filter_promo'])) {
                                 $minus_has_delivery_rates++;
                                 continue;
                             }
                         }
                     }
                 }
                 if (is_numeric($delivery_fee) && $delivery_fee >= 1) {
                     $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Delivery Fee") . ":</span> " . displayPrice(getCurrencyCode(), prettyFormat($delivery_fee)) . "</p>";
                 } else {
                     $resto_info .= "<p><span class=\"uk-text-bold\">" . Yii::t("default", "Delivery Fee") . ":</span> " . "<span class=\"uk-text-success\">" . Yii::t("default", "Free Delivery") . "</span>" . "</p>";
                 }
                 $image = '';
                 $merchant_photo = Yii::app()->functions->getOption("merchant_photo", $val['merchant_id']);
                 if (!empty($merchant_photo)) {
                     $image .= "<a href=\"" . baseUrl() . "/store/menu/merchant/" . $val['restaurant_slug'] . "\">";
                     $image .= "<img class=\"uk-thumbnail uk-thumbnail-mini\" src=\"" . baseUrl() . "/upload/" . $merchant_photo . "\" alt=\"\" title=\"\">";
                     $image .= "</a>";
                 }
                 if (empty($image)) {
                     $image .= "<a href=\"" . baseUrl() . "/store/menu/merchant/" . $val['restaurant_slug'] . "\">";
                     $image .= "<img class=\"uk-thumbnail uk-thumbnail-mini\" src=\"" . baseUrl() . "/assets/images/thumbnail-medium.png\" alt=\"\" title=\"\">";
                     $image .= "</a>";
                 }
                 $ratings = Yii::app()->functions->getRatings($val['merchant_id']);
                 $rating_meanings = '';
                 if ($ratings['ratings'] >= 1) {
                     $rating_meaning = Yii::app()->functions->getRatingsMeaning($ratings['ratings']);
                     $rating_meanings = ucwords($rating_meaning['meaning']);
                 }
                 $rating = "<div class=\"rate-wrap\">\r\n\t    \t\t\t\t<h6 class=\"rounded2\" data-uk-tooltip=\"{pos:'bottom-left'}\" title=\"{$rating_meanings}\" >" . number_format($ratings['ratings'], 1) . "</h6>\r\n\t    \t\t\t\t<span>" . $ratings['votes'] . " " . Yii::t("default", "Votes") . "</span>\r\n\t    \t\t\t\t</div>";
                 $stores_open_day = Yii::app()->functions->getOption("stores_open_day", $val['merchant_id']);
                 $stores_open_starts = Yii::app()->functions->getOption("stores_open_starts", $val['merchant_id']);
                 $stores_open_ends = Yii::app()->functions->getOption("stores_open_ends", $val['merchant_id']);
                 $stores_open_custom_text = Yii::app()->functions->getOption("stores_open_custom_text", $val['merchant_id']);
                 $stores_open_day = !empty($stores_open_day) ? (array) json_decode($stores_open_day) : false;
                 $stores_open_starts = !empty($stores_open_starts) ? (array) json_decode($stores_open_starts) : false;
                 $stores_open_ends = !empty($stores_open_ends) ? (array) json_decode($stores_open_ends) : false;
                 $stores_open_custom_text = !empty($stores_open_custom_text) ? (array) json_decode($stores_open_custom_text) : false;
                 $tip = '';
                 $open_starts = '';
                 $open_ends = '';
                 $open_text = '';
                 $tip .= "<ul class=\"hr_op rounded2\"><i class=\"fa fa-caret-up\"></i>";
                 if (is_array($stores_open_day) && count($stores_open_day) >= 1) {
                     foreach ($stores_open_day as $val_open) {
                         if (array_key_exists($val_open, (array) $stores_open_starts)) {
                             $open_starts = timeFormat($stores_open_starts[$val_open], true);
                         }
                         if (array_key_exists($val_open, (array) $stores_open_ends)) {
                             $open_ends = timeFormat($stores_open_ends[$val_open], true);
                         }
                         if (array_key_exists($val_open, (array) $stores_open_custom_text)) {
                             $open_text = $stores_open_custom_text[$val_open];
                         }
                         $tip .= '<li><span>' . ucwords(Yii::t("default", $val_open)) . '</span><value>' . $open_starts . " - " . $open_ends . "&nbsp;&nbsp;&nbsp;" . ucfirst($open_text) . '</value></li>';
                         $open_starts = '';
                         $open_ends = '';
                         $open_text = '';
                     }
                 } else {
                     $tip .= '<li>' . Yii::t("default", "Not available.") . '</li>';
                 }
                 $tip .= "<div class=\"clear\"></div>";
                 $tip .= "</ul>";
                 $tips = "<a class=\"opening-hours-wrap\" href=\"javascript:;\">" . Yii::t("default", "Hours of Operation") . "{$tip}</a>";
                 $resto_info .= $tips;
                 $resto_info .= "<div class=\"spacer\"></div>";
                 $resto_info .= "<div>\r\n\t\t\t\t\t\t<a class=\"uk-button uk-button-success uk-width-1-2\" href=\"" . baseUrl() . "/store/menu/merchant/" . $val['restaurant_slug'] . "\">";
                 $resto_info .= Yii::t("default", "Order Now");
                 $resto_info .= "</a></div>";
                 $resto_info .= "<div class=\"spacer\"></div>";
                 $table_book = Yii::app()->functions->getOption("merchant_table_booking", $val['merchant_id']);
                 if ($table_book == "") {
                     $resto_info .= "<div>\r\n\t\t\t\t\t\t<a class=\"uk-button uk-button-success uk-width-1-2\" href=\"" . baseUrl() . "/store/menu/merchant/" . $val['restaurant_slug'] . "/?tab=booking" . "\">";
                     $resto_info .= Yii::t("default", "Book a Table");
                     $resto_info .= "</a></div>";
                 }
                 $is_sponsored = '';
                 if ($val['is_sponsored'] == 2) {
                     $is_sponsored = "<br/><div class=\"uk-badge uk-badge-warning\">" . Yii::t("default", "sponsored") . "</div>";
                 }
                 $is_merchant_open = Yii::app()->functions->isMerchantOpen($val['merchant_id']);
                 $merchant_preorder = Yii::app()->functions->getOption("merchant_preorder", $val['merchant_id']);
                 $now = date('Y-m-d');
                 $is_holiday = false;
                 if ($m_holiday = Yii::app()->functions->getMerchantHoliday($val['merchant_id'])) {
                     if (in_array($now, (array) $m_holiday)) {
                         $is_merchant_open = false;
                     }
                 }
                 $tag_open = '';
                 if ($is_merchant_open == TRUE) {
                     $tag_open = '<div class="uk-badge uk-badge-success">' . t("Open") . '</div>';
                 } else {
                     if ($merchant_preorder) {
                         $tag_open = '<div class="uk-badge uk-badge-warning">' . t("Pre-Order") . '</div>';
                     } else {
                         $tag_open = '<div class="uk-badge uk-badge-danger">' . t("Closed") . '</div>';
                     }
                 }
                 $is_sponsored .= $tag_open;
                 $offers = Widgets::offers($val['merchant_id'], 2);
                 $is_sponsored .= $offers;
                 $merchant_latitude = Yii::app()->functions->getOption("merchant_latitude", $val['merchant_id']);
                 $merchant_longtitude = Yii::app()->functions->getOption("merchant_longtitude", $val['merchant_id']);
                 $merchant_latitude = !empty($merchant_latitude) ? $merchant_latitude : '0';
                 $merchant_longtitude = !empty($merchant_longtitude) ? $merchant_longtitude : '0';
                 $feed_data[] = array($image, $resto_info, $rating, !empty($val['minimum_order']) ? displayPrice(getCurrencyCode(), prettyFormat($val['minimum_order'])) . "<br/>" . $is_sponsored : "{$is_sponsored}", $miles_raw, $merchant_latitude, $merchant_longtitude, addslashes($val['restaurant_name']), $merchant_address, $val['restaurant_slug'], $image, $new_distance_raw);
             }
             $this->data['sort_filter'] = isset($this->data['sort_filter']) ? $this->data['sort_filter'] : '';
             //dump($feed_data);
             if ($this->data['sort_filter'] == "distance") {
                 Yii::app()->functions->arraySortByColumn($feed_data, 11);
                 $feed_datas['aaData'] = $feed_data;
             } else {
                 /** sort by distance */
                 if (Yii::app()->functions->getOptionAdmin('search_result_bydistance') == 2) {
                     Yii::app()->functions->arraySortByColumn($feed_data, 11);
                     $feed_datas['aaData'] = $feed_data;
                 } else {
                     $feed_datas['aaData'] = $feed_data;
                 }
             }
             //dump("minus_has_delivery_rates->".$minus_has_delivery_rates);
             if ($minus_has_delivery_rates >= 1) {
                 $feed_datas['iTotalRecords'] = $feed_datas['iTotalRecords'] - $minus_has_delivery_rates;
                 $feed_datas['iTotalDisplayRecords'] = $feed_datas['iTotalDisplayRecords'] - $minus_has_delivery_rates;
                 if ($feed_datas['iTotalRecords'] <= 0) {
                     $this->otableNodata();
                 }
             }
             $this->otableOutput($feed_datas);
         }
     }
     $this->otableNodata();
 }
Beispiel #6
0
                            ?>
		      <a href="javascript:;" class="qty-addon-plus"><i class="fa fa-plus"></i></a>		      
		      <div class="clear"></div>
		    </div>
            
            <?php 
                        }
                        ?>
          </div>
          <div class="uk-width-1-3" style="text-indent:100px;">
            <!--<span class="hide-food-price"><?php 
                        echo !empty($val_addon['price']) ? getCurrencyCode() . $val_addon['price'] : "-";
                        ?>
</span>-->
            <span class="hide-food-price"><?php 
                        echo !empty($val_addon['price']) ? displayPrice(getCurrencyCode(), $val_addon['price']) : "-";
                        ?>
</span>
          </div>
        </div>
      </li>
      <?php 
                        $x++;
                        ?>
    <?php 
                    }
                    ?>
    </ul>
    <div class="clear"></div>
    <?php 
                }
Beispiel #7
0
?>
<div class="page-right-sidebar payment-option-page">
  <div class="main">  
  
  <?php 
if (!empty($error)) {
    ?>
  <p class="uk-text-danger"><?php 
    echo $error;
    ?>
</p>  
  <?php 
} else {
    ?>
  
  <h3><?php 
    echo t("Amount") . " " . displayPrice(adminCurrencySymbol(), standardPrettyFormat($amount_to_pay));
    ?>
</h3>
    
  <?php 
    echo $forms;
    ?>
  
  <?php 
}
?>
      
  
  </div>
</div>
   <?php 
    foreach ($res as $val) {
        ?>
  
        <?php 
        $account = $val['account'];
        $method = "Paypal to {$account}";
        if ($val['payment_method'] == "bank") {
            $account = $val['bank_account_number'];
            $method = "Bank account to {$account}";
        }
        ?>
      
        <tr>                        
            <td><?php 
        echo displayPrice(adminCurrencySymbol(), normalPrettyPrice($val['amount']));
        ?>
</td>            
            <td><?php 
        echo $method;
        ?>
</td>            
            <td><?php 
        echo prettyDate($val['date_process']);
        ?>
</td>
            <td><?php 
        echo $val['status'];
        ?>
</td>            
        </tr>
Beispiel #9
0
"><?php 
echo t("Withdraw money");
?>
</a>
   </div>
  </li>
  
  
  <li>
   <div class="rounded-box rounded">
     <p><?php 
echo t("Total value of your item sales");
?>
:</p>
     <h3><?php 
echo displayPrice(adminCurrencySymbol(), normalPrettyPrice($sale_total));
?>
</h3>
     <!--<P class="small"><?php 
echo t("based on list price of each item");
?>
</P>-->
     <P class="small"><?php 
echo t("From");
?>
:<?php 
echo $total_sale_count;
?>
 <?php 
echo t("orders");
?>
Beispiel #10
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 
    }
  
  <li>
  <a class="b rounded" href="<?php 
echo Yii::app()->createUrl("/store/merchantsignupinfo");
?>
">
  <h5><?php 
echo t("Commission Click here");
?>
</h5>
  <?php 
if ($commision_type == "fixed") {
    ?>
  
  <p><?php 
    echo displayPrice($currency, $percent) . " " . t("commission per order");
    ?>
.</p>
  <?php 
} else {
    ?>
  <p><?php 
    echo standardPrettyFormat($percent) . "% " . t("commission per order");
    ?>
.</p>
  <?php 
}
?>
  </a>
  </li>
  
Beispiel #12
0
                    ?>
	          <span class="price normal-price">
	          <?php 
                    echo displayPrice(getCurrencyCode(), Yii::app()->functions->prettyFormat($price['price']));
                    ?>
	          </span>
	          <span class="price sale-price"><?php 
                    echo displayPrice(getCurrencyCode(), Yii::app()->functions->prettyFormat($price['price'] - $data['discount']));
                    ?>
	          </span>
	        <?php 
                } else {
                    ?>
	          <span class="price">
	            <?php 
                    echo displayPrice(getCurrencyCode(), Yii::app()->functions->prettyFormat($price['price']));
                    ?>
	          </span>
	        <?php 
                }
                ?>
        <?php 
            }
            ?>
      </div>
    </li>    
    <?php 
        }
        ?>
    <div class="clear"></div>
  </div> <!--section-->
<?php 
if ($res = Yii::app()->functions->getWithdrawalInformation($withdrawal_id)) {
    $wd_days_process = Yii::app()->functions->getOptionAdmin("wd_days_process");
    if (empty($wd_days_process)) {
        $wd_days_process = 5;
    }
    $process_date = date("d F Y", strtotime($res['date_created'] . " +{$wd_days_process} days"));
    ?>

<p>
<?php 
    echo t("Your withdrawal request has been sent to admin");
    ?>
.<br/>
<?php 
    echo t("Total Amount") . " " . displayPrice(adminCurrencySymbol(), normalPrettyPrice($res['amount']));
    ?>
</p>
<p>
<?php 
    echo t("We will complete this request on the");
    ?>
 <?php 
    echo $process_date . " ";
    echo t("(or the next business day), but it can take up to 7 days to appear in your account. A second confirmation email will be sent at this time");
    ?>
</p>

<?php 
} else {
    ?>
Beispiel #14
0
 public function SMSnotificationMerchant($merchant_id = '', $order_info = '', $data = '')
 {
     $db_ext = new DbExt();
     $sms_enabled_alert = Yii::app()->functions->getOption("sms_enabled_alert", $merchant_id);
     $sms_notify_number = Yii::app()->functions->getOption("sms_notify_number", $merchant_id);
     $sms_alert_message = Yii::app()->functions->getOption("sms_alert_message", $merchant_id);
     $sms_alert_message = $this->smarty("customer-name", $order_info['full_name'], $sms_alert_message);
     $item_order = '';
     if (is_array($data) && count($data) >= 1) {
         $in_msg = t("OrderNo:") . $order_info['order_id'] . " ";
         $in_msg .= t("ClientName:") . $order_info['full_name'] . " ";
         foreach ($data['item'] as $val) {
             $item_order .= "(" . $val['qty'] . "x)" . $val['item_name'] . " " . $val['order_notes'] . ",";
             if (is_array($val['sub_item']) && count($val['sub_item']) >= 1) {
                 foreach ($val['sub_item'] as $sub_val) {
                     $item_order .= $sub_val['addon_category'] . ":";
                     $item_order .= "(" . $sub_val['addon_qty'] . "x)" . $sub_val['addon_name'];
                     $item_order .= ", ";
                 }
             }
         }
         $item_order = substr($item_order, 0, -1);
         $sms_alert_message = $this->smarty("receipt", $in_msg . $item_order, $sms_alert_message);
     }
     $sms_alert_message = $this->smarty("orderno", $order_info['order_id'], $sms_alert_message);
     $sms_alert_message = $this->smarty("customername", $order_info['full_name'], $sms_alert_message);
     $sms_alert_message = $this->smarty("customermobile", $order_info['merchant_contact_phone'], $sms_alert_message);
     $sms_alert_message = $this->smarty("customeraddress", $order_info['full_address'], $sms_alert_message);
     $sms_alert_message = $this->smarty("amount", displayPrice(baseCurrency(), normalPrettyPrice($order_info['total_w_tax'])), $sms_alert_message);
     $sms_alert_message = $this->smarty("website-ddress", "http://" . $_SERVER['HTTP_HOST'], $sms_alert_message);
     $sms_alert_message = $this->smarty("website-address", "http://" . $_SERVER['HTTP_HOST'], $sms_alert_message);
     //dump($order_info);
     //send sms to customer
     $client_sms = Yii::app()->functions->getOption("sms_alert_customer", $merchant_id);
     $client_contact_phone = $order_info['contact_phone'];
     if (!empty($client_sms) && !empty($client_contact_phone)) {
         $client_sms = $this->smarty("customer-name", $order_info['full_name'], $client_sms);
         $client_sms = $this->smarty("orderno", $order_info['order_id'], $client_sms);
         $client_sms = $this->smarty("merchantname", $order_info['merchant_name'], $client_sms);
         $client_sms = $this->smarty("merchantphone", $order_info['merchant_contact_phone'], $client_sms);
         $client_sms = $this->smarty("website-ddress", "http://" . $_SERVER['HTTP_HOST'], $client_sms);
         $client_sms = $this->smarty("website-address", "http://" . $_SERVER['HTTP_HOST'], $client_sms);
     }
     $sms_provider = Yii::app()->functions->getOptionAdmin('sms_provider');
     $sms_provider = strtolower($sms_provider);
     if ($sms_enabled_alert == 1 && !empty($sms_notify_number) && !empty($sms_alert_message)) {
         $sms_notify_number_s = explode(",", $sms_notify_number);
         if (is_array($sms_notify_number_s) && count($sms_notify_number_s) >= 1) {
             $x_counter = 1;
             foreach ($sms_notify_number_s as $sms_notify_number) {
                 $balance = $this->getMerchantSMSCredit($merchant_id);
                 if (is_numeric($balance) && $balance >= 1) {
                     //dump($sms_notify_number);
                     $resp = $this->sendSMS($sms_notify_number, $sms_alert_message);
                     $params = array('merchant_id' => $merchant_id, 'broadcast_id' => "999999999", 'client_id' => $order_info['client_id'], 'client_name' => $order_info['full_name'], 'contact_phone' => $sms_notify_number, 'sms_message' => $sms_alert_message, 'status' => $resp['msg'], 'gateway_response' => $resp['raw'], 'date_created' => date('c'), 'date_executed' => date('c'), 'ip_address' => $_SERVER['REMOTE_ADDR'], 'gateway' => $sms_provider);
                     $db_ext->insertData("{{sms_broadcast_details}}", $params);
                     if ($x_counter == 1) {
                         if (!empty($client_sms) && !empty($client_contact_phone)) {
                             $resp2 = $this->sendSMS($client_contact_phone, $client_sms);
                             $params = array('merchant_id' => $merchant_id, 'broadcast_id' => "999999999", 'client_id' => $order_info['client_id'], 'client_name' => $order_info['full_name'], 'contact_phone' => $client_contact_phone, 'sms_message' => $client_sms, 'status' => $resp['msg'], 'gateway_response' => $resp['raw'], 'date_created' => date('c'), 'date_executed' => date('c'), 'ip_address' => $_SERVER['REMOTE_ADDR'], 'gateway' => $sms_provider);
                             $db_ext->insertData("{{sms_broadcast_details}}", $params);
                         }
                     }
                 }
                 $x_counter++;
             }
         }
     }
 }
Beispiel #15
0
    ?>
   <li class="child-li li-click2" data-id="bank" data-type="payment-method" data-minimum="<?php 
    echo $wd_bank_minimum;
    ?>
">  
     <div class="box-grey">
       <h4><?php 
    echo t("Bank");
    ?>
</h4>
       <div class="inner">
       <p><?php 
    echo t("Minimum");
    ?>
 <?php 
    echo displayPrice(baseCurrency(), standardPrettyFormat($wd_bank_minimum));
    ?>
</p>
       </div>
     </div> <!--box-->  
                    
   </li>
   <?php 
}
?>
</ul>
<div class="clear"></div>


<div class="bank-info-wrap">
Beispiel #16
0
 public function smsPurchaseTransaction()
 {
     $merchant_id = Yii::app()->functions->getMerchantID();
     $slug = $this->data['slug'];
     $stmt = "\n\t\tSELECT a.*,\n\t\t(\n\t\tselect title\n\t\tfrom\n\t\t{{sms_package}}\n\t\twhere\n\t\tsms_package_id=a.sms_package_id\n\t\t) as package_name\n\t\t FROM\n\t\t{{sms_package_trans}} a\n\t\tWHERE\n\t\tmerchant_id=" . Yii::app()->functions->q($merchant_id) . "\n\t\tORDER BY id DESC\n\t\t";
     if ($res = $this->rst($stmt)) {
         foreach ($res as $val) {
             /*$date=Yii::app()->functions->prettyDate($val['date_created']);
               $date=Yii::app()->functions->translateDate($date);   */
             $date = FormatDateTime($val['date_created']);
             $feed_data['aaData'][] = array($val['id'], strtoupper($val['payment_type']), ucfirst($val['package_name']), displayPrice(adminCurrencySymbol(), normalPrettyPrice($val['package_price'])), $val['sms_limit'], $val['status'], $date);
         }
         $this->otableOutput($feed_data);
     }
     $this->otableNodata();
 }