• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP formatPrice函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中formatPrice函数的典型用法代码示例。如果您正苦于以下问题:PHP formatPrice函数的具体用法?PHP formatPrice怎么用?PHP formatPrice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: loadCartTotals

 static function loadCartTotals($db, $customer_id)
 {
     $totals = [];
     $sql = 'SELECT SUM(product_price * cart_count) AS p FROM viewProductsInCart WHERE cart_customer_id = ?';
     $statement = SqlQuery::executeSQL($db, $sql, [$customer_id]);
     $result = $statement->get_result();
     if ($row = $result->fetch_assoc()) {
         $totals = $row;
         $selected_currency = Currency::getSelectedCurrency($db);
         $totals['pf'] = formatPrice($row['p'], $selected_currency);
         $totals['pc'] = $row['p'] / $selected_currency->fval('currency_value');
     }
     $statement->close();
     return $totals;
 }
开发者ID:lotcz,项目名称:zshop,代码行数:15,代码来源:cart.m.php


示例2: loadProducts

function loadProducts()
{
    global $mysqli;
    $p = array();
    $res = $mysqli->query("select id, title, description, category, price, image from jube_items order by id");
    while ($row = $res->fetch_assoc()) {
        if (!$p[$row["category"]]) {
            $p[$row["category"]] = array();
        }
        $item = array("id" => $row["id"], "title" => $row["title"], "description" => $row["description"], "price" => formatPrice($row["price"]), "category" => $row["category"]);
        if (!empty($row["image"])) {
            $item["thumb"] = PUBLIC_MEDIA_DIR . $row["image"] . "/size_thumb.jpg";
            $item["large"] = PUBLIC_MEDIA_DIR . $row["image"] . "/size_large.jpg";
        }
        $p[$row["category"]][] = $item;
    }
    $res = array();
    $catIndex = 0;
    while (list($key, $val) = each($p)) {
        $res[] = array("category" => $key, "items" => $val, "catIndex" => $catIndex++);
    }
    return $res;
}
开发者ID:newcron,项目名称:juebe-modelle,代码行数:23,代码来源:index.php


