当前位置: 首页>>代码示例>>PHP>>正文


PHP TravelHelper::format_money方法代码示例

本文整理汇总了PHP中TravelHelper::format_money方法的典型用法代码示例。如果您正苦于以下问题:PHP TravelHelper::format_money方法的具体用法?PHP TravelHelper::format_money怎么用?PHP TravelHelper::format_money使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TravelHelper的用法示例。


在下文中一共展示了TravelHelper::format_money方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _format_money

 /**
  *
  *
  * @since 1.1.3
  * */
 static function _format_money()
 {
     $data = STInput::post('money_data', array());
     if (!empty($data)) {
         foreach ($data as $key => $value) {
             $data[$key] = TravelHelper::format_money($value);
         }
     }
     echo json_encode(array('status' => 1, 'money_data' => $data));
     die;
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:16,代码来源:travel-helper.php

示例2: get_book_history

 function get_book_history($type = '')
 {
     global $current_user;
     get_currentuserinfo();
     $user_id = $current_user->ID;
     $paged = 1;
     if (!empty($_REQUEST['paged'])) {
         $paged = $_REQUEST['paged'];
     }
     // get list id order
     $arg = array('post_type' => 'st_order', 'paged' => $paged, 'post_status' => array('publish'), 'posts_per_page' => '10', 'meta_query' => array(array('key' => 'id_user', 'value' => array($user_id), 'compare' => 'IN')));
     if (STInput::request('data_type')) {
         $type = STInput::request('data_type');
     }
     if ($type != "") {
         $arg['meta_query'][] = array('key' => 'status', 'value' => array($type), 'compare' => 'IN');
     }
     query_posts($arg);
     $html = '';
     global $wp_query;
     while (have_posts()) {
         the_post();
         $id_item = get_post_meta(get_the_ID(), 'item_id', true);
         $check_in = get_post_meta(get_the_ID(), 'check_in', true);
         $check_out = get_post_meta(get_the_ID(), 'check_out', true);
         $total_price = get_post_meta(get_the_ID(), 'item_price', true);
         $comment_post_id = apply_filters('st_real_comment_post_id', $id_item);
         $action = '';
         $user_url = st()->get_option('page_my_account_dashboard');
         $data['sc'] = 'write_review';
         $data['item_id'] = $id_item;
         if (STReview::check_reviewable($comment_post_id) and comments_open($comment_post_id)) {
             $action = '<a href="' . st_get_link_with_search(get_permalink($user_url), array('sc', 'item_id'), $data) . '">' . st_get_language('user_write_review') . '</a>';
         }
         if ($check_in and $check_out) {
             $date = mysql2date('d/m/y', $check_in) . ' <i class="fa fa-long-arrow-right"></i> ' . mysql2date('d/m/y', $check_out);
         }
         if (get_post_type($id_item) == 'st_tours') {
             $type_tour = get_post_meta($id_item, 'type_tour', true);
             if ($type_tour == 'daily_tour') {
                 $duration = get_post_meta($id_item, 'duration_day', true);
                 $date = __("Check in : ", ST_TEXTDOMAIN) . mysql2date('d/m/y', $check_in) . "<br>";
                 $date .= __("Duration : ", ST_TEXTDOMAIN) . $duration;
             }
         }
         $icon_type = $this->get_icon_type_order_item($id_item);
         if (!empty($icon_type)) {
             $html .= '
             <tr class="' . get_the_ID() . '">
                 <td class="booking-history-type ' . get_post_type($id_item) . '">
                    ' . $this->get_icon_type_order_item($id_item) . '
                 </td>
                 <td class="booking-history-title"> <a href="' . $this->get_link_order_item($id_item) . '">' . $this->get_title_order_item($id_item) . '</a></td>
                 <td>' . $this->get_location_order_item($id_item) . '</td>
                 <td>' . get_the_date() . '</td>
                 <td>' . $date . '</td>
                 <td>' . TravelHelper::format_money($total_price) . '</td>
                 <td>' . get_post_meta(get_the_ID(), 'status', true) . '</td>
                 <td>' . $action . '</td>
             </tr>';
         }
     }
     wp_reset_query();
     if (!empty($_REQUEST['show'])) {
         if (!empty($html)) {
             $status = 'true';
         } else {
             $status = 'false';
         }
         echo json_encode(array('html' => $html, 'data_per' => $paged + 1, 'status' => $status));
         die;
     } else {
         return $html;
     }
 }
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:75,代码来源:class.user.php

示例3: esc_html

</a></h5>
                        <?php 
        if ($address = get_post_meta(get_the_ID(), 'address', TRUE)) {
            ?>
                            <p class="mb0">
                                <small> <?php 
            echo esc_html($address);
            ?>
</small>
                            </p>
                        <?php 
        }
        ?>
                        <p class="mb0 text-darken"><span
                                class="text-lg lh1em"><?php 
        echo TravelHelper::format_money(STHotel::get_avg_price());
        ?>
</span>
                            <small> <?php 
        st_the_language('avg/night');
        ?>
</small>
                        </p>
                    </div>
                </div>
            </div>
        <?php 
    }
    ?>
    </div>
