Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

emmwood

Archived
  • Posts

    10
  • Joined

  • Last visited

Profile Information

emmwood's Achievements

  1. Have you made any progress on your lay away contribution?

  2. I downloaded the MySQL ODBC 5.1 driver (appears in the administrative tools in control panel in vista under Data Sources post-install). After setting up the connection info, I used it to link the OS Commerce tables to Microsoft Access. It was very easy to import all of my products without attributes into OS Commerce. After copying the products table from Access into excel, I used vlookup to assign the OSCommerce-assigned product_id to my model number. I did the same for the options_id from the products_options table (i.e., size) and option_values_id from the products_options_values table (i.e., 12" x 24"). Once that was done, I create a column for the price prefix and the price value. The final spreadsheet layout looked like this: product_attributes_id products_id options_id options_values_id options_values_price price_prefix PRICE_SORT 1234 1 2 25 - -25 Once the spreadsheet was in this format, I used the price_sort field to sort the prices (i chose low to high so the the prices appeared from lowest to highest). After that, I simply copied all columns except price_sort directly into the the linked products_attributes table in MS Access and presto, all done! The product_attributes_id field is automatically populated when you paste the data, so there isn't a need to populate it with values. NOTE: Before you paste, make sure that you enter + as the price_prefix and 0 as the options_values_price if your option price is zero. If you make a mistake, you can simply delete the contents of the products_attributes table and try again!
  3. I was able to change the search results # in admin to a multiple of 3 to fix this. Thanks for the idea! [ quote name=germ' date='Sep 27 2009, 06:53 PM' post='1442701] Admin => Configuration => Maximum Values On that page check the value for "Search Results" It's probably set at 20 Make it a multiple of 3 since your page is setup that way. Try 21 or 18. I think that will fix your situation. :)
  4. I'm unsure how to fix the missing image via product_listiing.php I'm not a programmer, so I would really appreciate any help. product_listing.php <?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:43 hpdl Exp $ */ $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 } $list_box_contents = array(); if ($listing_split->number_of_rows > 0) { $listing_query = tep_db_query($listing_split->sql_query); $row = 0; $column = 0; while ($listing = tep_db_fetch_array($listing_query)) { $product_contents = array(); 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['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> '; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $lc_text = ' <s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' '; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($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> '; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<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> '; break; } $product_contents[] = $lc_text; } $lc_text = implode('<br>', $product_contents); $list_box_contents[$row][$column] = array('align' => 'center', 'params' => 'class="productListing-data"', 'text' => $lc_text); $column ++; if ($column >= 3) { $row ++; $column = 0; } } 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 } ?>
  5. PS-When i follow the "click to enlarge" link, there are no horizontal or vertical scroll bars in the new window that opens.

×
×
  • Create New...