示例3: EfrontLesson

    $smarty->assign('T_CONTACT_FORM', $renderer->toArray());
}
/* -------------------------------------------------------End of Contact part--------------------------------------------------------- */
/* -------------------------------------------------------Lesson information part--------------------------------------------------------- */
if (isset($_GET['ctg']) && $_GET['ctg'] == 'lesson_info') {
    //The user asked to display information on a lesson
    //session_start();			//Isn't needed here if the head session_start() is in place
    if (!$smarty->is_cached('index.tpl', $cacheId) || !$GLOBALS['configuration']['smarty_caching']) {
        include "directions_tree.php";
        try {
            if (isset($_GET['lessons_ID'])) {
                if (isset($lessons[$_GET['lessons_ID']]) && $lessons[$_GET['lessons_ID']] instanceof EfrontLesson) {
                    $smarty->assign("T_HAS_LESSON", $lessons[$_GET['lessons_ID']]->lesson['has_lesson']);
                }
                $lesson = new EfrontLesson($_GET['lessons_ID']);
                $lesson->lesson['price_string'] = formatPrice($lesson->lesson['price'], array($lesson->options['recurring'], $lesson->options['recurring_duration']), true);
                $lesson->lesson['num_students'] = sizeof($lesson->getStudentUsers());
                $lesson->lesson['seats_remaining'] = $lesson->lesson['max_users'] - $lesson->lesson['num_students'];
                $lesson->lesson['seats_remaining'] >= 0 or $lesson->lesson['seats_remaining'] = 0;
                $smarty->assign("T_LESSON", $lesson);
                $lessonInformation = $lesson->getInformation();
                $content = new EfrontContentTree($lesson);
                if (sizeof($content->tree) > 0) {
                    $smarty->assign("T_CONTENT_TREE", $content->toHTML(false, 'dhtml_content_tree', array('noclick' => 1)));
                }
                $lessonInfo = new LearningObjectInformation(unserialize($lesson->lesson['info']));
                $smarty->assign("T_LESSON_INFO", $lessonInfo);
                $additionalInfo = $lesson->getInformation();
                $smarty->assign("T_ADDITIONAL_LESSON_INFO", $additionalInfo);
                if ($lesson->lesson['course_only']) {
                    $smarty->assign("T_LESSON_COURSES", $lesson->getCourses());
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:index.php


示例4: buildPriceString

 /**
  * Build the price string. This function takes the lesson price and
  * creates a human-readable version, based on whether it is a one-time
  * or a recurring price
  *
  * @since 3.6.1
  * @access protected
  */
 private function buildPriceString()
 {
     if (!empty($this->lesson['price']) && $this->validateFloat($this->lesson['price'])) {
         //Create the string representing the lesson price
         $this->options['recurring'] ? $recurring = array($this->options['recurring'], $this->options['recurring_duration']) : ($recurring = false);
         $this->lesson['price_string'] = formatPrice($this->lesson['price'], $recurring);
     } else {
         $this->lesson['price_string'] = formatPrice(0);
     }
     if (mb_strlen($this->lesson['name']) > 100) {
         $this->lesson['formatted_name'] = mb_substr($this->lesson['name'], 0, 100) . '...';
     } else {
         $this->lesson['formatted_name'] = $this->lesson['name'];
     }
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:23,代码来源:lesson.class.php


示例5: getListView

 public function getListView($lang)
 {
     require ROOT . "resources/" . $lang . ".php";
     $itemHtml = "<div class=\"list-article\">";
     $itemHtml .= "<img src=\"" . $this->getImage() . "\" width=\"100px\" height=\"100px\"/>";
     $itemHtml .= "<h2>" . $this->getName() . "</h2>";
     $itemHtml .= "<p class=\"list-article-price\">{$priceLabel}: " . formatPrice($this->getPrice()) . " CHF</p>";
     if (count($this->getVariants()) > 0) {
         $itemHtml .= "<p class=\"list-article-variation\">{$variationsLabel}:";
         $firstElement = TRUE;
         foreach ($this->getVariants() as $variant) {
             if ($firstElement) {
                 $firstElement = FALSE;
             } else {
                 $itemHtml .= ",";
             }
             if ($variant->getPrice() >= 0) {
                 $sign = " +";
             } else {
                 $sign = " ";
             }
             $itemHtml .= " " . $variant->getName() . $sign . formatPrice($variant->getPrice()) . " CHF";
         }
         $itemHtml .= "</p>";
     }
     $itemHtml .= "<p>" . $this->getDescription() . "</p>";
     $itemHtml .= "<form action=\"index.php\" method=\"get\">";
     $itemHtml .= "<input type=\"hidden\" name=\"site\" value=\"article\" /input>";
     $itemHtml .= "<input type=\"hidden\" name=\"lang\" value=\"" . $lang . "\" /input>";
     $itemHtml .= "<input type=\"hidden\" name=\"artId\" value=\"" . $this->getId() . "\" /input>";
     $itemHtml .= "<input class=\"list-article-button\" type=\"submit\" value=\"{$basketButtonLabel}\"/>";
     $itemHtml .= "</form>";
     $itemHtml .= "</div>";
     return $itemHtml;
 }
开发者ID:nellen,项目名称:ch.bfh.bti7054.w2014.q.Web-Prophecies,代码行数:35,代码来源:article.inc.php


示例6: showCoursePrice

 private function showCoursePrice($course)
 {
     if ($course->course['price']) {
         $course->course['price'] ? $priceString = formatPrice($course->course['price'], array($course->options['recurring'], $course->options['recurring_duration']), true) : ($priceString = false);
     } elseif (!EfrontUser::isOptionVisible('payments')) {
         $priceString = '';
     } else {
         $priceString = _FREECOURSE;
     }
     return $priceString;
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:11,代码来源:direction.class.php


示例7: editOrderItemSearchAction

		private function editOrderItemSearchAction()
		{
			if(empty($_REQUEST['q']) || empty($_REQUEST['quoteSession'])) {
				exit;
			}

			$quote = getClass('ISC_ADMIN_ORDERS')->getQuoteSession($_REQUEST['quoteSession']);
			if(!$quote) {
				exit;
			}

			$customerGroupId = $quote->getCustomerGroupId();

			$_REQUEST['searchQuery'] = $_REQUEST['q'];

			// autocomplete plugin can send a limit which will be at most 11 but internally we limit this to 2-11 and
			// reduce it by 1 to get 1-10 and append the 'virtual' item result as #11
			$limit = 11;
			if (isset($_REQUEST['limit'])) {
				$limit = max(2, min(10, (int)$_REQUEST['limit']));
			}
			$limit--;

			$numProducts = 0;
			$result = getClass('ISC_ADMIN_PRODUCT')->_getProductList(
				0, 'p.prodname', 'asc', $numProducts,
				'DISTINCT p.*, '.GetProdCustomerGroupPriceSQL($customerGroupId), 10);

			$results = array();
			while($product = $this->db->fetch($result)) {
				$isConfigurable = false;
				if($product['prodvariationid'] != 0 || $product['prodconfigfields'] != 0) {
					$isConfigurable = true;
				}

				$options = array(
					'customerGroup' => $customerGroupId
				);
				$price = calculateFinalProductPrice($product, $product['prodcalculatedprice'], $options);
				$price = formatPrice($price);
				$results[] = array(
					'id'				=> $product['productid'],
					'name'				=> $product['prodname'],
					'link'				=> prodLink($product['prodname']),
					'sku'				=> $product['prodcode'],
					'isConfigurable'	=> $isConfigurable,
					'price'				=> $price
				);
			}

			$results[] = array(
				'id'			=> 'virtual',
				'virtualName'	=> $_REQUEST['q'],
				'name'			=> GetLang('AddManualProduct'),
				'className'		=> 'recordContentManual',
				'price'			=> GetLang('AddManualProductHelp'),
			);

			echo isc_json_encode($results);
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:60,代码来源:class.remote.orders.php


示例8: foreach

    // Set properties on variants
    foreach ($variants as $variant) {
        // hasOptions
        $options = str::split($variant->options());
        if (count($options)) {
            $variant->hasOptions = true;
        } else {
            $variant->hasOptions = false;
        }
        // priceText
        if (inStock($variant)) {
            $variant->priceText = l::get('buy') . ' ';
            if ($saleprice = salePrice($variant)) {
                $variant->priceText .= formatPrice($saleprice);
                $variant->priceText .= '<del>' . formatPrice($variant->price()->value) . '</del>';
            } else {
                $variant->priceText .= formatPrice($variant->price()->value);
            }
        } else {
            $variant->priceText = l::get('out-of-stock') . ' ';
            if ($saleprice = salePrice($variant)) {
                $variant->priceText .= formatPrice($saleprice);
                $variant->priceText .= '<del>' . formatPrice($variant->price()->value) . '</del>';
            } else {
                $variant->priceText .= formatPrice($variant->price()->value);
            }
        }
    }
    // Pass variables to the template
    return ['tags' => $tags, 'variants' => $variants];
};
开发者ID:aguynamedirvin,项目名称:F-C,代码行数:31,代码来源:product.php


示例9: formatPrice

                     $siblingsQty += $qty;
                 }
             }
             // Determine if we are at the maximum quantity
             if (inStock($variant) !== true and inStock($variant) <= $item->quantity + $siblingsQty) {
                 $item->maxQty = true;
             } else {
                 $item->maxQty = false;
             }
         }
     }
     // Price text
     if ($item->sale_amount) {
         $item->priceText = formatPrice($item->sale_amount * $item->quantity) . '<del>' . formatPrice($item->amount * $item->quantity) . '</del>';
     } else {
         $item->priceText = formatPrice($item->amount * $item->quantity);
     }
 }
 // Get countries
 $countries = page('/shop/countries')->children()->invisible();
 // Get shipping rates
 $shipping_rates = $cart->getShippingRates();
 // Set shipping method as a session variable
 // Shipping method is an array containing 'title' and 'rate'
 $shippingMethods = $cart->getShippingRates();
 if (get('shipping')) {
     // First option: see if a shipping method was set through a form submission
     if (get('shipping') == 'free-shipping') {
         $shippingMethod = ['title' => l::get('free-shipping'), 'rate' => 0];
     }
     foreach ($shippingMethods as $key => $method) {
开发者ID:aguynamedirvin,项目名称:F-C,代码行数:31,代码来源:cart.php


示例10: eF_getTableDataFlat

 if (isset($_GET['courses_ID']) && eF_checkParameter($_GET['courses_ID'], 'id') && $_GET['type'] == 'branches') {
     $result = eF_getTableDataFlat("module_hcd_course_to_branch mb, module_hcd_branch b", "mb.branches_ID, b.name", "b.branch_ID=mb.branches_ID and mb.courses_ID=" . $_GET['courses_ID']);
     $tooltipInfo = '<div class = "infoEntry"><span>' . implode(", ", $result['name']) . "</span><span></span></div>";
     echo $tooltipInfo;
     exit;
 }
 if (isset($_GET['courses_ID']) && eF_checkParameter($_GET['courses_ID'], 'id')) {
     $course = new EfrontCourse($_GET['courses_ID']);
     $courseInformation = $course->getInformation();
     if ($courseInformation['professors']) {
         foreach ($courseInformation['professors'] as $value) {
             $professorsString[] = formatLogin($value['login']);
         }
         $courseInformation['professors'] = implode(", ", $professorsString);
     }
     $course->course['price'] ? $priceString = formatPrice($course->course['price'], array($course->options['recurring'], $course->options['recurring_duration']), true) : ($priceString = false);
     $courseInformation['price_string'] = $priceString;
     if ($course->course['max_users']) {
         $courseInformation['max_users'] = $course->course['max_users'];
         $courseInformation['seats_remaining'] = $courseInformation['max_users'] - sizeof($course->getStudentUsers());
         $courseInformation['seats_remaining'] >= 0 or $courseInformation['seats_remaining'] = 0;
     }
     foreach ($courseInformation as $key => $value) {
         if ($value) {
             $value = str_replace("\n", "<br />", $value);
             switch ($key) {
                 case 'language':
                     $GLOBALS['configuration']['onelanguage'] or $tooltipInfo[] = '<div class = "infoEntry"><span>' . _LANGUAGE . "</span><span>: {$languages[$value]}</span></div>";
                     break;
                 case 'professors':
                     $tooltipInfo[] = '<div class = "infoEntry"><span>' . _PROFESSORS . "</span><span>: {$value}</span></div>";
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:31,代码来源:ask_information.php


示例11: formatPrice

"></a>
    </td>
    <td><div class="inner">
            <a href="?page=item-detail&item=<?php 
echo $item[$i]['item_id'];
?>
"><h2><?php 
echo $item[$i]['title'];
?>
</h2></a>
            <figure><?php 
echo Db::querySingle('SELECT city_title FROM search_cities_table WHERE city_id=?', $item[$i]['city']);
?>
</figure>
            <div class="tag price"><?php 
formatPrice($config['currency'], $item[$i]['price'], $config['locale']);
?>
</div>
            <?php 
if (isset($user['is_admin']) && $user['is_admin'] == 1 && $_GET['page'] == 'tools-items') {
    ?>
                <div class="assigned-person">Created by:
                    <a href="?page=edit-person&person=<?php 
    echo $person[$i]['person_id'];
    ?>
"><?php 
    echo $person[$i]['person_name'];
    ?>
</a>
                    <?php 
    if ($person[$i]['person_id'] == $_SESSION['user_id']) {
开发者ID:untalfacundo,项目名称:adonata.primera.version,代码行数:31,代码来源:single_item_my_items.php


示例12: askInformation

function askInformation()
{
    try {
        if (isset($_GET['lessons_ID']) && eF_checkParameter($_GET['lessons_ID'], 'id')) {
            $lesson = new EfrontLesson($_GET['lessons_ID']);
            $lessonInformation = $lesson->getInformation();
            $languages = EfrontSystem::getLanguages(true);
            //$lessonInformation['language'] = $languages[$lesson -> lesson['languages_NAME']];
            if ($lessonInformation['professors']) {
                foreach ($lessonInformation['professors'] as $value) {
                    $professorsString[] = $value['name'] . ' ' . $value['surname'];
                }
                $lessonInformation['professors'] = implode(", ", $professorsString);
            }
            $lesson->lesson['price'] ? $priceString = formatPrice($lesson->lesson['price'], array($lesson->options['recurring'], $lesson->options['recurring_duration']), true) : ($priceString = false);
            $lessonInformation['price_string'] = $priceString;
            //    if (!$lessonInformation['price']) {
            //        unset($lessonInformation['price_string']);
            //    }
            try {
                if ($_GET['from_course']) {
                    $course = new EfrontCourse($_GET['from_course']);
                    $schedule = $course->getLessonScheduleInCourse($lesson);
                    if ($schedule['start_date'] || $schedule['end_date']) {
                        $lessonInformation['from_timestamp'] = $schedule['start_date'];
                        $lessonInformation['to_timestamp'] = $schedule['end_date'];
                    } else {
                        $lessonInformation['from_timestamp'] = $schedule['active_in_lesson'] + 24 * 60 * 60 * $schedule['start_period'];
                        $lessonInformation['to_timestamp'] = $lessonInformation['from_timestamp'] + 24 * 60 * 60 * $schedule['end_period'];
                    }
                }
            } catch (Exception $e) {
            }
            foreach ($lessonInformation as $key => $value) {
                if ($value) {
                    switch ($key) {
                        case 'language':
                            $GLOBALS['configuration']['onelanguage'] or $tooltipInfo[] = '<div class = "infoEntry"><span>' . _LANGUAGE . "</span><span>: {$languages[$value]}</span></div>";
                            break;
                        case 'professors':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _PROFESSORS . "</span><span>: {$value}</span></div>";
                            break;
                        case 'content':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _CONTENTUNITS . "</span><span>: {$value}</span></div>";
                            break;
                        case 'tests':
                            EfrontUser::isOptionVisible('tests') ? $tooltipInfo[] = '<div class = "infoEntry"><span>' . _TESTS . "</span><span>: {$value}</span></div>" : null;
                            break;
                        case 'projects':
                            EfrontUser::isOptionVisible('projects') ? $tooltipInfo[] = '<div class = "infoEntry"><span>' . _PROJECTS . "</span><span>: {$value}</span></div>" : null;
                            break;
                        case 'course_dependency':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _DEPENDSON . "</span><span>: {$value}</span></div>";
                            break;
                        case 'from_timestamp':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _AVAILABLEFROM . "</span><span>: " . formatTimestamp($value, 'time_nosec') . "</span></div>";
                            break;
                        case 'to_timestamp':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _AVAILABLEUNTIL . "</span><span>: " . formatTimestamp($value, 'time_nosec') . "</span></div>";
                            break;
                        case 'general_description':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _DESCRIPTION . "</span><span>: {$value}</span></div>";
                            break;
                        case 'assessment':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _ASSESSMENT . "</span><span>: {$value}</span></div>";
                            break;
                        case 'objectives':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _OBJECTIVES . "</span><span>: {$value}</span></div>";
                            break;
                        case 'lesson_topics':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _LESSONTOPICS . "</span><span>: {$value}</span></div>";
                            break;
                        case 'resources':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _RESOURCES . "</span><span>: {$value}</span></div>";
                            break;
                        case 'other_info':
                            $tooltipInfo[] = '<div class = "infoEntry"><span>' . _OTHERINFO . "</span><span>: {$value}</span></div>";
                            break;
                        case 'price_string':
                            !$lesson->lesson['course_only'] ? $tooltipInfo[] = '<div class = "infoEntry"><span>' . _PRICE . "</span><span>: {$value}</span></div>" : null;
                            break;
                        default:
                            break;
                    }
                }
            }
            if ($string = implode("", $tooltipInfo)) {
                echo $string;
            } else {
                echo _NODATAFOUND;
            }
        }
        if (isset($_GET['courses_ID']) && eF_checkParameter($_GET['courses_ID'], 'id')) {
            $course = new EfrontCourse($_GET['courses_ID']);
            $courseInformation = $course->getInformation();
            $languages = EfrontSystem::getLanguages(true);
            if ($courseInformation['professors']) {
                foreach ($courseInformation['professors'] as $value) {
                    $professorsString[] = $value['name'] . ' ' . $value['surname'];
                }
//.........这里部分代码省略.........
开发者ID:bqq1986,项目名称:efront,代码行数:101,代码来源:ask.php


示例13:

		<div class="spaced product">		
			
			<div class="row">
				<div class="col col-md-6 text-center">
					<?php					
						$product->renderImage('view', 'img-thumbnail');					
					?>
				</div>
				
				<div class="col col-md-6">
					<div class="row">
						<div class="col col-md-6 text-left">
							<h3><?=t('Price') ?></h3>
						</div>
						<div class="col col-md-6 text-right">
							<h3><?=formatPrice($product->val('product_price'), $currency) ?></h3>
						</div>					
					</div>
					
					<div class="row spaced">
						<div class="col col-md-6 col-md-offset-6 text-right">
							<form class="form-inline">
								<input name="product_count" id="prod_count_<?=$product->val('product_id')?>" value="1" type="text" maxlength="2" class="form-control prod-item-count" />
								<button class="btn btn-success" onclick="javascript:addProductToCart(<?=$product->val('product_id')?>);return false;"><span class="glyphicon glyphicon-shopping-cart"></span><?=t('Buy')?></button>
							</form>
						</div>					
					</div>
				</div>
			</div>
			
			<div class="row spaced">
开发者ID:lotcz,项目名称:zshop,代码行数:31,代码来源:product.v.php


示例14: intval

$product_id = intval(_g('product_id'));
$count = intval(_g('count'));
$action = $path[2];
if (isset($custAuth) && $custAuth->isAuth()) {
    $cart = new Cart($db);
    $cart->load($product_id, $custAuth->customer_id);
    if ($cart->is_loaded) {
        if ($action == 'add') {
            $cart->data['cart_count'] = $cart->val('cart_count') + $count;
        } elseif ($action == 'update') {
            $cart->data['cart_count'] = $count;
        }
    } else {
        $cart->data['cart_product_id'] = $product_id;
        $cart->data['cart_customer_id'] = $custAuth->customer_id;
        $cart->data['cart_count'] = $count;
    }
    if ($cart->val('cart_count') > 0) {
        $cart->save();
    } else {
        $cart->deleteById();
    }
    $data = Cart::loadCartTotals($db, $custAuth->customer_id);
    if ($action == 'update') {
        $data['ii'] = $product_id;
        $product = new Product($db, $product_id);
        $data['ip'] = formatPrice($cart->ival('cart_count') * $product->ival('product_price'));
    }
} else {
    echo 'Cannot authenticate customer';
}
开发者ID:lotcz,项目名称:zshop,代码行数:31,代码来源:cart.c.php


示例15: _url

			</a>
				
			<div class="panel-title">				
				<a href="<?php 
echo _url($product->val('alias_url'));
?>
"><?php 
echo $product->val('product_name');
?>
</a>
			</div>
			
			<div class="product-price">
				<div class="price">
					<?php 
echo formatPrice($product->val('product_price'));
?>
				</div>					
			</div>	

		</div>
		
		<div class="panel-heading basic-bg text-right">
			<form class="form-inline">
				<input id="prod_count_<?php 
echo $product->val('product_id');
?>
" value="1" type="text" maxlength="2" class="form-control prod-item-count" />
				<button class="btn btn-success" onclick="javascript:addProductToCart(<?php 
echo $product->val('product_id');
?>
开发者ID:lotcz,项目名称:zshop,代码行数:31,代码来源:prod-prev.v.php


示例16: display


//.........这里部分代码省略.........
        echo "

\t\t\t\t\t";
        // line 225
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['formBuilder']) ? $context['formBuilder'] : null), "endForm", array(), "any"), "1");
        echo "
\t\t\t\t</div>

\t\t\t\t";
        // line 228
        $context['address'] = $this->getAttribute((isset($context['quote']) ? $context['quote'] : null), "getShippingAddress", array(), "any");
        echo "
\t\t\t\t<div class=\"showByValue_shipItemsTo showByValue_shipItemsTo_billing showByValue_shipItemsTo_single\">
\t\t\t\t\t";
        // line 231
        $context['shippingMethod'] = $this->getAttribute((isset($context['address']) ? $context['address'] : null), "shippingMethod", array(), "any");
        echo "\t\t\t\t\t";
        // line 232
        if ((isset($context['shippingMethod']) ? $context['shippingMethod'] : null)) {
            echo "\t\t\t\t\t\t<input type=\"hidden\" name=\"currentShipping[isCustom]\" value=\"";
            // line 233
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "isCustom", array(), "any"), "1");
            echo "\" />
\t\t\t\t\t\t<input type=\"hidden\" name=\"currentShipping[module]\" value=\"";
            // line 234
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "module", array(), "any"), "1");
            echo "\" />
\t\t\t\t\t\t<input type=\"hidden\" name=\"currentShipping[description]\" value=\"";
            // line 235
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "description", array(), "any"), "1");
            echo "\" />
\t\t\t\t\t\t<input type=\"hidden\" name=\"currentShipping[price]\" value=\"";
            // line 236
            echo formatPrice(twig_escape_filter($this->env, $this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "price", array(), "any"), "1"), false, false);
            echo "\" />
\t\t\t\t\t";
        }
        // line 237
        echo "
\t\t\t\t\t";
        // line 239
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['formBuilder']) ? $context['formBuilder'] : null), "startForm", array(), "any"), "1");
        echo "
