Example #1
0
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;
}
Example #2
0
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="markProductOutOfStock">' . STOCK_MARK_PRODUCT_OUT_OF_STOCK . '</span>';
    }
    return $out_of_stock;
}
     $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>') . '&hellip;</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>&nbsp;&nbsp;<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>';
Example #4
0
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;
}
     }
     $prod_list_contents .= '      </h2>';
 }
 $prod_list_contents .= '      <p class="group inner list-group-item-text" itemprop="description">' . strip_tags($listing['products_description'], '<br>') . '&hellip;</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>&nbsp;&nbsp;<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>';
 }
 $prod_list_contents .= '      </h2>';
 $prod_list_contents .= '      <p class="group inner list-group-item-text">' . strip_tags($listing['products_description'], '<br>') . '&hellip;</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>&nbsp;&nbsp;<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>';
Example #7
0
        }
        $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>&nbsp;<span class="productManu"><a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a></span>&nbsp;</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>&nbsp;<span class="productModel">' . $listing['products_model'] . '</span>&nbsp;</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>&nbsp;<span class="productQty">' . tep_get_products_stock($listing['products_id']) . '</span>&nbsp;</li>';
        }
        // weight
        if ($lc_show_lbs == true && $listing['products_weight'] != 0) {
            $prod_list_contents .= '<li><span class="list-label">' . TABLE_HEADING_WEIGHT . '</span>&nbsp;<span class="productWeight">' . $listing['products_weight'] . '</span>&nbsp;</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 
 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>') . '&hellip;</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>&nbsp;&nbsp;<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>';
 }