Jump to content

Search the Community

Showing results for tags 'product listing'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback
  • Club osC's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website

Found 6 results

  1. Hi there, I have BS Frozen version install with Email for quote, modified the code, all seems doing what I like to show, except the button on index page, code related to catalog/includes/modules/product_listing.php and catalog/includes/modules/new_products.php My goal is to change the new product of the month BUY button next to View button, if the product price is 0, then QUOTE button replace with BUY button. I have modified two files that will change buttons from BUY to QUOTE, my problem here is that if will not filter if price is < 0, it is just simplely change all button BUY to QUOTE. However it does change conditionally when click on what's new infobox page. Please find the images for your reference. Please compare the product KEYBOARD ==================== error without condition < 0 applied ==================== ==================== condition < 0 applied on What's New page ==================== there are two files related to this change: --------------------------------------------------------------------------------------------------------------------------------------------- catalog/includes/modules/content/index/cm_in_new_products.php --------------------------------------------------------------------------------------------------------------------------------------------- <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ class cm_i_new_products { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_CONTENT_NEW_PRODUCTS_TITLE; $this->description = MODULE_CONTENT_NEW_PRODUCTS_DESCRIPTION; $this->description .= '<div class="secWarning">' . MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION . '</div>'; if ( defined('MODULE_CONTENT_NEW_PRODUCTS_STATUS') ) { $this->sort_order = MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER; $this->enabled = (MODULE_CONTENT_NEW_PRODUCTS_STATUS == 'True'); } } function execute() { global $oscTemplate, $new_products_category_id, $languages_id, $currencies, $PHP_SELF, $currency; $content_width = MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH; $product_width = MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH; if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special from products p left join specials s on p.products_id = s.products_id, products_description pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_id desc limit " . (int)MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special from products p left join specials s on p.products_id = s.products_id, products_description pd, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_id desc limit " . (int)MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY); } $num_new_products = tep_db_num_rows($new_products_query); if ($num_new_products > 0) { //BOF 8522 Email For Quote v1.2 if (is_email_for_quote($new_products['products_price'])) { $price_display = show_email_for_quote($new_products); } else { $price_display = $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); } //EOF 8522 Email For Quote v1.2 ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_NEW_PRODUCTS_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable New Products Module', 'MODULE_CONTENT_NEW_PRODUCTS_STATUS', 'True', 'Do you want to enable this module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH', '12', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum Display', 'MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY', '6', 'Maximum Number of products that should show in this module?', '6', '3', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Product Width', 'MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH', '3', 'What width container should each product be shown in? (12 = full width, 6 = half width).', '6', '4', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER', '300', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_NEW_PRODUCTS_STATUS', 'MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH', 'MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY', 'MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH', 'MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER'); } } ?> --------------------------------------------------------------------------------------------------------------------------------------------- catalog/includes/modules/content/index/templates/tpl_cm_i_new_products.php --------------------------------------------------------------------------------------------------------------------------------------------- <div class="col-sm-<?php echo $content_width; ?> cm-i-new-products"> <h3 class="h3"><?php echo sprintf(MODULE_CONTENT_NEW_PRODUCTS_HEADING, strftime('%B')); ?></h3> <div class="row list-group" itemscope itemtype="http://schema.org/ItemList"> <meta itemprop="numberOfItems" content="<?php echo (int)$num_new_products; ?>" /> <?php //BOF 8522 Email For Quote v1.2 if (is_email_for_quote($new_products['products_price'])) { $price_display = show_email_for_quote($new_products); } else { $price_display = $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); } //EOF 8522 Email For Quote v1.2 while ($new_products = tep_db_fetch_array($new_products_query)) { ?> <div class="col-sm-<?php echo $product_width; ?>" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> <div class="thumbnail equal-height is-product" data-is-special="<?php echo (int)$new_products['is_special']; ?>"> <a href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$new_products['products_id']); ?>"><?php echo tep_image('images/' . $new_products['products_image'], htmlspecialchars($new_products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"'); ?></a> <div class="caption"> <p class="text-center"><a itemprop="url" href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$new_products['products_id']); ?>"><span itemprop="name"><?php echo $new_products['products_name']; ?></span></a></p> <hr> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php if (!is_email_for_quote($products_new['products_price'])) { ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="<?php echo tep_output_string($currency); ?>" /><span itemprop="price" content="<?php echo $currencies->display_raw($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); ?>"><?php echo $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); ?></span></p> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php } ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <div class="text-center"> <div class="btn-group"> <a href="<?php echo tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . (int)$new_products['products_id']); ?>" class="btn btn-default" role="button"><?php echo MODULE_CONTENT_NEW_PRODUCTS_BUTTON_VIEW; ?></a> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php if (!is_email_for_quote($products_new['products_price'])) { ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php echo '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$new_products['products_id']) . '" data-has-attributes="' . ((tep_has_product_attributes((int)$new_products['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$new_products['in_stock'] . '" data-product-id="' . (int)$new_products['products_id'] . '" class="btn btn-success btn-index btn-buy" role="button">' . MODULE_CONTENT_NEW_PRODUCTS_BUTTON_BUY . '</a>'; ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php } else { echo show_email_for_quote($products_new); } ?> <!-- EOF 8522 Email For Quote for v1.2 - Jan 2013 --> </div> </div> </div> </div> </div> <?php } ?> </div> </div> Any suggestion to fix this problem? Many thanks! Lyn
  2. Support Thread for "Index Nested - Product Listing" for osCommerce 2.3.4 (bootstrap) Report problems here. Feedback and comments appreciated. Download link: http://addons.oscommerce.com/info/9514 Easy module install. (minor core change required using hooks) This module applies to categories containing sub-categories (i.e. index -> nested), where currently only the sub-Category Listing and New Products module appear. Use this module when you would also like to list all-at-once the products within the sub-categories of the current category, therefore becoming a nested product listing (default behaviour is that no product listing appears in nested categories). Demo (scroll down to see nested product listing): http://www.auzcommerce.com.au/osc234bs_test/index.php?cPath=3 cheers
  3. ce7

    Product Listing

    Hi, I have 234.1Edge (BS) with few addons from 2.2/2.3/BS version. Mostly converted and working OK. I am trying to install Email for quote (2.3) on BS and working nearly ok except 2 parts. The problem list here is for includes/modules/product_listing.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ $num_list = (isset($_GET['view']) && ($_GET['view'] == 'all') ) ? 999999 : MAX_DISPLAY_SEARCH_RESULTS; //BOF 8522 Email For Quote v1.2 if (is_email_for_quote(false)) { //not including a check for no price option as there are many products on this page echo EMAIL_TO_PURCHASE; //original 231 version put this code after " reset($define_list); " //pop this one back off the array before we start creating our columns unset($define_list['PRODUCT_LIST_BUY_NOW']); } //EOF 8522 Email For Quote v1.2 $listing_split = new splitPageResults($listing_sql, $num_list, 'p.products_id'); ?> <?php if ($messageStack->size('product_action') > 0) { echo $messageStack->output('product_action'); } ?> <div class="contentText"> <?php if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <div class="row"> <div class="col-sm-6 pagenumber hidden-xs"> <?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> </div> <div class="col-sm-6"> <div class="pull-right pagenav"><ul class="pagination"><?php echo $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></ul></div> <span class="pull-right"><?php echo TEXT_RESULT_PAGE; ?></span> </div> </div> <?php } //BOF 8522 Email For Quote v1.2 if (in_array('PRODUCT_LIST_BUY_NOW',$column_list)) { $has_buynow_column = true; //trigger so Email for Quote suppresses normal output to the price column and instead shows in //the Buy Now column (instead of the Buy Now button) } //EOF 8522 Email For Quote v1.2 if ($listing_split->number_of_rows > 0) { ?> <div class="well well-sm"> <div class="btn-group btn-group-sm pull-right"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <?php echo TEXT_SORT_BY; ?><span class="caret"></span> </button> <ul class="dropdown-menu text-left"> <?php for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; break; case 'PRODUCT_LIST_ID': $lc_text = TABLE_HEADING_LATEST_ADDED; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text); echo ' <li>' . $lc_text . '</li>'; } } ?> </ul> </div> <?php if ( (defined('MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS') && MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS == 'True') && (strpos(MODULE_HEADER_TAGS_GRID_LIST_VIEW_PAGES, basename($PHP_SELF)) !== false) ) { ?> <strong><?php echo TEXT_VIEW; ?></strong> <div class="btn-group"> <a href="#" id="list" class="btn btn-default btn-sm"><span class="fa fa-th-list"></span><?php echo TEXT_VIEW_LIST; ?></a> <a href="#" id="grid" class="btn btn-default btn-sm"><span class="fa fa-th"></span><?php echo TEXT_VIEW_GRID; ?></a> </div> <?php } ?> <div class="clearfix"></div> </div> <?php $listing_query = tep_db_query($listing_split->sql_query); $prod_list_contents = NULL; // php 5 $list_group_item = (isset($item_width) ? $item_width : 4); // php 7 // $list_group_item = $item_width ?? 4; while ($listing = tep_db_fetch_array($listing_query)) { $prod_list_contents .= '<div class="item list-group-item col-sm-' . $list_group_item . '" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product">'; $prod_list_contents .= ' <div class="productHolder equal-height is-product" data-is-special="' . (int)$listing['is_special'] . '" data-product-price="' . $currencies->display_raw($listing['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '" data-product-manufacturer="' . max(0, (int)$listing['manufacturers_id']) . '">'; if (PRODUCT_LIST_IMAGE > 0) { if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $prod_list_contents .= ' <a href="' . tep_href_link('product_info.php', 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image('images/' . $listing['products_image'], htmlspecialchars($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"', NULL, 'img-responsive thumbnail group list-group-image') . '</a>'; } else { $prod_list_contents .= ' <a href="' . tep_href_link('product_info.php', (isset($sort) ? 'sort=' . $sort . '&' : '') . ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image('images/' . $listing['products_image'], htmlspecialchars($listing['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"', NULL, 'img-responsive thumbnail group list-group-image') . '</a>'; } } $prod_list_contents .= ' <div class="caption">'; if (PRODUCT_LIST_NAME > 0) { $prod_list_contents .= ' <h2 class="h3 group inner list-group-item-heading">'; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $prod_list_contents .= ' <a itemprop="url" href="' . tep_href_link('product_info.php', 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '"><span itemprop="name">' . $listing['products_name'] . '</span></a>'; } else { $prod_list_contents .= ' <a itemprop="url" href="' . tep_href_link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '"><span itemprop="name">' . $listing['products_name'] . '</span></a>'; } $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) { //BOF 8522 Email For Quote v1.2 // comment out for 8522 if (tep_not_null($listing['specials_new_products_price'])) { /* if (is_email_for_quote($listing['products_price'])) { if ($has_buynow_column === true) { $prod_list_contents .= ' <td align="right">quote</td>'; //we will show the Email for Quote in the Buy Now column instead } else { $prod_list_contents .= ' <td align="right">' . show_email_for_quote($listing) . '</td>'; } } else if (tep_not_null($listing['specials_new_products_price'])) { */ //EOF 8522 Email For Quote v1.2 $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>&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>'; } else { $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"><span itemprop="price" content="' . $currencies->display_raw($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></button></div></div>'; } } if (PRODUCT_LIST_BUY_NOW > 0) { //BOF 8522 Email For Quote v1.2 if (is_email_for_quote($listing['products_price'])) { $prod_list_contents .= ' <div class="col-xs-6 text-right">'; $prod_list_contents .= show_email_for_quote($listing); $prod_list_contents .= ' </div>'; } else { //EOF 8522 Email For Quote v1.2 $prod_list_contents .= ' <div class="col-xs-6 text-right">'; $prod_list_contents .= tep_draw_button(IMAGE_BUTTON_BUY_NOW, 'fa fa-shopping-cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . ((tep_has_product_attributes((int)$listing['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-success btn-product-listing btn-buy'); $prod_list_contents .= ' </div>'; } $prod_list_contents .= ' </div>'; } $prod_list_contents .= ' </div>'; $prod_list_contents .= ' </div>'; $prod_list_contents .= '</div>'; } echo '<div id="products" class="row list-group" itemscope itemtype="http://schema.org/ItemList">'; echo ' <meta itemprop="numberOfItems" content="' . (int)$listing_split->number_of_rows . '" />'; echo $prod_list_contents; echo '</div>'; } //else { ?> <div class="alert alert-info"><?php echo TEXT_NO_PRODUCTS; ?></div> <?php } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <div class="row"> <div class="col-sm-6 pagenumber hidden-xs"> <?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> </div> <div class="col-sm-6"> <div class="pull-right pagenav"><ul class="pagination"><?php echo $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></ul></div> <span class="pull-right"><?php echo TEXT_RESULT_PAGE; ?></span> </div> </div> <?php } ?> </div> The problem with the code above is that in my example has 5 products, and it show 5 times, 1st only 1 roduct, then 2 products, till 5 products (++). Please refer to the image below. Can someone please help me to fix the code so it can show properly? Thanks! Lyn
  4. Support thread for "Ajax Product Listing (bootstrap)". Report problems here. Feedback and comments welcome. Download link: http://addons.oscommerce.com/info/9455 This add-on enables faster loading of product listing content, without re-loading the whole website, when using either the manufacturer/category filter drop down list, next/prev page and sort order. Useful, especially if you have other content above the product listings, where the current vertical scroll position is kept on the page when using the filter drop down list, next/prev page and sort order. For example, you may have "Category New Products Carousel" or "Category Popular Products Carousel" above category product listing content. Works for product listings on the following pages: - Category Product Pages - Specials Page - New Products Page - Search Results Page Note: content loaded via ajax is based on the stock osCommerce product listing content.
  5. Hello all. I have been banging my head against the wall for sometime now on a weird problem I have with an oscommerce 2.3.1 install. I have a shop that decided to change from a list view to a grid view product listing. I have installed the add "list or Grid Simple" to change the product listing to the grid mode. I have used this add on with a fresh install of oscommerce and I know that it works. However, this shop is pretty heavily modded and when I change the product listing to grid mode, it omits the last product from a page that has several subsequent pages and omits the last product on each page. I thought to myself that it could just be the product_listing.php file so I tried the "List or Grid Simple" add on with the products_new.php (which is unmodified) file and it does the same thing. My next step was to use a fresh product_listing.php with no luck. Somewhere I must have changed something that goofs up the math or something. My next thoughts are to revert back some of the files from an old backup. I was thinking the: template_top.php stylesheet.css (doesn't seem likely as everything fits fine) index.php I am not sure what else would affect the product listing and what is displayed. If anyone could steer me in the right direction I would greatly appreciate it. Thanks
  6. jose@ukanswer.co.uk

    Product listing view changing

    Hi, i have a template i have been using. Originally on the main product pages, there was a function to switch between a tabular view or a list view for the products. Somewhere along the line i think i have turned this function off. Any ideas on how i can get it back please. URL: http://www.ukanswer.com/NEW%20TEMPLATE/template_40137_8dmVP62piyHzeBDZinMZ/osc/catalog/index.php
×