$lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = $listing->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; 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 = ' <a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_price = CommerceProduct::getDisplayPriceFromHash($listing->fields['products_id']) . '<br />'; $lc_align = 'right'; $lc_text = ' ' . $lc_price . ' '; // 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 {
//$featured_res = $db->Execute($feature_query); $pid = $products_res->fields['products_id']; $sid = $specials_res->fields['products_id']; $attribute_product = $product_attribute_query_result->fields['products_id']; if ($fid == $pid) { $msg_product = "<div class='tag tag-orange' title=''><div class='text'>HOT</div></div>"; } else { if ($fid == $sid) { $msg_product = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>"; } else { $msg_product = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>"; } } //$products_description_hover = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION); //To Display Product Desc on hover //$products_description_hover = ltrim(substr($products_description_hover, 0, 115) . '...'); //Trims and Limits the desc on hover $products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION); //To Display Product Desc $products_description = ltrim(substr($products_description, 0, 350) . '..'); //Trims and Limits the desc //Productname Trim //$products_name_hover = $featured_products->fields['products_name']; //$products_name_hover = ltrim(substr($products_name_hover, 0, 50) . '...'); $products_name = $featured_products->fields['products_name']; //$products_name = ltrim(substr($products_name, 0, 30) . ''); if (!isset($productsInCategory[$featured_products->fields['products_id']])) { $productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']); } /*Wishlist/Compare Links*/ if (UN_MODULE_WISHLISTS_ENABLED) { $wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $featured_products->fields['products_id'] . '&action=wishlist_add_product'); } else {
/** * Method to add an item to the cart * * This method is usually called as the result of a user action. * As the method name applies it adds an item to the uses current cart * and if the customer is logged in, also adds to the database sored * cart. * * @param integer the product ID of the item to be added * @param decimal the quantity of the item to be added * @param array any attributes that are attache to the product * @param boolean whether to add the product to the notify list * @return void * @global object access to the db object * @todo ICW - documentation stub */ function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) { global $db, $messageStack; if ($this->display_debug_messages) { $messageStack->add_session('header', 'FUNCTION ' . __FUNCTION__, 'caution'); } if (!is_numeric($qty) || $qty < 0) { // adjust quantity when not a value $chk_link = '<a href="' . zen_href_link(zen_get_info_page($products_id), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($products_id)) . '&products_id=' . $products_id) . '">' . zen_get_products_name($products_id) . '</a>'; $messageStack->add_session('header', ERROR_CORRECTIONS_HEADING . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . $chk_link . ' ' . PRODUCTS_ORDER_QTY_TEXT . zen_output_string_protected($qty), 'caution'); $qty = 0; } $this->notify('NOTIFIER_CART_ADD_CART_START', array(), $products_id, $qty, $attributes, $notify); $products_id = zen_get_uprid($products_id, $attributes); if ($notify == true) { $_SESSION['new_products_id_in_cart'] = $products_id; } $qty = $this->adjust_quantity($qty, $products_id, 'shopping_cart'); if ($this->in_cart($products_id)) { $this->update_quantity($products_id, $qty, $attributes); } else { $this->contents[] = array($products_id); $this->contents[$products_id] = array('qty' => (double) $qty); // insert into database if (isset($_SESSION['customer_id'])) { $sql = "insert into " . TABLE_CUSTOMERS_BASKET . "\n (customers_id, products_id, customers_basket_quantity,\n customers_basket_date_added)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')"; $db->Execute($sql); } if (is_array($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { //CLR 020606 check if input was from text box. If so, store additional attribute information //CLR 020708 check if text input is blank, if so do not add to attribute lists //CLR 030228 add htmlspecialchars processing. This handles quotes and other special chars in the user input. $attr_value = NULL; $blank_value = FALSE; if (strstr($option, TEXT_PREFIX)) { if (trim($value) == NULL) { $blank_value = TRUE; } else { $option = substr($option, strlen(TEXT_PREFIX)); $attr_value = stripslashes($value); $value = PRODUCTS_OPTIONS_VALUES_TEXT_ID; // ----- // Check that the length of this TEXT attribute is less than or equal to its "Max Length" definition. While there // is some javascript on a product details' page that limits the number of characters entered, the customer // can choose to disable javascript entirely or circumvent that checking by performing a copy&paste action. // $check = $db->Execute("SELECT products_options_length FROM " . TABLE_PRODUCTS_OPTIONS . " WHERE products_options_id = " . (int) $option . " LIMIT 1"); if (!$check->EOF) { if (strlen($attr_value) > $check->fields['products_options_length']) { $attr_value = zen_trunc_string($attr_value, $check->fields['products_options_length'], ''); } $this->contents[$products_id]['attributes_values'][$option] = $attr_value; } } } if (!$blank_value) { if (is_array($value)) { reset($value); while (list($opt, $val) = each($value)) { $this->contents[$products_id]['attributes'][$option . '_chk' . $val] = $val; } } else { $this->contents[$products_id]['attributes'][$option] = $value; } // insert into database //CLR 020606 update db insert to include attribute value_text. This is needed for text attributes. //CLR 030228 add zen_db_input() processing if (isset($_SESSION['customer_id'])) { // if (zen_session_is_registered('customer_id')) zen_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('" . (int)$customer_id . "', '" . zen_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "', '" . zen_db_input($attr_value) . "')"); if (is_array($value)) { reset($value); while (list($opt, $val) = each($value)) { $products_options_sort_order = zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $opt); $sql = "insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "\n (customers_id, products_id, products_options_id, products_options_value_id, products_options_sort_order)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . (int) $option . '_chk' . (int) $val . "', '" . (int) $val . "', '" . $products_options_sort_order . "')"; $db->Execute($sql); } } else { if ($attr_value) { $attr_value = zen_db_input($attr_value); } $products_options_sort_order = zen_get_attributes_options_sort_order(zen_get_prid($products_id), $option, $value); $sql = "insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . "\n (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text, products_options_sort_order)\n values ('" . (int) $_SESSION['customer_id'] . "', '" . zen_db_input($products_id) . "', '" . (int) $option . "', '" . (int) $value . "', '" . $attr_value . "', '" . $products_options_sort_order . "')"; $db->Execute($sql); } } } } } } $this->cleanup(); // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure $this->cartID = $this->generate_cart_id(); $this->notify('NOTIFIER_CART_ADD_CART_END'); }
echo zen_image(DIR_WS_IMAGES . $product['products_image'], addslashes($product['products_name']), 180, 200, ' class="float_left"'); ?> </a> </dt> <dd class="explan_name"> <a href="<?php echo $product['products_url_link']; ?> " title="<?php echo $product['products_name']; ?> "> <?php echo zen_trunc_string($product['products_name'], 100, true); ?> </a> </dd> <dd style=" position:relative; margin-top:5px; margin-left:15px;"> <span class="sale_price"><?php echo 'Price:$' . $product['products_price']; ?> </span> </dd> </dl> </div> <?php }
$link = '<a href="' . zen_href_link(FILENAME_ALL_PRODUCTS, 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> '; } } $the_button = $link; $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } else { $link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $the_button = $link; $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } if (PRODUCT_ALL_LIST_DESCRIPTION > '0') { $disp_text = zen_get_products_description($products_all->fields['products_id']); $disp_text = zen_clean_html($disp_text); $display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_ALL_LIST_DESCRIPTION)); } else { $display_products_description = ''; } $get_discount_prod = mb_discount_product($products_all->fields['products_id']); if (mb_featured_product($products_all->fields['products_id']) == 1) { $ribbon = "<div class='tag tag-orange' title=''><div class='text'>HOT</div></div>"; } else { if (mb_special_product($products_all->fields['products_id']) == 1) { $ribbon = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>"; } else { if (mb_new_product($products_all->fields['products_id']) == 1) { $ribbon = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>"; } else { } }
<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2010 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_reviews_random.php 16044 2010-04-23 01:15:45Z drbyte $ */ $content = ""; $review_box_counter = 0; while (!$random_review_sidebox_product->EOF) { $review_box_counter++; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">'; $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating'])); $content .= '</div>'; $random_review_sidebox_product->MoveNextRandom(); }
$zc_col_count_description = 0; $lc_align = ''; $list_box_contents = array(); //echo $listing_split->sql_query; //print_r(explode(' ',zen_products_id_in_category($current_category_id))); if (zen_count_products_in_category($current_category_id) > 0) { $listing = $db->Execute($listing_split->sql_query); $row = 0; while (!$listing->EOF) { if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $list_box_contents[$row]['products_image'] = ''; } else { $list_box_contents[$row]['products_image'] = $listing->fields['products_image']; } $list_box_contents[$row]['products_name'] = $listing->fields['products_name']; $list_box_contents[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), 100); $list_box_contents[$row]['products_price'] = zen_get_products_base_price($listing->fields['products_id']); $list_box_contents[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($listing->fields['products_id']), zen_get_tax_rate($product_check->fields['products_tax_class_id'])); $list_box_contents[$row]['products_status'] = $listing->fields['products_status']; if ($listing->fields['product_is_always_free_shipping'] == 0) { $list_box_contents[$row]['product_is_always_free_shipping'] = ''; } else { $list_box_contents[$row]['product_is_always_free_shipping'] = '<span class="free_shipping"></span>'; } if ($listing->fields['product_is_free'] == 0) { $list_box_contents[$row]['product_is_free'] = ''; } else { $list_box_contents[$row]['product_is_free'] = '<span class="free"></span>'; } $list_box_contents[$row]['products_quantity_order_min'] = $listing->fields['products_quantity_order_min']; $list_box_contents[$row]['products_id'] = $listing->fields['products_id'];
?> " target="_blank"> <?php echo zen_trunc_string($blog_article['title'], 30, true); ?> </a> </b> </p> <p> <i> <a href="<?php echo $blog_article['blog_link']; ?> " target="_blank"> "<?php echo zen_trunc_string(zen_clean_html($blog_article['content']), 50, true); ?> " </a> </i> </p> <p class="red"> <?php echo zen_not_null($blog_article['author']) ? $blog_article['author'] : ''; ?> <?php echo $blog_article['date']; ?> </p> <?php
} break; } $list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } // add description and match alternating colors if (PRODUCT_LIST_DESCRIPTION > 0) { $rows++; if ($extra_row == 1) { $list_box_description = "productListing-data-description-even"; $extra_row = 0; } else { $list_box_description = "productListing-data-description-odd"; $extra_row = 1; } $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', 'text' => zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION)); } $listing->MoveNext(); } $error_categories == false; } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); $error_categories = true; } if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3)) { $show_top_submit_button = 'true'; } if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) { $show_bottom_submit_button = 'true';
<tr id="tr_goods_374846"> <td class="pay_gods_img"> <?php echo $thumbnail; ?> </td> <td> <div class="sopcarinfo"> <a href="<?php echo zen_href_link(zen_get_info_page($order->products[$i]['id']), 'products_id=' . $order->products[$i]['id']); ?> " target="_blank" style="color:#000000"> <?php echo zen_trunc_string($order->products[$i]['name'], 110, true); ?> <?php echo $stock_check[$i]; ?> </a> <?php // if there are attributes, loop thru them and display one per line if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) { echo '<div class="cartAttribsList">'; for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) { ?> <div class="cart_attr"> <b>·</b>
if ($frist_get_pid_db4->RecordCount() > 0) { while (!$frist_get_pid_db4->EOF) { $frist_get_pid4[] = $frist_get_pid_db4->fields['products_id']; $frist_get_pid_db4->MoveNext(); } $frist_pid_str4 = implode(',', $frist_get_pid4); $best_sellers_query = "select distinct p.products_id, pd.products_name, \n\t\t\t\t\t\t\t\t\t\tp.products_ordered,p.products_image \n\t\t\t\t\t\t\t\t from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n\t\t\t\t\t\t\t\t where p.products_status = '1'\n\t\t\t\t\t\t\t\t and p.products_ordered > 0\n\t\t\t\t\t\t\t\t and p.products_id = pd.products_id\n\t\t\t\t\t\t\t\t and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' \n\t\t\t\t\t\t\t\t and p.products_id in(" . $frist_pid_str4 . ")"; } if (!empty($best_sellers_query)) { $best_sellers = $db->Execute($best_sellers_query); } } if ($best_sellers->RecordCount() >= MIN_DISPLAY_BESTSELLERS) { $title = ''; $box_id = 'bestsellers'; $rows = 0; while (!$best_sellers->EOF) { $global_id_excluded[] = $best_sellers->fields['products_id']; $rows++; $bestsellers_list[$rows]['id'] = $best_sellers->fields['products_id']; $bestsellers_list[$rows]['name'] = zen_trunc_string($best_sellers->fields['products_name'], 30, true); $bestsellers_list[$rows]['image'] = $best_sellers->fields['products_image']; $bestsellers_list[$rows]['price'] = zen_get_products_display_price($best_sellers->fields['products_id']); $best_sellers->MoveNext(); } $title_link = false; require $template->get_template_dir('tpl_product_info_best_sellers.php', DIR_WS_TEMPLATE, $current_page_base, 'sideboxes') . '/tpl_product_info_best_sellers.php'; $title = BOX_HEADING_BESTSELLERS; require $template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base, 'common') . '/' . $column_box_default; } }
for ($i = 1; $i <= sizeof($products_accessories); $i++) { ?> <li> <a href="<?php echo zen_href_link(zen_get_info_page($products_accessories[$i]['id']), 'products_id=' . $products_accessories[$i]['id']); ?> "> <?php echo zen_image(DIR_WS_IMAGES . $products_accessories[$i]['image'], addslashes($products_accessories[$i]['name']), 48, 33); ?> </a> <p> <a href="<?php echo zen_href_link(zen_get_info_page($products_accessories[$i]['id']), 'products_id=' . $products_accessories[$i]['id']); ?> "> <?php echo zen_trunc_string($products_accessories[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE); ?> </a> </p> </li> <?php } ?> </ul> </div> <?php }
?> <div class="a_z_con"> <ul class="a_z_grid_left"> <?php foreach ($products_tags as $pt) { ?> <li> <a href="<?php echo $pt['product_link']; ?> " title="<?php echo $pt['product_name']; ?> "> <?php echo zen_trunc_string($pt['product_name'], 50); ?> </a> </li> <?php } ?> </ul> </div> <?php } else { ?> <div class="a_z_con">No products start from <?php echo $_GET['tag']; ?> </div>
$category_displayed = $faqs_all->fields['faq_categories_name']; echo '<h3>' . $category_displayed . '</h3>'; } echo '<div class="margin_t">'; if (FAQ_ALL_LIST_NAME != '0') { $display_faqs_name = '<a class="u" href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . $faqs_all->fields['faqs_name'] . '</a>' . str_repeat('<br clear="all" />', substr(FAQ_ALL_LIST_NAME, 3, 1)); } else { $display_faqs_name = ''; } $link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>'; $the_button = $link; $faqs_link = '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '">' . MORE_INFO_TEXT . '</a>'; if (FAQ_ALL_LIST_DESCRIPTION != '0') { $disp_text = zen_get_faqs_description($faqs_all->fields['faqs_id']); $disp_text = zen_clean_html($disp_text); $display_faqs_description = stripslashes(zen_trunc_string($disp_text, 150, '<a href="' . zen_href_link(zen_get_info_faq_page($faqs_all->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $faqs_all->fields['faqs_id']) . '"> ' . MORE_INFO_TEXT . '</a>')); } else { $display_faqs_description = ''; } echo '<h4 class="margin_t bg_help">' . $display_faqs_name . '</h4>'; if (FAQ_ALL_LIST_DESCRIPTION != 0 && $current_faq_category_id != 0) { echo '<ul>' . $display_faqs_description . '</ul>'; } echo '</div>'; $faqs_all->MoveNext(); } } else { echo '<div class="error_box">' . TEXT_NO_ALL_FAQS . '</div>'; } ?>
function convert_product_result($fields) { $fields['path_image'] = self::get_product_path_image($fields); $fields['name'] = $fields['products_name']; $fields['url'] = zen_href_link(zen_get_info_page($fields['products_id']), 'products_id=' . $fields['products_id'] . '&categories_id=' . $this->search_params['categories_id']); $fields['description'] = zen_trunc_string(zen_clean_html(stripslashes($fields['products_description']), PRODUCT_LIST_DESCRIPTION)); $fields['model'] = $fields['products_model']; $fields['quantity'] = $fields['products_quantity']; $fields['date_added'] = zen_date_long($fields['products_date_added']); $fields['price'] = $fields['products_price']; #FIXME $fields['final_price'] = zen_get_products_display_price($fields['products_id']); $fields['cart_button'] = self::get_product_cart_button($fields); $categories = self::get_product_categories($fields['products_id']); foreach ($categories as $category_id) { $fields['categories_path'][] = self::get_categories_path($category_id, self::get_super_products_list_link('results')); } $fields['always_free_shipping'] = $fields['product_is_always_free_shipping']; return $fields; }
<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_same_price_products.php 2982 2010-04-08 00:06:41Z john $ */ $content = ''; $content .= '<div class="gleichem">' . "\n"; $content .= '<h6>' . BOX_HEADING_SAME_PRICE . '</h6> '; $content .= '<ul>'; foreach ($sp_products as $product) { $content .= '<li> <a href="' . $product['product_url_link'] . '">' . zen_image(DIR_WS_IMAGES . $product['product_image'], $product['product_name'], 50, 50, ' class="float_left"') . ' </a> '; $content .= '<p><a href="' . $product['product_url_link'] . '"> ' . zen_trunc_string($product['product_name'], 40, BEST_SELLERS_TRUNCATE_MORE) . ' </a> <br/>'; $content .= '<span>' . $currencies->display_price($product['product_price']) . '</span>'; $content .= '</p></li>'; } $content .= '</ul>' . "\n"; $content .= '</div>' . "\n"; $content .= '<div class="clear"></div>';
$rows = 0; $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; $sese_icons = BootstrapUtils::sese_product_icons($template, $current_page_base); while (!$listing->EOF) { $rows++; $cur_row = sizeof($list_box_contents) - 1; $product_link = BootstrapProductListing::product_link($listing); $product_image = "<a href='{$product_link}'>" . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], 0, 0, 'class="img-responsive img-center listingProductImage"') . '</a>'; for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) { $lc_class = $lc_text = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_NAME': $lc_class = 'product-name'; $icons = BootstrapProductListing::product_icon_html($sese_icons, $listing); $product_description = zen_trunc_string(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION); $lc_text = "<h4 class='itemTitle'><a href='{$product_link}'><b>" . "{$listing->fields['products_name']}</b></a>{$icons}</h4>" . "<div class='hidden-xs listingDescription'>{$product_description}</div>\n" . "<div class='visible-xs'>{$product_image}</div>\n"; break; case 'PRODUCT_LIST_PRICE': $lc_price = "<div class='text-center product-price'><b>" . zen_get_products_display_price($listing->fields['products_id']) . "</b></div>\n"; $lc_text = $lc_price; $the_button = BootstrapProductListing::product_cart_button($listing, $product_link); $products_link = "<a href='{$product_link}'>" . MORE_INFO_TEXT . '</a>'; $buy_now_button = zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= BootstrapUtils::clean_buy_now_button($buy_now_button, $product_link); $has_free_shipping = zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') && zen_get_product_is_always_free_shipping($listing->fields['products_id']); if ($has_free_shipping) { $lc_text .= TEXT_PRODUCT_FREE_SHIPPING_ICON . "<br />"; } if (isset($listing->fields['products_model'])) { $lc_text .= "<div class='text-center'><small class='item-number'><i>Item # {$listing->fields['products_model']}" . "</i></small></div>";
<td width="7%" bgcolor="#FFFFFF"> <a href="<?php echo $product['linkProductsImage']; ?> " target="_blank" style=" color:#000000"><?php echo $product['productsImage']; ?> </a> </td> <td bgcolor="#FFFFFF"> <a href="<?php echo $product['linkProductsName']; ?> " target="_blank" style=" color:#000000"> <?php echo zen_trunc_string($product['productsName'], 50, true); ?> </a> <?php echo $product['attributeHiddenField']; if (isset($product['attributes']) && is_array($product['attributes'])) { ?> <div class="cartAttribsList"> <?php reset($product['attributes']); foreach ($product['attributes'] as $option => $value) { ?> <div class="cart_attr"> <b>·</b><?php echo $value['products_options_name'] . TEXT_OPTION_DIVIDER . nl2br($value['products_options_values_name']);
* @copyright Portions Copyright 2003 osCommerce */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $show_submit = zen_run_normal(); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); $zco_notifier->notify('NOTIFY_MODULE_PRODUCT_LISTING_RESULTCOUNT', $listing_split->number_of_rows); $how_many = 0; $tpl_products = array('title' => '', 'products' => array()); if ($listing_split->number_of_rows > 0) { $listing = $db->Execute($listing_split->sql_query, false, true, CACHE_TIMELIFT); while (!$listing->EOF) { $the_categories_name_query = "select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id= '" . $listing->fields['master_categories_id'] . "' and language_id= '" . $_SESSION['languages_id'] . "'"; $the_categories_name = $db->Execute($the_categories_name_query, null, true, CACHE_TIMELIFT); $tpl_products['products'][$listing->fields['products_id']] = array('name' => $listing->fields['products_name'], 'image' => $listing->fields['products_image'], 'quantity' => $listing->fields['products_quantity'], 'weight' => $listing->fields['products_weight'], 'type' => $listing->fields['products_type'], 'categories_id' => $listing->fields['master_categories_id'], 'categories_name' => $the_categories_name->fields['categories_name'], 'categories_href' => zen_href_link(FILENAME_DEFAULT, 'cPath=' . $listing->fields['master_categories_id']), 'manufacturers_id' => $listing->fields['manufacturers_id'], 'products_price' => $listing->fields['products_price'], 'tax_class_id' => $listing->fields['products_tax_class_id'], 'description' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION), 'content' => $listing->fields['products_description'], 'specials_price' => $listing->fields['specials_new_products_price'], 'final_price' => $listing->fields['final_price'], 'sort_order' => $listing->fields['products_sort_order'], 'is_call' => $listing->fields['product_is_call'], 'is_always_free_shipping' => $listing->fields['product_is_always_free_shipping'], 'qty_box_status' => $listing->fields['products_qty_box_status'], 'href' => zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']), 'display_price' => zen_get_products_display_price($listing->fields['products_id']), 'is_free' => get_product_is_free($listing->fields['products_id']), 'display_normal_price' => get_normal_price($listing->fields['products_id']), 'display_special_price' => get_special_price($listing->fields['products_id']), 'display_sale_price' => get_sale_discount_price($listing->fields['products_id'])); if (PRODUCT_LIST_MANUFACTURER != 0) { $tpl_products['products'][$listing->fields['products_id']]['show_manufacturer'] = true; $tpl_products['products'][$listing->fields['products_id']]['manufacturers_name'] = $listing->fields['manufacturers_name']; $tpl_products['products'][$listing->fields['products_id']]['manufacturers_href'] = zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']); } $listing->MoveNext(); } $error_categories = false; } else { $tpl_products = array('title' => '', 'products' => array()); $error_categories = true; } $multiple_buy = false; if ($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0 and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3)) { $show_top_submit_button = true;
$pname_like_str=' and ('.implode(' or ',$pname_like_arr).' ) '; }else{ $pname_like_str=' and pd.products_name like "'.trim($_GET['tag']).'%" '; }*/ $pname_like_str = ' and pd.products_name like "' . trim($_GET['tag']) . '%" '; $products_tag_sql = 'select distinct pd.products_name,p.products_id from ' . TABLE_PRODUCTS . ' p, ' . TABLE_PRODUCTS_DESCRIPTION . ' pd, ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c, ' . TABLE_CATEGORIES . ' c where p.products_id=pd.products_id and p.products_id=p2c.products_id and p2c.categories_id=c.categories_id and p.products_status=1 and c.categories_status=1 and pd.language_id=' . (int) $_SESSION['languages_id'] . $pname_like_str . ' order by pd.products_name desc '; $products_tag_db = $db->Execute($products_tag_sql); $products_tags = array(); if ($products_tag_db->RecordCount() > 0) { while (!$products_tag_db->EOF) { $pname = zen_trunc_string($products_tag_db->fields['products_name'], 16, true); $tid = $products_tag_db->fields['products_id']; $plink = zen_href_link(zen_get_info_page($tid), 'products_id=' . $tid); $products_tags[] = array('product_name' => $pname, 'product_link' => $plink); $products_tag_db->MoveNext(); } } } else { zen_redirect(zen_href_link(FILENAME_DEFAULT)); }
<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n"; $content .= '<div class="wrapper">' . "\n" . '<div class="sideBoxContentItem">' . "\n"; for ($i = 1; $i <= sizeof($bestsellers_list); $i++) { $bestsellers_name = $bestsellers_list[$i]['name']; //$bestsellers_name=ltrim(substr($bestsellers_name, 0, 20)); $bestsellers_list_price = zen_get_products_display_price($bestsellers_list[$i]['id']); $content .= '<div class="sidebox_content"><div class="product_sideboximage">' . zen_image(DIR_WS_IMAGES . $bestsellers_list[$i]['products_image'], $bestsellers_list[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</div>'; $content .= '<div class="product_sideboxname"><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_name, BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a>'; $content .= '<div class="sidebox_price">' . $bestsellers_list_price . '</div></div></div>'; } $content .= '</div>' . "\n"; $content .= '</div>'; $content .= '</div>';
$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> '; } } $the_button = $link; $products_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>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } else { $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>'; $the_button = $link; $products_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>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } if (PRODUCT_ALL_LIST_DESCRIPTION != '0') { $disp_text = zen_get_products_description($products_all->fields['products_id']); $disp_text = zen_clean_html($disp_text); $display_products_description = stripslashes(zen_trunc_string($disp_text, 150, '<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 { $display_products_description = ''; } ?> <tr> <td width="<?php echo IMAGE_PRODUCT_ALL_LISTING_WIDTH + 10; ?> " valign="top" class="main" align="center"> <?php $disp_sort_order = $db->Execute(zen_get_sql_product_display($group_id, 1)); while (!$disp_sort_order->EOF) { if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_LIST_IMAGE') { echo $display_products_image; }
<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_best_sellers.php 2982 2006-02-07 07:56:41Z birdbrain $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n"; $content .= '<div class="wrapper">' . "\n" . '<ol>' . "\n"; for ($i = 1; $i <= sizeof($bestsellers_list); $i++) { $content .= '<li><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a></li>' . "\n"; } $content .= '</ol>' . "\n"; $content .= '</div>' . "\n"; $content .= '</div>';
$advanced_search->MoveNext(); $row++; } } $advanced_search_split2 = new splitPageResults($listing_sql2, isset($_GET['pagesize']) ? $_GET['pagesize'] : MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); $advanced_search2 = $db->Execute($advanced_search_split2->sql_query); if ($advanced_search2->RecordCount() > 0) { $row = 0; while (!$advanced_search2->EOF) { if ($advanced_search2->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $list_box_contents2[$row]['products_image'] = ''; } else { $list_box_contents2[$row]['products_image'] = $advanced_search2->fields['products_image']; } $list_box_contents2[$row]['products_name'] = $advanced_search2->fields['products_name']; $list_box_contents2[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($advanced_search2->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION); $list_box_contents2[$row]['products_price'] = zen_get_products_base_price($advanced_search2->fields['products_id']); $list_box_contents2[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($advanced_search2->fields['products_id']), zen_get_tax_rate($product_check->fields['products_tax_class_id'])); $list_box_contents2[$row]['products_status'] = $advanced_search2->fields['products_status']; if ($advanced_search2->fields['product_is_always_free_shipping'] == 0) { $list_box_contents2[$row]['product_is_always_free_shipping'] = ''; } else { $list_box_contents2[$row]['product_is_always_free_shipping'] = '<span class="free_shipping"></span>'; } $list_box_contents2[$row]['products_quantity_order_min'] = $advanced_search2->fields['products_quantity_order_min']; $list_box_contents2[$row]['products_id'] = $advanced_search2->fields['products_id']; $list_box_contents2[$row]['products_quantity'] = $advanced_search2->fields['products_quantity']; $list_box_contents2[$row]['products_price_retail'] = $currencies->display_price($advanced_search2->fields['products_price_retail'], zen_get_tax_rate($product_check->fields['products_tax_class_id'])); $list_box_contents2[$row]['products_price_sample'] = $currencies->display_price($advanced_search2->fields['products_price_sample'], zen_get_tax_rate($product_check->fields['products_tax_class_id'])); $list_box_contents2[$row]['product_is_wholesale'] = $advanced_search2->fields['product_is_wholesale']; $list_box_contents2[$row]['product_wholesale_min'] = $advanced_search2->fields['product_wholesale_min'];
<?php if ($_GET['faqs_id']) { ?> <tr class="centerboxheading"> <td colspan="2" class="centerboxheading"> <?php $display_faqs_name = '<a href="' . zen_href_link(zen_get_info_faq_page($listing->fields['faqs_id']), 'fcPath=' . $fcPath . '&faqs_id=' . $_GET['faqs_id']) . '"> ' . $current_faq_name . '</a>'; echo $display_faqs_name; ?> </td> </tr> <tr> <td colspan="2" class="plainbox-description"> <?php $display_faqs_description = stripslashes(zen_trunc_string($current_faq_description, 150, '<a href="' . zen_href_link(zen_get_info_faq_page($listing->fields['faqs_id']), 'faqs_id=' . $_GET['faqs_id']) . '"> ' . MORE_INFO_TEXT . '</a>')); echo $display_faqs_description; ?> </td> </tr> <?php } if ($listing_split->number_of_rows > 0 && (PREV_NEXT_FAQ_BAR_LOCATION == '2' || PREV_NEXT_FAQ_BAR_LOCATION == '3')) { ?> <tr> <td class="pageresults"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_FAQS); ?> </td> <td class="pageresults" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y')));
<?php /** * featured_products module - prepares content for display * * @package modules * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: featured_products.php 6424 2007-05-31 05:59:21Z ajeh $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $featured_products_query = "select distinct p.products_id, p.products_image,\n pd.products_name\n\t\t\t\t\t\t from (" . TABLE_FEATURED . " f\n\t\t\t\t\t\t left join " . TABLE_PRODUCTS . " p on f.products_id = p.products_id\n\t\t\t\t\t\t left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )\n\t\t\t\t\t\t where p.products_status = 1 \n\t\t\t\t\t\t\tand f.status = 1\n\t\t\t\t\t\t and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' \n\t\t\t\t\t\t\torder by p.products_ordered"; if ($featured_products_query != '') { $featured_products_db = $db->Execute($featured_products_query, MAX_DISPLAY_SEARCH_RESULTS_FEATURED); } $num_products_count = $featured_products_query == '' ? 0 : $featured_products_db->RecordCount(); // show only when 1 or more if ($num_products_count > 0) { while (!$featured_products_db->EOF) { $f_pid = $featured_products_db->fields['products_id']; $products_price = zen_get_products_display_price($f_pid); $featured_products[] = array('product_name' => zen_trunc_string($featured_products_db->fields['products_name'], 40, true), 'product_price' => $products_price, 'product_image' => $featured_products_db->fields['products_image'], 'product_url_link' => zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $f_pid)); $featured_products_db->MoveNext(); } $zc_show_featured = true; }
$list_box_contents[$rows] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = $listing->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } else { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': $lc_price = '<span class="table-price">' . zen_get_products_display_price($listing->fields['products_id']) . '</span><br />'; $lc_align = 'right'; $lc_text = $lc_price; // more info in place of buy now $lc_button = ''; if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') { $lc_button = '<span class="more-info"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></span>'; } 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> '; } } $the_button = $link; $products_link = '<span class="more-info"><a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></span>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } else { $link = '<span class="more-info"><a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></span>'; $the_button = $link; $products_link = '<span class="more-info"><a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></span>'; $display_products_button = zen_get_buy_now_button($products_all->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_all->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_BUY_NOW, 3, 1)); } if (PRODUCT_ALL_LIST_DESCRIPTION > '0') { $disp_text = zen_get_products_description($products_all->fields['products_id']); $disp_text = zen_clean_html($disp_text); $display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_ALL_LIST_DESCRIPTION, '...<br /><span class="more-info float-right"><a href="' . zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' . $products_all->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a></span>')); } else { $display_products_description = ''; } ?> <tr class="<?php echo (int) ($row_counter / 2) == $row_counter / 2 ? 'productListing-even' : 'productListing-odd'; ?> "> <td> <table class="table-product-attributes" border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo IMAGE_PRODUCT_ALL_LISTING_WIDTH + 10; ?> " valign="top" class="listing-img main" align="center">
$link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_NEW, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> '; } } $the_button = $link; $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1)); } else { $link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $the_button = $link; $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1)); } if (PRODUCT_NEW_LIST_DESCRIPTION > '0') { $disp_text = zen_get_products_description($products_new->fields['products_id']); $disp_text = zen_clean_html($disp_text); $display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_NEW_LIST_DESCRIPTION, '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>')); } else { $display_products_description = ''; } ?> <ul class="list_product clear"> <li class="relative"><?php echo $display_products_image; ?> </li> <li class="li_con"> <dl> <dt><?php echo $display_products_name; ?>
case $page_query_ez->fields['alt_url'] != '' and $page_query_ez->fields['page_open_new_window'] == '1': $page_query_list['altURL'] = substr($page_query_ez->fields['alt_url'], 0, 4) == 'http' ? $page_query_ez->fields['alt_url'] : ($page_query_ez->fields['alt_url'] == '' ? '' : zen_href_link($page_query_ez->fields['alt_url'], '', $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL', true, true, true)); break; // internal link same window // internal link same window case $page_query_ez->fields['alt_url'] != '' and $page_query_ez->fields['page_open_new_window'] == '0': $page_query_list['altURL'] = substr($page_query_ez->fields['alt_url'], 0, 4) == 'http' ? $page_query_ez->fields['alt_url'] : ($page_query_ez->fields['alt_url'] == '' ? '' : zen_href_link($page_query_ez->fields['alt_url'], '', $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL', true, true, true)); break; } // if altURL is specified, use it; otherwise, use EZPage ID to create link $page_query_list['link'] = $page_query_list['altURL'] == '' ? zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query_ez->fields['pages_id'] . ($page_query_ez->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query_ez->fields['toc_chapter'] : ''), $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL') : $page_query_list['altURL']; $page_query_list['link'] .= $page_query_ez->fields['page_open_new_window'] == '1' ? '" target="_blank' : ''; // En of get EZpage URL $lc_align = 'left'; $lc_text1 = '<a href="' . $page_query_list['link'] . '">' . $page_query_ez->fields['pages_title'] . '</a>'; $lc_text2 = '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes($page_query_ez->fields['pages_html_text']))) . '</div>'; $list_box_contents[$rows][1] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text1); $list_box_contents[$rows][2] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text2); $page_query_ez->MoveNext(); } } ?> <?php if ($listing_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) { ?> <div class="clearfix"> <div id="productsListingTopNumber" class="navSplitPagesResult pull-left"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_XX_OF_YY); ?> </div>