<?php 
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:loop.php

示例4: _e

            _e('review', ST_TEXTDOMAIN);
        }
        ?>
                                </p>
                            <?php 
    }
    ?>
                            <?php 
    if (!empty($offer)) {
        ?>
                                <p class="mb0">
                                    <?php 
        if ($offer > 1) {
            printf(__('%d offers from %s', ST_TEXTDOMAIN), $offer, TravelHelper::format_money($min_price));
        } else {
            printf(__('%d offer from %s', ST_TEXTDOMAIN), $offer, TravelHelper::format_money($min_price));
        }
        ?>
                                </p>
                            <?php 
    }
    ?>
                        </div>
                    </div>
                </a>
            </div>
        </div>
<?php 
}
?>
</div>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:loop-normal.php

示例5: date

        echo date(get_option('date_format'), strtotime($data['data']['check_in']));
        ?>
                    <?php 
    }
    ?>
                    <?php 
    if (isset($data['data']['check_out'])) {
        ?>
                    <?php 
        st_the_language('to');
        echo date(get_option('date_format'), strtotime($data['data']['check_out']));
        ?>
                    <?php 
    }
    ?>
</small>
                </p>
            </div>
            <div class="col-xs-3">
                <p class="text-right"><span class="text-lg">
                    <?php 
    $money = STCart::get_hotel_price($data['data'], $data['price'], $data['number']);
    echo TravelHelper::format_money($money);
    ?>
                </span>
                </p>
            </div>
        </div>
    </li>
    <?php 
}
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:success_payment_item.php

示例6: st_the_language

                        <?php 
        echo '<span class="onsale">' . $price_old . '</span> <i class="fa fa-arrow-right "></i>';
        ?>
                        <?php 
    }
    ?>
                        <strong><?php 
    echo TravelHelper::format_money($price_car);
    ?>
</strong>
                        <small>/<?php 
    echo STCars::get_price_unit();
    ?>
</small>
                    </p>
                </li>
                <li>
                    <p class="booking-item-payment-price-title"><?php 
    st_the_language('car_total');
    ?>
 </p>
                    <p class="booking-item-payment-price-amount"><?php 
    echo TravelHelper::format_money($item['data']['price_total']);
    ?>
                    </p>
                </li>
            </ul>
        </li>
    </ul>
<?php 
}
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:cart_item_html.php

示例7: foreach

                                        <?php 
if (!empty($info_price)) {
    foreach ($info_price as $k => $v) {
        ?>
                                                    <tr>
                                                        <td>
                                                            <?php 
        echo date('d/m/Y', strtotime($v['start']));
        ?>
                                                            <i class="fa fa-arrow-right "></i>
                                                            <?php 
        echo date('d/m/Y', strtotime($v['end']));
        ?>
                                                        </td>
                                                        <td><?php 
        echo TravelHelper::format_money($v['price']);
        ?>
/<small><?php 
        st_the_language('per_night');
        ?>
</small></td>
                                                    </tr>

                                                <?php 
    }
}
?>
                                        </table>
                                    </div>
                                </div>
                                <div class="form-row">
开发者ID:HatchForce,项目名称:bachtraveller,代码行数:31,代码来源:booking_edit.php