\t\t\t\t\t\t";
        // line 240
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['formBuilder']) ? $context['formBuilder'] : null), "heading", array($this->getAttribute((isset($context['lang']) ? $context['lang'] : null), "ShippingMethod", array(), "any"), ), "method"), "1");
        echo "

\t\t\t\t\t\t";
        // line 242
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context['formBuilder']) ? $context['formBuilder'] : null), "startRow", array(array("label" => ($this->getAttribute((isset($context['lang']) ? $context['lang'] : null), "ChooseAProvider", array(), "any")) . (":")), ), "method"), "1");
        // line 244
        echo "
\t\t\t\t\t\t\t<select name=\"shippingQuoteList\" ";
        // line 245
        if ((!(isset($context['shippingMethod']) ? $context['shippingMethod'] : null))) {
            echo "style=\"display: none\"";
        }
        echo " class=\"Field300 showByValue shippingQuoteList\" size=\"5\">
\t\t\t\t\t\t\t\t";
        // line 246
        if (((isset($context['shippingMethod']) ? $context['shippingMethod'] : null)) && ($this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "module", array(), "any") != "custom")) {
            echo "\t\t\t\t\t\t\t\t\t<option value=\"builtin:current\" selected=\"selected\">";
            // line 247
            echo getLang("UseCurrentShippingMethod", array("method" => $this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "description", array(), "any"), "price" => formatPrice($this->getAttribute((isset($context['shippingMethod']) ? $context['shippingMethod'] : null), "price", array(), "any"))));
            // line 250
