?>
          <tr>
            <td class="main" width="200" align="left" valign="top">&nbsp;</td>
            <td colspan="2" class="main"><?php 
        echo TEXT_PRODUCT_TO_VIEW;
        ?>
</td>
          </tr>
          <tr>
            <td class="main" width="200" align="center" valign="top">

<?php 
        // FIX HERE
        $display_priced_by_attributes = zen_get_products_price_is_priced_by_attributes($_GET['products_id']);
        echo $display_priced_by_attributes ? '<span class="alert alert-warning">' . TEXT_PRICED_BY_ATTRIBUTES . '</span>' . '<br />' : '';
        echo CommerceProduct::getDisplayPriceFromHash($_GET['products_id']) . '<br /><br />';
        echo zen_get_products_quantity_min_units_display($_GET['products_id'], $include_break = true);
        $not_for_cart = $gBitDb->Execute("select p.`products_id` from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCT_TYPES . " pt on p.`products_type`= pt.`type_id` where pt.`allow_add_to_cart` = 'N'");
        while (!$not_for_cart->EOF) {
            $not_for_cart_array[] = $not_for_cart->fields['products_id'];
            $not_for_cart->MoveNext();
        }
        ?>
            </td>
            <td class="attributes-even" align="center"><?php 
        echo zen_draw_products_pull_down('products_id', 'size="5"', $not_for_cart->fields, true, $_GET['products_id'], true, true);
        ?>
</td>
            <td class="main" align="center" valign="top">
              <?php 
        echo zen_image_submit('button_display.gif', IMAGE_DISPLAY);
     }
 } else {
     $display_products_quantity = '';
 }
 if (PRODUCT_ALL_LIST_DATE_ADDED != '0' and zen_get_show_product_switch($products_all->fields['products_id'], 'date_added')) {
     $display_products_date_added = TEXT_DATE_ADDED . ' ' . zen_date_long($products_all->fields['products_date_added']) . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_DATE_ADDED, 3, 1));
 } else {
     $display_products_date_added = '';
 }
 if (PRODUCT_ALL_LIST_MANUFACTURER != '0' and zen_get_show_product_switch($products_all->fields['products_id'], 'manufacturer')) {
     $display_products_manufacturers_name = $products_all->fields['manufacturers_name'] != '' ? TEXT_MANUFACTURER . ' ' . $products_all->fields['manufacturers_name'] . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_MANUFACTURER, 3, 1)) : '';
 } else {
     $display_products_manufacturers_name = '';
 }
 if (PRODUCT_ALL_LIST_PRICE != '0' and zen_get_products_allow_add_to_cart($products_all->fields['products_id']) == 'Y' and zen_check_show_prices() == 'true') {
     $products_price = CommerceProduct::getDisplayPriceFromHash($products_all->fields['products_id']);
     $display_products_price = TEXT_PRICE . ' ' . $products_price . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($products_all->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? zen_get_product_is_always_free_ship($products_all->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '' : '');
 } else {
     $display_products_price = '';
 }
 // more info in place of buy now
 if (PRODUCT_ALL_BUY_NOW != '0' and zen_get_products_allow_add_to_cart($products_all->fields['products_id']) == 'Y') {
     if (zen_has_product_attributes($products_all->fields['products_id'])) {
         $link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
     } else {
         //          $link= '<a href="' . zen_href_link(FILENAME_PRODUCTS_ALL, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_all->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
         if (PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART > 0) {
             //            $how_many++;
             $link = TEXT_PRODUCT_ALL_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $products_all->fields['products_id'] . "]\" value=0 size=\"4\">";
         } else {
             $link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_ALL, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_all->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>&nbsp;';
    $listHash['commissioned'] = TRUE;
}
$row = 0;
$col = 0;
$listBoxContents = '';
if (is_object($gBitProduct) && ($listedProducts = $gBitProduct->getList($listHash))) {
    // show only when 1 or more
    $num_products_count = count($listedProducts);
    if ($num_products_count < $columnCount) {
        $col_width = 100 / $num_products_count;
    } else {
        $col_width = 100 / $columnCount;
    }
    $_template->tpl_vars['listColWidth'] = new Smarty_variable($col_width);
    foreach (array_keys($listedProducts) as $productsId) {
        $products_price = CommerceProduct::getDisplayPriceFromHash($productsId);
        $listBoxContents[$row][$col] = $listedProducts[$productsId];
        $col++;
        if ($col > $columnCount - 1) {
            $col = 0;
            $row++;
        }
    }
    if (isset($new_products_category_id)) {
        $category_title = zen_get_categories_name((int) $new_products_category_id);
        $title = $title . ($category_title != '' ? ' - ' . $category_title : '');
    }
    $_template->tpl_vars['productListTitle'] = new Smarty_variable($title);
}
$_template->tpl_vars['listedProducts'] = new Smarty_variable($listedProducts);
$_template->tpl_vars['listBoxContents'] = new Smarty_variable($listBoxContents);
        $contents = array('form' => zen_draw_form_admin('products_downloads_edit', FILENAME_PRODUCTS_TO_CATEGORIES, ''));
        if ($productsId > 0) {
            $contents[] = array('text' => zen_image(DIR_WS_CATALOG_IMAGES . $product_to_copy->fields['products_image'], $product_to_copy->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
        }
        $contents[] = array('text' => '<b>' . TEXT_PRODUCTS_NAME . $product_to_copy->fields['products_name'] . '<br />' . TEXT_PRODUCTS_MODEL . $product_to_copy->fields['products_model'] . '</b>');
        $contents[] = array('text' => '<br />' . TEXT_SET_PRODUCTS_TO_CATEGORIES_LINKS . '<br />' . TEXT_PRODUCTS_ID . zen_draw_input_field('products_id', $productsId));
        $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . zen_href_link_admin(FILENAME_PRODUCTS_TO_CATEGORIES, 'products_id=' . $productsId) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>' . '</form>');
        break;
    default:
        $heading[] = array('text' => '<b>' . $product_to_copy->fields['products_id'] . ' ' . $product_to_copy->fields['products_name'] . '</b>');
        if ($productsId > 0) {
            $contents[] = array('text' => zen_image(DIR_WS_CATALOG_IMAGES . $product_to_copy->fields['products_image'], $product_to_copy->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
        }
        $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_NAME . $product_to_copy->fields['products_name']);
        $contents[] = array('text' => TEXT_PRODUCTS_MODEL . $product_to_copy->fields['products_model']);
        $contents[] = array('text' => TEXT_PRODUCTS_PRICE . CommerceProduct::getDisplayPriceFromHash($productsId));
        switch (true) {
            case $product_to_copy->fields['master_categories_id'] == 0 and $productsId > 0:
                $contents[] = array('text' => '<br /><span class="alert alert-warning">' . WARNING_MASTER_CATEGORIES_ID . '</span><br />&nbsp;');
                break;
            default:
                $contents[] = array('text' => '<form action="' . FILENAME_PRODUCTS_TO_CATEGORIES . '.php' . '?action=edit&products_id=' . $productsId . '" method="post">');
                $contents[] = array('align' => 'center', 'text' => '<input type="submit" value="' . BUTTON_NEW_PRODUCTS_TO_CATEGORIES . '"></form>');
                $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3') . '<br />&nbsp;');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_ATTRIBUTES_CONTROLLER, 'products_id=' . $productsId) . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '</a>&nbsp;&nbsp;' . '<a href="' . zen_href_link_admin(FILENAME_PRODUCTS_PRICE_MANAGER, '&products_id=' . $productsId) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '</a><br /><br />' . '<a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'cPath=' . zen_get_parent_category_id($productsId) . '&pID=' . $productsId . '&product_type=' . zen_get_products_type($productsId)) . '">' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '</a>&nbsp;&nbsp;' . '<a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_parent_category_id($productsId) . '&pID=' . $productsId . '&product_type=' . zen_get_products_type($productsId)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '</a>' . '<br />&nbsp;');
                break;
        }
        break;
}
if (zen_not_null($heading) && zen_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
Beispiel #5
0
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
global $gBitDb, $gBitProduct, $currencies;
require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
// test if box should display
$listHash['max_records'] = 1;
$listHash['sort_mode'] = 'random';
$listHash['specials'] = TRUE;
if ($specialsList = $gBitProduct->getList($listHash)) {
    $sideboxSpecial = current($specialsList);
    $sideboxSpecial['display_special_price'] = CommerceProduct::getDisplayPriceFromHash($sideboxSpecial['products_id']);
    $_template->tpl_vars['sideboxSpecial'] = new Smarty_variable($sideboxSpecial);
}
if (empty($moduleTitle)) {
    $_template->tpl_vars['moduleTitle'] = new Smarty_variable(tra('Specials'));
}
Beispiel #6
0
        default:
            if (is_object($sInfo)) {
                $heading[] = array('text' => '<b>' . $sInfo->products_name . '</b>');
                if ($sInfo->products_priced_by_attribute == '1') {
                    $specials_current_price = zen_get_products_base_price($sInfo->products_id);
                } else {
                    $specials_current_price = $sInfo->products_price;
                }
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link_admin(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_PRODUCTS_PRICE_MANAGER, 'action=edit&products_id=' . $sInfo->products_id) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '</a>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($sInfo->specials_date_added));
                $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($sInfo->specials_last_modified));
                $contents[] = array('align' => 'center', 'text' => '<br>' . zen_info_image($sInfo->products_image, $sInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
                $contents[] = array('text' => '<br>' . TEXT_INFO_ORIGINAL_PRICE . ' ' . $currencies->format($specials_current_price));
                $contents[] = array('text' => '' . TEXT_INFO_NEW_PRICE . ' ' . $currencies->format($sInfo->specials_new_products_price));
                $contents[] = array('text' => '' . TEXT_INFO_DISPLAY_PRICE . ' ' . CommerceProduct::getDisplayPriceFromHash($sInfo->products_id));
                $contents[] = array('text' => '<br>' . TEXT_INFO_AVAILABLE_DATE . ' <b>' . (($specials->fields['specials_date_available'] != '0001-01-01' and $specials->fields['specials_date_available'] != '') ? zen_date_short($specials->fields['specials_date_available']) : TEXT_NONE) . '</b>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_EXPIRES_DATE . ' <b>' . (($specials->fields['expires_date'] != '0001-01-01' and $specials->fields['expires_date'] != '') ? zen_date_short($specials->fields['expires_date']) : TEXT_NONE) . '</b>');
                $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . zen_date_short($sInfo->date_status_change));
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link_admin(FILENAME_CATEGORIES, '&action=new_product' . '&cPath=' . zen_get_product_path($sInfo->products_id, 'override') . '&pID=' . $sInfo->products_id . '&product_type=' . zen_get_products_type($sInfo->products_id)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '<br />' . TEXT_PRODUCT_EDIT . '</a>');
            }
            break;
    }
    if (zen_not_null($heading) && zen_not_null($contents)) {
        echo '            <td width="25%" valign="top">' . "\n";
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
    }
}
?>
Beispiel #7
0
// |zen-cart Open Source E-commerce										  |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers							  |
// |																	  |
// | http://www.zen-cart.com/index.php									  |
// |																	  |
// | Portions Copyright (c) 2003 osCommerce								  |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,		  |
// | that is bundled with this package in the file LICENSE, and is		  |
// | available through the world-wide-web at the following url:			  |
// | http://www.zen-cart.com/license/2_0.txt.							  |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to		  |
// | license@zen-cart.com so we can mail you a copy immediately.		  |
// +----------------------------------------------------------------------+
// $Id$
//
global $gBitDb, $gBitProduct, $currencies;
require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
$listHash['freshness'] = SHOW_NEW_PRODUCTS_LIMIT;
$listHash['max_records'] = 1;
$listHash['sort_mode'] = 'products_date_added_desc';
if (empty($moduleTitle)) {
    $_template->tpl_vars['moduleTitle'] = new Smarty_variable(tra('New Products'));
}
if ($productList = $gBitProduct->getList($listHash)) {
    $newProduct = current($productList);
    $whats_new_price = CommerceProduct::getDisplayPriceFromHash($newProduct['products_id']);
    $_template->tpl_vars['newProduct'] = new Smarty_variable($newProduct);
}
Beispiel #8
0
    $listHash['category_id'] = $new_products_category_id;
}
$new_products = $gBitProduct->getList($listHash);
$row = 0;
$col = 0;
$listBoxContents = '';
$num_products_count = count($new_products);
// show only when 1 or more
if ($num_products_count > 0) {
    if ($num_products_count < SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS) {
        $col_width = 100 / $num_products_count;
    } else {
        $col_width = 100 / SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS;
    }
    foreach ($new_products as $product) {
        $products_price = CommerceProduct::getDisplayPriceFromHash($product['products_id']);
        $listBoxContents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="' . $col_width . '%" valign="top"', 'text' => '<a href="' . CommerceProduct::getDisplayUrlFromHash($product) . '">' . zen_image($product['products_image_url'], $product['products_name']) . '</a><br /><a href="' . CommerceProduct::getDisplayUrlFromHash($product) . '">' . $product['products_name'] . '</a><br />' . $products_price);
        $col++;
        if ($col > SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS - 1) {
            $col = 0;
            $row++;
        }
    }
    if ($num_products_count) {
        if (isset($new_products_category_id)) {
            $category_title = zen_get_categories_name((int) $new_products_category_id);
            $title = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) . ($category_title != '' ? ' - ' . $category_title : '');
        } else {
            $title = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'));
        }
        $gBitSmarty->assign('listBoxContents', $listBoxContents);
Beispiel #9
0
     if (isset($_GET['manufacturers_id'])) {
         $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
     } else {
         $lc_text = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
     }
     // add description
     if (PRODUCT_LIST_DESCRIPTION > 0) {
         $lc_text .= '<div>' . zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION) . '</div>';
     }
     break;
 case 'PRODUCT_LIST_MANUFACTURER':
     $lc_align = '';
     $lc_text = '&nbsp;<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>&nbsp;';
     break;
 case 'PRODUCT_LIST_PRICE':
     $lc_price = CommerceProduct::getDisplayPriceFromHash($listing->fields['products_id']) . '<br />';
     $lc_align = 'right';
     $lc_text = '&nbsp;' . $lc_price . '&nbsp;';
     // more info in place of buy now
     $lc_button = '';
     if ($listing->fields['products_priced_by_attribute'] || PRODUCT_LIST_PRICE_BUY_NOW == '0' || zen_has_product_attributes($listing->fields['products_id'])) {
         $lc_button = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
     } else {
         if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) {
             $how_many++;
             $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=0 size=\"4\">";
         } else {
             $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>&nbsp;';
         }
     }
     $the_button = $lc_button;
Beispiel #10
0
    ?>
</td>
    </tr></table></td>
  </tr>
<?php 
}
// split page
?>
  <tr>
<?php 
$row = 0;
$offset = MAX_DISPLAY_SPECIAL_PRODUCTS * (!empty($_REQUEST['page']) ? $_REQUEST['page'] - 1 : 0);
$specials = $gBitDb->query($specials_split->sql_query, NULL, MAX_DISPLAY_SPECIAL_PRODUCTS, $offset);
while (!$specials->EOF) {
    $row++;
    echo '            <td valign="bottom" align="center" width="33%" class="smallText"><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'products_id=' . $specials->fields['products_id']) . '">' . zen_image(CommerceProduct::getImageUrlFromHash($specials->fields['products_id'], 'avatar'), $specials->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . zen_href_link(zen_get_info_page($specials->fields['products_id']), 'products_id=' . $specials->fields['products_id']) . '">' . $specials->fields['products_name'] . '</a><br />' . CommerceProduct::getDisplayPriceFromHash($specials->fields['products_id']) . '</td>' . "\n";
    if ($row / 3 == floor($row / 3)) {
        ?>
  </tr>
  <tr>
<?php 
    }
    $specials->MoveNext();
}
?>
   </tr>
<?php 
if ($specials_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
  <tr>
    <td colspan="3"><table width="100%"><tr>
Beispiel #11
0
    $reviews_counter = $gBitDb->getOne($reviews_count_query);
    // if review must be approved or disabled do not show review
    $review_status = " and r.`status` = '1'";
    $review_info_check_query = "select count(*) as `total`\n                           from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd\n                           where r.`reviews_id` = '" . (int) $_GET['reviews_id'] . "'\n                           and r.`products_id` = '" . (int) $_GET['products_id'] . "'\n                           and r.`reviews_id` = rd.`reviews_id`\n                           and rd.`languages_id` = '" . (int) $_SESSION['languages_id'] . "'" . $review_status;
    $review_info_check = $gBitDb->Execute($review_info_check_query);
    if ($review_info_check->fields['total'] < 1) {
        zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('reviews_id'))));
    }
} else {
    zen_redirect(zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params(array('reviews_id'))));
}
$sql = "update " . TABLE_REVIEWS . "\n          set reviews_read = reviews_read+1\n          where reviews_id = '" . (int) $_GET['reviews_id'] . "'";
$gBitDb->Execute($sql);
$review_info_query = "select rd.reviews_text, r.reviews_rating, r.`reviews_id`, r.customers_name,\n                          r.`date_added`, r.reviews_read, p.`products_id`, p.`products_price`,\n                          p.`products_tax_class_id`, p.`products_image`, p.`products_model`, pd.`products_name`\n                   from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                   where r.`reviews_id` = '" . (int) $_GET['reviews_id'] . "'\n                   and r.`reviews_id` = rd.`reviews_id`\n                   and rd.`languages_id` = '" . (int) $_SESSION['languages_id'] . "'\n                   and r.`products_id` = p.`products_id`\n                   and p.`products_status` = '1'\n                   and p.`products_id` = pd.`products_id`\n                   and pd.`language_id` = '" . (int) $_SESSION['languages_id'] . "'" . $review_status;
$review_info = $gBitDb->Execute($review_info_query);
$products_price = CommerceProduct::getDisplayPriceFromHash($review_info->fields['products_id']);
$products_name = $review_info->fields['products_name'];
if ($review_info->fields['products_model'] != '') {
    $products_model = '<br /><span class="smallText">[' . $review_info->fields['products_model'] . ']</span>';
} else {
    $products_model = '';
}
// set image
//  $products_image = $review_info->fields['products_image'];
if ($review_info->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
    $products_image = PRODUCTS_IMAGE_NO_IMAGE;
} else {
    $products_image = $review_info->fields['products_image'];
}
require_once DIR_FS_MODULES . 'require_languages.php';
$breadcrumb->add(NAVBAR_TITLE);
     }
 } else {
     $display_products_quantity = '';
 }
 if (PRODUCT_FEATURED_LIST_DATE_ADDED != '0' and zen_get_show_product_switch($featured_products->fields['products_id'], 'date_added')) {
     $display_products_date_added = TEXT_DATE_ADDED . ' ' . zen_date_long($featured_products->fields['products_date_added']) . str_repeat('<br clear="all" />', substr(PRODUCT_FEATURED_LIST_DATE_ADDED, 3, 1));
 } else {
     $display_products_date_added = '';
 }
 if (PRODUCT_FEATURED_LIST_MANUFACTURER != '0' and zen_get_show_product_switch($featured_products->fields['products_id'], 'manufacturer')) {
     $display_products_manufacturers_name = $featured_products->fields['manufacturers_name'] != '' ? TEXT_MANUFACTURER . ' ' . $featured_products->fields['manufacturers_name'] . str_repeat('<br clear="all" />', substr(PRODUCT_FEATURED_LIST_MANUFACTURER, 3, 1)) : '';
 } else {
     $display_products_manufacturers_name = '';
 }
 if (PRODUCT_FEATURED_LIST_PRICE != '0' and zen_get_products_allow_add_to_cart($featured_products->fields['products_id']) == 'Y' and zen_check_show_prices() == 'true') {
     $products_price = CommerceProduct::getDisplayPriceFromHash($featured_products->fields['products_id']);
     $display_products_price = TEXT_PRICE . ' ' . $products_price . str_repeat('<br clear="all" />', substr(PRODUCT_FEATURED_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($featured_products->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? zen_get_product_is_always_free_ship($featured_products->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '' : '');
 } else {
     $display_products_price = '';
 }
 // more info in place of buy now
 if (PRODUCT_FEATURED_BUY_NOW != '0' and zen_get_products_allow_add_to_cart($featured_products->fields['products_id']) == 'Y') {
     if (zen_has_product_attributes($featured_products->fields['products_id'])) {
         $link = '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
     } else {
         //          $link= '<a href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
         if (PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART > 0) {
             //            $how_many++;
             $link = TEXT_PRODUCT_FEATURED_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $featured_products->fields['products_id'] . "]\" value=0 size=\"4\">";
         } else {
             $link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_FEATURED, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a>&nbsp;';
Beispiel #13
0
        $pInfo->products_name = zen_db_prepare_input($products_name[$languages[$i]['id']]);
        $pInfo->products_description = zen_db_prepare_input($products_description[$languages[$i]['id']]);
        $pInfo->products_url = zen_db_prepare_input($products_url[$languages[$i]['id']]);
    }
    $specials_price = zen_get_products_special_price($pID);
    ?>
    <table>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
    echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name;
    ?>
</td>
            <td class="pageHeading" align="right"><?php 
    echo $currencies->format($pInfo->products_price) . ($pInfo->products_virtual == 1 ? '<span class="errorText">' . '<br />' . TEXT_VIRTUAL_PREVIEW . '</span>' : '') . ($pInfo->product_is_always_free_ship == 1 ? '<span class="errorText">' . '<br />' . TEXT_FREE_SHIPPING_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_PRICED_BY_ATTRIBUTES_PREVIEW . '</span>' : '') . ($pInfo->product_is_free == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_FREE_PREVIEW . '</span>' : '') . ($pInfo->product_is_call == 1 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_IS_CALL_PREVIEW . '</span>' : '') . ($pInfo->products_qty_box_status == 0 ? '<span class="errorText">' . '<br />' . TEXT_PRODUCTS_QTY_BOX_STATUS_PREVIEW . '</span>' : '') . ($pInfo->products_priced_by_attribute == 1 ? '<br />' . CommerceProduct::getDisplayPriceFromHash($_GET['pID']) : '');
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td class="main">
          <?php 
    //auto replace with defined missing image
Beispiel #14
0
// |zen-cart Open Source E-commerce                                       |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers                           |
// |                                                                      |
// | http://www.zen-cart.com/index.php                                    |
// |                                                                      |
// | Portions Copyright (c) 2003 osCommerce                               |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at the following url:           |
// | http://www.zen-cart.com/license/2_0.txt.                             |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to       |
// | license@zen-cart.com so we can mail you a copy immediately.          |
// +----------------------------------------------------------------------+
// $Id$
//
global $gBitDb, $gCommerceSystem, $gBitProduct, $currencies;
if (empty($gCommerceSystem)) {
    require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
}
$listHash['max_records'] = 1;
// ? MAX_RANDOM_SELECT_FEATURED_PRODUCTS;
$listHash['sort_mode'] = 'random';
$listHash['featured'] = TRUE;
if ($sideboxFeature = $gBitProduct->getList($listHash)) {
    $sideboxFeature = current($sideboxFeature);
    $whats_new_price = CommerceProduct::getDisplayPriceFromHash($sideboxFeature['products_id']);
    $_template->tpl_vars['sideboxFeature'] = new Smarty_variable($sideboxFeature);
}