示例8: _e

                     </tbody>
                     <tr class="bg-white">
                         <th>
                             <?php 
 _e("Total", ST_TEXTDOMAIN);
 ?>
                         </th>
                         <td class="text-center">
                             <?php 
 echo esc_html($data_js['info_total']['number_orders']);
 ?>
                         </td>
                         <td class="text-center">
                             <?php 
 if ($data_js['info_total']['average_total'] > 0) {
     echo TravelHelper::format_money($data_js['info_total']['average_total']);
 } else {
     echo "0";
 }
 ?>
                         </td>
                     </tr>
                 </table>
             </div>
         </div>
     </div>
 </div>
 <script>
     var data_lable = <?php 
 echo balanceTags($data_js['lable']);
 ?>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:user-dashboard.php

示例9: __

        }
        echo '</li>';
    }
    echo "</ul>";
    ?>
            <?php 
}
?>
            <div>
                <?php 
if (!empty($is_sale)) {
    ?>
                    <span class="text-small lh1em  onsale">
                                    <?php 
    echo TravelHelper::format_money($price);
    ?>
                                </span>
                    <i class="fa fa-long-arrow-right"></i>
                <?php 
}
?>
                <?php 
if (!empty($price)) {
    echo '<span class="text-darken mb0 text-color">' . TravelHelper::format_money($price_sale) . '<small> /' . __('night', ST_TEXTDOMAIN) . '</small></span>';
}
?>
            </div>
        </div>
    </div>
</div>
<!-- end loop rental -->
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:loop-list.php

示例10: esc_html

"><i class="im im-width"></i><span class="booking-item-feature-sign"><?php 
    echo esc_html($room_footage);
    ?>
</span>
                        </li>
                    <?php 
}
?>
                </ul>
                <ul class="booking-item-features booking-item-features-small clearfix">
                    <?php 
get_template_part('single-hotel/room-facility', 'list');
?>
                </ul>
            </div>
                <div class="col-md-3">
                    <span class="booking-item-price-from"><?php 
st_the_language('user_from');
?>
</span>
                                <span class="booking-item-price">
                                    <?php 
echo TravelHelper::format_money(get_post_meta(get_the_ID(), 'price', true));
?>
                                </span>
                </div>
        </div>
    </a>
</li>

开发者ID:HatchForce,项目名称:bachtraveller,代码行数:29,代码来源:loop-room.php

示例11: foreach

    ?>
</th>
            </tr>
            </thead>
            <tbody>
                <?php 
    foreach ($_data_post as $k => $v) {
        ?>
                    <tr>
                        <th scope="row"><strong><?php 
        $obj = get_post_type_object($k);
        echo esc_html($obj->labels->singular_name);
        ?>
</strong></th>
                        <td><?php 
        echo TravelHelper::format_money($v['average_total']);
        ?>
</td>
                        <td><?php 
        echo esc_html($v['number_items']);
        ?>
</td>
                    </tr>
                <?php 
    }
    ?>
            </tbody>
        </table>
    </div>
<?php 
}
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:user-reports.php

示例12: strtolower

$count_sale = $info_price['discount'];
$price_origin = $info_price['price_origin'];
?>
                    <?php 
if ($cars_price != $price_origin) {
    ?>
                        <span class="text-lg lh1em sale_block onsale">
							<?php 
    echo TravelHelper::format_money($price_origin);
    ?>
                        </span>
                    <?php 
}
?>
                    <?php 
echo TravelHelper::format_money($cars_price);
?>
                </span>
            <span class="booking-item-price-unit">/<?php 
echo strtolower(STCars::get_price_unit('label'));
?>
</span>
            <?php 
$category = get_the_terms(get_the_ID(), 'st_category_cars');
?>
            <?php 
