Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RMD27

Pioneers
  • Posts

    448
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by RMD27

  1. i also found an issue where it was moving the right column to the bottom left in the product_info file. I used the following product_info which I made myself using beyond compare and it seems to work but I stand to be corrected <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); // Start Products Specifications require_once (DIR_WS_FUNCTIONS . 'products_specifications.php'); // Handle the output of the Ask a Question form $from_name = ''; $from_email_address = ''; $message = ''; $error_string = ''; if (isset($_GET['action']) && ($_GET['action'] == 'process') ) { $error = false; $to_email_address = STORE_OWNER_EMAIL_ADDRESS; $to_name = STORE_OWNER; $from_email_address = tep_db_prepare_input ($_POST['from_email_address']); $from_name = tep_db_prepare_input ($_POST['from_name']); $message = tep_db_prepare_input ($_POST['message']); if (empty ($from_name) ) { $error_string .= 'name'; $error = true; } if (!tep_validate_email($from_email_address)) { if ($error == true) { $error_string .= '-'; } $error_string .= 'email'; } if ($error == false) { $email_subject = sprintf (TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME); $email_body = sprintf (TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], $product_info['products_model'], STORE_NAME) . "\n\n"; if (tep_not_null($message)) { $email_body .= $message . "\n\n"; } $email_body .= sprintf (TEXT_EMAIL_LINK, tep_href_link (FILENAME_PRODUCT_INFO, 'products_id=' . $_GETS['products_id']) ) . "\n\n" . sprintf (TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); tep_mail ($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); $messageStack->add_session ('header', sprintf (TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected ($to_name) ), 'success'); tep_redirect (tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action', 'tab') ) . 'action=success&tab=ASK')); } else { tep_redirect (tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action', 'tab') ) . 'tab=ASK&error=' . $error_string)); } } elseif (tep_session_is_registered ('customer_id') ) { $account_query = tep_db_query ("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "' "); $account = tep_db_fetch_array($account_query); $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $from_email_address = $account['customers_email_address']; } // Handle errors -- missing name or invalid email. We don't check the message field. if (isset ($_GET['error']) && $_GET['error'] != '') { $error_array = explode ('-', $_GET['error']); for ($index=0, $end=count($error_array); $index<$end; $index++) { if ($error_array[$index] == 'name') { $messageStack->add ('ask', ERROR_FROM_NAME); } else { $messageStack->add ('ask', ERROR_FROM_ADDRESS); } // if ($error_array .... else ... } // for ($index=0 } // if (isset // End Products Specifications $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <?php // Start Products Specifications if (SPECIFICATIONS_BOX_FRAME_STYLE == 'Tabs') { ?> <link href="style_tabs.css" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript" src="includes/functions/jquery-1.3.2.min.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function(){ initTabs(); }); function initTabs() { $('#tabMenu a').bind('click',function(e) { e.preventDefault(); var thref = $(this).attr("href").replace(/#/, ''); $('#tabMenu a').removeClass('active'); $(this).addClass('active'); $('#tabContent div.content').removeClass('active'); $('#'+thref).addClass('active'); }); } </script> <?php } // End Products Specifications ?> <script language="javascript" type="text/javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php // Products Specifications echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { // Products Specifications $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, pd.products_tab_1, pd.products_tab_2, pd.products_tab_3, pd.products_tab_4, pd.products_tab_5, pd.products_tab_6 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php // Start Products Specifications include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_SPECIFICATIONS); echo tep_draw_form ('cart_quantity', tep_href_link (FILENAME_PRODUCT_INFO, tep_get_all_get_params (array ('action') ) . 'action=add_product') ); // End Products Specifications ?> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <?php // Start Products Specifications ?> <table border="0" cellspacing="0" cellpadding="2" align="left" width="100%"> <tr> <td> <?php // End Products Specifications ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  2. i get the same issue using a vanilla field as an extra field. the only thing I can think at the moment that is causing these issues is encoding, i am dealing with greek letters. I try a filter by price and it works perfectly
  3. Another issue. When I link a specification group to a category I get this error, unlinking fixes the problem I tried the changes listed here but no difference http://www.oscommerce.com/forums/topic/230304-1054-unknown-column-pproducts-id-in-on-clause/ 1054 - Unknown column 'products_car_make' in 'where clause' select count(p.products_id) as count from (products p) join (products_to_categories p2c) on (p.products_id = p2c.products_id) left join (specials s) on (p.products_id = s.products_id) where p.products_status = '1' and p2c.categories_id in (116,117,120,122,123,124) AND products_car_make <=> 'Car Make'
  4. I disabled reviews on the prod info page and all is well now
  5. I installed 1.0.2 on a fresh 2.2 rc2 and I get this 1054 - Unknown column 'approved' in 'where clause' select count(*) as count from reviews where products_id = '1' and approved = '1' [TEP STOP]
  6. Ajax Search Suggest V3 (Ignore case and search anywhere) - this comes with instructions and it looks really straightforward
  7. I would say the encoding settings must be different for the test emails than the real emails. Maybe something is happening between "Production" and "Simulation" mode Previewing emails in the admin everything looks okay, regardless of whether it is in production mode or simulation mode. In summary, the only time email encoding appears to be a problem is in production mode when actual emails are sent to the customer. Which is obviously the last place you want there to be problems!
  8. Encoding issue. In preview mode and when I send test emails, encoding is fine. But when I send a real email, email title is okay but content is mangled. What is the solution? UTF-8 is what I want and it is set in the email engine.
  9. Update There was an entry in the configuration database table that was incomplete. The error is probably rated to the line immediately above or below the line with the problem. I hope this helps someone!!
  10. Is it possible to carry out bulk updates to the product specifications through phpmyadmin?
  11. i have the same issue, making changes in the admin forces you to go to the /htdocs/public/mystore/cache/cachefile.inc.php and delete the define(,''); that was created
  12. edit - sorted, i needed to go into the configuration tab first
  13. So i have just installed this contribution 2.8.1 on an v2.2 rc2 install but i get this error when I look at the summary tab. any pointers welcome! 1054 - Unknown column 'AFFILIATE_PAYMENT_ORDER_MIN_STATUS' in 'where clause' select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from affiliate_sales a left join orders o on (a.affiliate_orders_id = o.orders_id) where o.orders_status >= AFFILIATE_PAYMENT_ORDER_MIN_STATUS [TEP STOP]
  14. In my understanding PayPal verifies the address of the PayPal account and the shipping address they select in PayPal. It does not validate the address entered in OSCommerce. I talk about the most basic PayPal option, Standard. I stand to be corrected though.....
  15. If your not going to calculate shipping by country I would not bother adding the countries back in. Just add a "Rest of World" "country" and use zone rate with weight to calculate 0USD for all RoW orders. ie 0USD for orders up to 1000kg for example. Up to you how you tell the customer you will email them back with quote.
  16. Okay, forget that contribution, I found something better and easier. Check this if you are looking to style your product listings http://www.oscommerce.com/forums/topic/352919-convert-product-listings-to-table-less-css/
  17. I wanted the product listing in a grid format so I chose this contribution. It does the job cosmetically but it keeps adding rows to the database when it is running. Which also gets reflected in the admin > configuration > product listing screen. the contribution is here http://addons.oscommerce.com/info/7159 These are the install instructions ______ _____ /\__ _\ __ /'\_/`\ /\`\ /\ _`\ \/_/\ \//\_\ /\ \\/_/ ____ ___ ____\ \ \/\_\ \ \ \\/\ \\ \ \__\ \ /',__\ / __`\ /',__\\ \ \/_/_ \ \ \\ \ \\ \ \_/\ \ /\__, `\ /\ \L\ \/\__, `\\ \ \_\ \ \ \_\\ \_\\ \_\\ \_\\/\____/ \ \____/\/\____/ \ \____/ \/_/ \/_/ \/_/ \/_/ \/___/ \/___/ \/___/ \/___/ ____ ___ __ /\ _`\ /\_ \ /\ \__ __ \ \,\L\_\ ___\//\ \ __ __\ \ ,_\/\_\ ___ ___ ____ \/_\__ \ / __`\\ \ \ /\ \/\ \\ \ \/\/\ \ / __`\ /' _ `\ /',__\ /\ \L\ \/\ \L\ \\_\ \_\ \ \_\ \\ \ \_\ \ \/\ \L\ \/\ \/\ \/\__, `\ \ `\____\ \____//\____\\ \____/ \ \__\\ \_\ \____/\ \_\ \_\/\____/ \/_____/\/___/ \/____/ \/___/ \/__/ \/_/\/___/ \/_/\/_/\/___/ http://www.tim-international.net This contribution let's you easily list multiple products per row. Similar to the Contribution Products List in Columns (http://addons.oscommerce.com/info/112) but this contribution requires no modding. Just simply replace the desired listing module in the includes/modules directory. The modules are all independent from eachother. * products_listing.php Replaces the old behavior with multipe products per row in a standard infobox. The infobox will hopefully satisfy the STS users =) * new_products.php Makes the module conform to the Products Listing settings and look. * also_purchased_products.php Makes the module conform to the Products Listing settings and look. INSTALLATION INSTRUCTIONS ------------------------- 1) Create a full backup on your webshop's files and database. 2) Upload the files in this package that comply with your osCommerce installation. 3) Browse your webshop and make sure the contribution is working. 4) Administrate the number of columns in admin panel under: Configuration -> Product Listing -> Number of products per row (This database entry is being created automatically upon first load of any of the listing modules.) These is the product listing file <?php /* $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ if (!defined('PRODUCT_LIST_COLUMNS')) { tep_db_query( "insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Number of products per row', 'PRODUCT_LIST_COLUMNS', '5', 'Set the number of products per row to display?', '8', '11', now());" ); define('PRODUCT_LIST_COLUMNS', '5'); } $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } if (tep_not_null($_GET['manufacturers_id'])) { $manufacturer_query = tep_db_query( "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . tep_db_input($_GET['manufacturers_id']) . "';" ); $manufacturer = tep_db_fetch_array($manufacturer_query); $info_box_header = $manufacturer['manufacturers_name']; if (tep_not_null($_GET['filter_id'])) { $category_query = tep_db_query( "select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . tep_db_input($_GET['filter_id']) . "' and cd.categories_id = '" . tep_db_input($_GET['filter_id']) . "' and cd.language_id = '" . (int)$languages_id . "'" ); $category = tep_db_fetch_array($category_query); $info_box_header .= ' > '. $category['categories_name']; } } if (tep_not_null($current_category_id)) { $category_query = tep_db_query( "select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'" ); $category = tep_db_fetch_array($category_query); $info_box_header = $category['categories_name']; } $info_box_contents = array(); $info_box_contents[] = array('text' => $info_box_header); new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $list_box_contents = array(); if ($listing_split->number_of_rows > 0) { $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $lc_align = 'center'; $lc_text = '<table cellpadding="2" cellspacing="0" border="0">' . "\r\n"; foreach ($column_list as $column) { switch($column) { // Row: Products model case 'PRODUCT_LIST_MODEL': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center">'. $listing['products_model'] . '</td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Product's image case 'PRODUCT_LIST_IMAGE': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] : ($cPath ? 'cPath=' . $cPath : '')) . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Product's name case 'PRODUCT_LIST_NAME': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, (isset($_GET['manufacturers_id']) ? 'manufacturers_id=' . $_GET['manufacturers_id'] : ($cPath ? 'cPath=' . $cPath : '')) . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Manufacturer's name case 'PRODUCT_LIST_MANUFACTURER': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center"><span style="color: #666666;">'. $listing['manufacturers_name'] . '</span></td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Price case 'PRODUCT_LIST_PRICE': if (tep_not_null($listing['specials_new_products_price'])) { $lc_text .= ' <tr>' . "\r\n" . ' <td align="center"><s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) .'</s><br><span class="productSpecialPrice">'. $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>' . "\r\n" . ' </tr>' . "\r\n"; } else { $lc_text .= ' <tr>' . "\r\n" . ' <td align="center">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>' . "\r\n" . ' </tr>' . "\r\n"; } break; // Row: Product's quantity case 'PRODUCT_LIST_QUANTITY': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center">'. TABLE_HEADING_QUANTITY .': '. $listing['products_quantity'] . '</td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Product's weight case 'PRODUCT_LIST_WEIGHT': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center">'. TABLE_HEADING_WEIGHT .': '. $listing['products_weight'] . '</td>' . "\r\n" . ' </tr>' . "\r\n"; break; // Row: Buy now button case 'PRODUCT_LIST_BUY_NOW': $lc_text .= ' <tr>' . "\r\n" . ' <td align="center"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a></td>' . "\r\n" . ' </tr>' . "\r\n"; break; } } $lc_text .= '</table>' . "\r\n"; $list_box_contents[$row][$col] = array( 'align' => $lc_align, 'params' => 'width="'. round(100/PRODUCT_LIST_COLUMNS) .'%" class="productListing-data"', 'text' => $lc_text ); $col ++; if ($col > (PRODUCT_LIST_COLUMNS-1)) { $col = 0; $row ++; } } while ($col != 0 && sizeof($list_box_contents[$row]) < PRODUCT_LIST_COLUMNS) { $list_box_contents[$row][$col] = array( 'align' => 'center', 'params' => 'width="'. round(100/PRODUCT_LIST_COLUMNS) .'%"', 'text' => ' ' ); $col ++; } new productListingBox($list_box_contents); } 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); new productListingBox($list_box_contents); } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php } ?> Obviously I have to remove it but opinions on the contribution and possible suggestions for fixes welcome
  18. small Q How do get the results in one column instead of 2?
  19. Hello Robert If I can add another layer of complication! This whitelisting of characters works BUT You have to get the case of the letter correct. In latin you can put a OR A and it will find A But with the whitelisting of characters it will only find ΜΠΟΥΖΙ if you write ΜΠΟΥΖΙ, Μπουζι will not work. Any ideas on how to make foreign characters work the same as latin characters?
  20. Hi What exactly does this option do? I have set it two one but I do not see any difference in the tags created, what am I missing? Set a limit for products/categories
  21. For what it is worth I found the field in the stylesheet in the root .productListTable tr.alt td After an hour or so searching I decided to do a screen print of the product listing page. And then used the colour picker to find out the colour code. When I knew the code I copied and pasted the stylesheets into notepad and searched for the code. Bobs your uncle, it took 2 minutes. Instead of a colour I used a css3 gradient, Google it, there are a few tools where they will write the code for you.
  22. yeah, I have this problem in certain themes. Anybody know how to manually alter the alternating colors in the product listing?
  23. Hi How can we get this to work on the categories pages as well as the product_info pages?
×
×
  • Create New...