开发者ID:hungnv0789,项目名称:vhtm,代码行数:67,代码来源:__TwigTemplate_b6dc25243802fca25ae306732f6eb806.php


示例17: getquoteItemGridItem


//.........这里部分代码省略.........
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 88
        echo "\t\t\t";
        // line 89
        if ($this->getAttribute((isset($context['item']) ? $context['item'] : null), "eventName", array(), "any")) {
            echo "\t\t\t\t<div class=\"quoteItemConfigurationRow\">
\t\t\t\t\t<div class=\"name\">";
            // line 91
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context['item']) ? $context['item'] : null), "eventName", array(), "any"), "1");
            echo ":</div>
\t\t\t\t\t<div class=\"value\">";
            // line 92
            echo $this->getEnvironment()->getExtension('interspire')->dateFormat(twig_escape_filter($this->env, $this->getAttribute((isset($context['item']) ? $context['item'] : null), "eventDate", array(true, ), "method"), "1"));
            echo "</div>
\t\t\t\t</div>
\t\t\t";
        }
        // line 94
        echo "\t\t\t";
        // line 95
        if ($this->getAttribute((isset($context['item']) ? $context['item'] : null), "giftWrapping", array(), "any")) {
            echo "\t\t\t\t<div class=\"quoteItemConfigurationRow\">
\t\t\t\t\t<div class=\"name\">";
            // line 97
            echo getLang("GiftWrapping");
            echo ":</div>
\t\t\t\t\t<div class=\"value\">";
            // line 98
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context['item']) ? $context['item'] : null), "giftWrapping", array(), "any"), "wrapname", array(), "any"), "1");
            echo " (";
            echo formatPrice(twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context['item']) ? $context['item'] : null), "giftWrapping", array(), "any"), "wrapprice", array(), "any"), "1"));
            echo ")</div>