$txt = '';
if (!empty($category)) {
    foreach ($category as $k => $v) {
        $txt .= $v->name . ' ,';
    }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:loop-1.php

示例13: get_price_html

 static function get_price_html($post_id = false, $get = false, $st_mid = '', $class = '')
 {
     /*
      * since 1.1.3
      * filter hook get_price_html
      */
     if (!$post_id) {
         $post_id = get_the_ID();
     }
     $html = '';
     $prices = self::get_price_person($post_id);
     $adult_html = '';
     $adult_new_html = '<span class="text-lg lh1em item ">' . TravelHelper::format_money($prices['adult_new']) . '</span>';
     // Check on sale
     if (isset($prices['adult']) and $prices['adult']) {
         if ($prices['discount']) {
             $adult_html = '<span class="text-small lh1em  onsale">' . TravelHelper::format_money($prices['adult']) . '</span>&nbsp;&nbsp;';
             $html .= sprintf(__('Adult: %s %s', ST_TEXTDOMAIN), $adult_html, $adult_new_html);
         } else {
             $html .= sprintf(__('Adult: %s', ST_TEXTDOMAIN), $adult_new_html);
         }
     }
     /*$child_new_html = '<span class="text-lg lh1em item ">' . TravelHelper::format_money( $prices[ 'child_new' ] ) . '</span>';
     
     
                 // Price for child
                 if($prices[ 'child_new' ]) {
                     $html .= ' ' . $st_mid . ' ';
     
                     // Check on sale
                     if(isset( $prices[ 'child' ] ) and $prices[ 'child' ] and $prices[ 'discount' ]) {
                         $child_html = '<span class="text-small lh1em  onsale">' . TravelHelper::format_money( $prices[ 'child' ] ) . '</span>&nbsp;&nbsp;';
     
                         $html .= sprintf( __( 'Children: %s %s' , ST_TEXTDOMAIN ) , $child_html , $child_new_html );
                     } else {
                         $html .= sprintf( __( 'Children: %s' , ST_TEXTDOMAIN ) , $child_new_html );
                     }
     
                 }
     
                 $infant_new_html = '<span class="text-lg lh1em item ">' . TravelHelper::format_money( $prices[ 'infant_new' ] ) . '</span>';
     
     
                 // Price for child
                 if($prices[ 'infant_new' ]) {
                     $html .= ' ' . $st_mid . ' ';
     
                     // Check on sale
                     if(isset( $prices[ 'infant' ] ) and $prices[ 'infant' ] and $prices[ 'discount' ]) {
                         $infant_html = '<span class="text-small lh1em  onsale">' . TravelHelper::format_money( $prices[ 'infant' ] ) . '</span>&nbsp;&nbsp;';
     
                         $html .= sprintf( __( 'Infant: %s %s' , ST_TEXTDOMAIN ) , $infant_html , $infant_new_html );
                     } else {
                         $html .= sprintf( __( 'Infant: %s' , ST_TEXTDOMAIN ) , $infant_new_html );
                     }
     
                 }*/
     return apply_filters('st_get_tour_price_html', $html);
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:59,代码来源:class.activity.php

示例14: _e

        <?php 
}
?>

        <?php 
if (!empty($selected_equipments)) {
    ?>
            <p><strong><?php 
    _e("Equipments: ", ST_TEXTDOMAIN);
    ?>
</strong>
                <ul>
                <?php 
    foreach ($selected_equipments as $equipment) {
        $price_unit = '';
        if (isset($equipment->price_unit) and $equipment->price_unit) {
            $price_unit = ' (' . TravelHelper::format_money($equipment->price) . '/' . st_car_price_unit_title($equipment->price_unit) . ')';
        }
        // echo "<li>".$equipment->title.$price_unit." ->xx ".TravelHelper::format_money(STCars::get_equipment_line_item($equipment->price,$equipment->price_unit,$check_in_timestamp,$check_out_timestamp))."</li>";
        echo "<li>" . $equipment->title . $price_unit . "</li>";
    }
    ?>
                </ul>
            </p>

        <?php 
}
?>
    </td>
</tr>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:30,代码来源:success_payment_item_row.php

示例15: WC

if (get_option('woocommerce_tax_total_display') == 'itemized') {
    $wp_cart = WC()->cart->cart_contents;
    $item = $wp_cart[$st_booking_data['cart_item_key']];
    $tax = $item['line_tax'];
    if (!empty($tax)) {
        ?>
                <b class='booking-cart-item-title'><?php 
        echo __("Tax", ST_TEXTDOMAIN);
        ?>
: </b>
                <?php 
        echo TravelHelper::format_money($tax);
        ?>
            <?php 
    }
} else {
    $tax = 0;
}
?>
    </div>
    <div class='cart_border_bottom'></div>
    <div class="cart_item_group" style='margin-bottom: 10px'>        
        <b class='booking-cart-item-title'><?php 
echo __("Total amount", ST_TEXTDOMAIN);
?>
:</b>  
        <?php 
echo TravelHelper::format_money($st_booking_data['ori_price'] + $tax);
?>
    </div>   
</div>
开发者ID:DaddyFool,项目名称:travelTest,代码行数:31,代码来源:wc_cart_item_information.php


注:本文中的TravelHelper::format_money方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。