本文整理汇总了PHP中tep_get_products_stock函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_get_products_stock函数的具体用法?PHP tep_get_products_stock怎么用?PHP tep_get_products_stock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_get_products_stock函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: tep_check_stock
function tep_check_stock($products_id, $products_quantity)
{
$stock_left = tep_get_products_stock($products_id) - $products_quantity;
$out_of_stock = '';
if ($stock_left < 0) {
$out_of_stock = '<span class="text-danger"><b>' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</b></span>';
}
return $out_of_stock;
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:9,代码来源:general.php
示例2: strip_tags
$prod_list_contents .= ' <a itemprop="url" href="' . OSCOM::link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $Qlisting->valueInt('products_id')) . '"><span itemprop="name">' . $Qlisting->value('products_name') . '</span></a>';
}
$prod_list_contents .= ' </h2>';
$prod_list_contents .= ' <p class="group inner list-group-item-text" itemprop="description">' . strip_tags($Qlisting->value('products_description'), '<br>') . '…</p><div class="clearfix"></div>';
$extra_list_contents = NULL;
if (PRODUCT_LIST_MANUFACTURER > 0 && tep_not_null($Qlisting->valueInt('manufacturers_id'))) {
$extra_list_contents .= '<dt>' . OSCOM::getDef('table_heading_manufacturer') . '</dt>';
$extra_list_contents .= '<dd><a href="' . OSCOM::link('index.php', 'manufacturers_id=' . $Qlisting->valueInt('manufacturers_id')) . '">' . $Qlisting->value('manufacturers_name') . '</a></dd>';
}
if (PRODUCT_LIST_MODEL > 0 && tep_not_null($Qlisting->value('products_model'))) {
$extra_list_contents .= '<dt>' . OSCOM::getDef('table_heading_model') . '</dt>';
$extra_list_contents .= '<dd>' . $Qlisting->value('products_model') . '</dd>';
}
if (PRODUCT_LIST_QUANTITY > 0 && tep_get_products_stock($Qlisting->valueInt('products_id')) > 0) {
$extra_list_contents .= '<dt>' . OSCOM::getDef('table_heading_quantity') . '</dt>';
$extra_list_contents .= '<dd>' . tep_get_products_stock($Qlisting->valueInt('products_id')) . '</dd>';
}
if (PRODUCT_LIST_WEIGHT > 0) {
$extra_list_contents .= '<dt>' . OSCOM::getDef('table_heading_weight') . '</dt>';
$extra_list_contents .= '<dd>' . $Qlisting->value('products_weight') . '</dd>';
}
if (tep_not_null($extra_list_contents)) {
$prod_list_contents .= ' <dl class="dl-horizontal list-group-item-text">';
$prod_list_contents .= $extra_list_contents;
$prod_list_contents .= ' </dl>';
}
if (PRODUCT_LIST_PRICE > 0 || PRODUCT_LIST_BUY_NOW > 0) {
$prod_list_contents .= ' <div class="row">';
if (PRODUCT_LIST_PRICE > 0) {
if (tep_not_null($Qlisting->valueDecimal('specials_new_products_price'))) {
$prod_list_contents .= ' <div class="col-xs-6" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="' . HTML::output($_SESSION['currency']) . '" /><div class="btn-group" role="group"><button type="button" class="btn btn-default"><del>' . $currencies->display_price($Qlisting->valueDecimal('products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '</del></span> <span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($Qlisting->valueDecimal('specials_new_products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '">' . $currencies->display_price($Qlisting->valueDecimal('specials_new_products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '</span></button></div></div>';
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:product_listing.php
示例3: tep_check_stock
function tep_check_stock($products_id, $products_quantity, $attributes = array())
{
$stock_left = tep_get_products_stock($products_id, $attributes) - $products_quantity;
// EOF: MOD - QT Pro
$out_of_stock = '';
if ($stock_left < 0) {
$out_of_stock = '<span class="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
}
return $out_of_stock;
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:10,代码来源:general.php
示例4: strip_tags
}
$prod_list_contents .= ' </h2>';
}
$prod_list_contents .= ' <p class="group inner list-group-item-text" itemprop="description">' . strip_tags($listing['products_description'], '<br>') . '…</p><div class="clearfix"></div>';
$extra_list_contents = NULL;
if (PRODUCT_LIST_MANUFACTURER > 0 && tep_not_null($listing['manufacturers_id'])) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MANUFACTURER . '</dt>';
$extra_list_contents .= '<dd><a href="' . tep_href_link('index.php', 'manufacturers_id=' . (int) $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></dd>';
}
if (PRODUCT_LIST_MODEL > 0 && tep_not_null($listing['products_model'])) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MODEL . '</dt>';
$extra_list_contents .= '<dd>' . $listing['products_model'] . '</dd>';
}
if (PRODUCT_LIST_QUANTITY > 0 && tep_get_products_stock($listing['products_id']) > 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_QUANTITY . '</dt>';
$extra_list_contents .= '<dd>' . tep_get_products_stock($listing['products_id']) . '</dd>';
}
if (PRODUCT_LIST_WEIGHT > 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_WEIGHT . '</dt>';
$extra_list_contents .= '<dd>' . $listing['products_weight'] . '</dd>';
}
if (tep_not_null($extra_list_contents)) {
$prod_list_contents .= ' <dl class="dl-horizontal list-group-item-text">';
$prod_list_contents .= $extra_list_contents;
$prod_list_contents .= ' </dl>';
}
if (PRODUCT_LIST_PRICE > 0 || PRODUCT_LIST_BUY_NOW > 0) {
$prod_list_contents .= ' <div class="row">';
if (PRODUCT_LIST_PRICE > 0) {
if (tep_not_null($listing['specials_new_products_price'])) {
$prod_list_contents .= ' <div class="col-xs-6" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="' . tep_output_string($currency) . '" /><div class="btn-group" role="group"><button type="button" class="btn btn-default"><del>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del></span> <span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></button></div></div>';
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:31,代码来源:product_listing.php
示例5: strip_tags
}
$prod_list_contents .= ' </h2>';
$prod_list_contents .= ' <p class="group inner list-group-item-text">' . strip_tags($listing['products_description'], '<br>') . '…</p><div class="clearfix"></div>';
// here it goes the extras, yuck
$extra_list_contents = NULL;
// manufacturer
if ($lc_show_manu == true && $listing['manufacturers_id'] != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MANUFACTURER . '</dt><dd><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></dd>';
}
// model
if ($lc_show_model == true && tep_not_null($listing['products_model'])) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MODEL . '</dt><dd>' . $listing['products_model'] . '</dd>';
}
// stock
if ($lc_show_qty == true && tep_get_products_stock($listing['products_id']) != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_QUANTITY . '</dt><dd>' . tep_get_products_stock($listing['products_id']) . '</dd>';
}
// weight
if ($lc_show_lbs == true && $listing['products_weight'] != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_WEIGHT . '</dt><dd>' . $listing['products_weight'] . '</dd>';
}
if (tep_not_null($extra_list_contents)) {
$prod_list_contents .= ' <dl class="dl-horizontal list-group-item-text">';
$prod_list_contents .= $extra_list_contents;
$prod_list_contents .= ' </dl>';
}
$prod_list_contents .= ' <div class="row">';
if (tep_not_null($listing['specials_new_products_price'])) {
$prod_list_contents .= ' <div class="col-xs-6"><div class="btn-group" role="group"><button type="button" class="btn btn-default"><del>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del></span> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</button></div></div>';
} else {
$prod_list_contents .= ' <div class="col-xs-6"><div class="btn-group" role="group"><button type="button" class="btn btn-default">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</button></div></div>';
开发者ID:jdogrulz,项目名称:Responsive-osCommerce,代码行数:31,代码来源:product_listing.php
示例6: tep_draw_button
}
$prod_list_contents .= ' </div> <!--pricewrap-->';
$prod_list_contents .= ' <div class="btn-wrap">' . tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), NULL, NULL, 'btn-success btn-sm');
$prod_list_contents .= ' </div><!--btn-wrap-->';
$prod_list_contents .= ' <ul class="optional-wrap">';
// manufacturer
if ($lc_show_manu == true && $listing['manufacturers_id'] != 0) {
$prod_list_contents .= '<li><span class="list-label">' . TABLE_HEADING_MANUFACTURER . '</span> <span class="productManu"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></span> </li>';
}
// model
if ($lc_show_model == true && tep_not_null($listing['products_model'])) {
$prod_list_contents .= '<li><span class="list-label">' . TABLE_HEADING_MODEL . '</span> <span class="productModel">' . $listing['products_model'] . '</span> </li>';
}
// stock
if ($lc_show_qty == true && tep_get_products_stock($listing['products_id']) != 0) {
$prod_list_contents .= '<li><span class="list-label">' . TABLE_HEADING_QUANTITY . '</span> <span class="productQty">' . tep_get_products_stock($listing['products_id']) . '</span> </li>';
}
// weight
if ($lc_show_lbs == true && $listing['products_weight'] != 0) {
$prod_list_contents .= '<li><span class="list-label">' . TABLE_HEADING_WEIGHT . '</span> <span class="productWeight">' . $listing['products_weight'] . '</span> </li>';
}
$prod_list_contents .= ' </ul><!--optional-wrap-->';
$prod_list_contents .= ' </li>';
}
$prod_list_contents .= ' </ul>';
$prod_list_contents .= '</div>';
echo $prod_list_contents;
} else {
?>
<div class="alert alert-info"><?php
开发者ID:osc2nuke,项目名称:demobts,代码行数:31,代码来源:product_listing.php
示例7: strip_tags
if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) {
$prod_list_contents .= ' <a href="' . OSCOM::link('product_info.php', 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $Qlisting->valueInt('products_id')) . '">' . $Qlisting->value('products_name') . '</a>';
} else {
$prod_list_contents .= ' <a href="' . OSCOM::link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $Qlisting->valueInt('products_id')) . '">' . $Qlisting->value('products_name') . '</a>';
}
$prod_list_contents .= ' </h2>';
$prod_list_contents .= ' <p class="group inner list-group-item-text">' . strip_tags($Qlisting->value('products_description'), '<br>') . '…</p><div class="clearfix"></div>';
$extra_list_contents = NULL;
if ($lc_show_manu == true && $Qlisting->valueInt('manufacturers_id') != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MANUFACTURER . '</dt><dd><a href="' . OSCOM::link('index.php', 'manufacturers_id=' . $Qlisting->valueInt('manufacturers_id')) . '">' . $Qlisting->value('manufacturers_name') . '</a></dd>';
}
if ($lc_show_model == true && tep_not_null($Qlisting->value('products_model'))) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_MODEL . '</dt><dd>' . $Qlisting->value('products_model') . '</dd>';
}
if ($lc_show_qty == true && tep_get_products_stock($Qlisting->valueInt('products_id')) != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_QUANTITY . '</dt><dd>' . tep_get_products_stock($Qlisting->valueInt('products_id')) . '</dd>';
}
if ($lc_show_lbs == true && $Qlisting->valueDecimal('products_weight') != 0) {
$extra_list_contents .= '<dt>' . TABLE_HEADING_WEIGHT . '</dt><dd>' . $Qlisting->valueDecimal('products_weight') . '</dd>';
}
if (tep_not_null($extra_list_contents)) {
$prod_list_contents .= ' <dl class="dl-horizontal list-group-item-text">';
$prod_list_contents .= $extra_list_contents;
$prod_list_contents .= ' </dl>';
}
$prod_list_contents .= ' <div class="row">';
if (tep_not_null($Qlisting->valueDecimal('specials_new_products_price'))) {
$prod_list_contents .= ' <div class="col-xs-6"><div class="btn-group" role="group"><button type="button" class="btn btn-default"><del>' . $currencies->display_price($Qlisting->valueDecimal('products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '</del></span> <span class="productSpecialPrice">' . $currencies->display_price($Qlisting->valueDecimal('specials_new_products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '</button></div></div>';
} else {
$prod_list_contents .= ' <div class="col-xs-6"><div class="btn-group" role="group"><button type="button" class="btn btn-default">' . $currencies->display_price($Qlisting->valueDecimal('products_price'), tep_get_tax_rate($Qlisting->valueInt('products_tax_class_id'))) . '</button></div></div>';
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:product_listing.php
注:本文中的tep_get_products_stock函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论