Пример #1
0
 function get_line_items()
 {
     // Do not send lines when  too many line items in the order.
     $count = STCart::count();
     if ($count > 9 or !$count) {
         return false;
     }
     $args = array();
     $item_loop = 0;
     if (STCart::check_cart()) {
         $cart = STCart::get_carts();
         if (!empty($cart)) {
             foreach ($cart as $key => $value) {
                 $args[] = array('name' => $this->paypal_item_name(get_the_title($key)), 'quantity' => $value['number'], 'price' => STCart::get_item_total($value, $key));
             }
             if (STCart::use_coupon()) {
                 $args[] = array('name' => sprintf(st_get_language('coupon_key'), STCart::get_coupon_code()), 'quantity' => 1, 'price' => -STCart::get_coupon_amount());
             }
         }
     }
     return $args;
 }
Пример #2
0
echo STPrice::getTax() . ' %';
?>
</strong></td>
        </tr>
        <tr>
            <td class="text-left title"><?php 
echo __('Total Price (with tax)', ST_TEXTDOMAIN);
?>
</td>
            <td class="text-right "><strong><?php 
echo TravelHelper::format_money($price_with_tax);
?>
</strong></td>
        </tr>
        <?php 
if (STCart::use_coupon()) {
    $price_coupon = floatval(STCart::get_coupon_amount());
    if ($price_coupon < 0) {
        $price_coupon = 0;
    }
    ?>
            <tr>
                <td class="text-left title">
                    <?php 
    printf(st_get_language('coupon_key'), STCart::get_coupon_code());
    ?>
 <br/>
                    <a href="<?php 
    echo st_get_link_with_search(get_permalink(), array('remove_coupon'), array('remove_coupon' => STCart::get_coupon_code()));
    ?>
"