\t\t\t\t</div>
\t\t\t\t";
            // line 100
            if ($this->getAttribute($this->getAttribute((isset($context['item']) ? $context['item'] : null), "giftWrapping", array(), "any"), "wrapmessage", array(), "any")) {
                echo "\t\t\t\t\t<div class=\"quoteItemConfigurationRow\">
\t\t\t\t\t\t<div class=\"name\">";
                // line 102
                echo getLang("GiftMessage");
                echo ":</div>
\t\t\t\t\t\t<div class=\"value\">";
                // line 103
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context['item']) ? $context['item'] : null), "giftWrapping", array(), "any"), "wrapmessage", array(), "any"), "1");
                echo "</div>
\t\t\t\t\t</div>
\t\t\t\t";
            }
            // line 105
            echo "\t\t\t";
        }
        // line 106
        echo "\t\t\t";
        // line 107
        if ($this->getAttribute((isset($context['item']) ? $context['item'] : null), "isPreOrder", array(), "any")) {
            echo "\t\t\t\t<div class=\"quoteItemConfigurationRow\">
\t\t\t\t\t<div class=\"name\">";
            // line 109
            echo getLang("PreOrder");
            echo ":</div>
\t\t\t\t\t<div class=\"value\">";
            // line 110
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context['item']) ? $context['item'] : null), "getPreOrderMessage", array(), "any"), "1");
开发者ID:hungnv0789,项目名称:vhtm,代码行数:67,代码来源:__TwigTemplate_d8f0a232e2edb03825c6c2a6076915f9.php


示例18: formatPrice

        if (inStock($featuredVariant)) {
            ?>
							<button class="uk-margin-small-top uk-button uk-width-1-1 uk-button-primary" type="submit"><?php 
            echo l::get('buy');
            ?>
 <?php 
            echo formatPrice($featuredPrice);
            ?>
</button>
						<?php 
        } else {
            ?>
							<button class="uk-margin-small-top uk-button uk-width-1-1" disabled><?php 
            echo l::get('out-of-stock');
            ?>
 <?php 
            echo formatPrice($featuredPrice);
            ?>
</button>
						<?php 
        }
        ?>
		            </form>
			  	</div>
		  </li>
	  <?php 
    }
    ?>
	</ul>
<?php 
}
开发者ID:jenniferhail,项目名称:kirbypine,代码行数:31,代码来源:list.featured.php


示例19: eF_getTableData

 $smarty->assign("T_CAN_ADD_PAYMENT", $canAddPayment);
 $result = eF_getTableData("payments", "*", "users_LOGIN='" . $editedUser->user['login'] . "'", "timestamp desc");
 $payments = array();
 foreach ($result as $value) {
     $payments[$value['id']] = $value;
 }
 $smarty->assign("T_USER_PAYMENTS", sizeof($payments));
 $smarty->assign("T_USER_TRANSACTIONS_NUM", sizeof($trans));
 if (isset($_GET['ajax']) && $canAddPayment && isset($_GET['balance'])) {
     try {
         if (is_numeric($_GET['balance']) && $_GET['balance'] > 0 && ($_GET['balance'] <= $currentUser->user['balance'] || $currentUser->user['user_type'] == 'administrator')) {
             $editedUser->user['balance'] += $_GET['balance'];
             $response = array(' 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP formatRates函数代码示例发布时间:2022-05-15
下一篇:
PHP formatPhone函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap