Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

evarious

Archived
  • Posts

    9
  • Joined

  • Last visited

Profile Information

evarious's Achievements

  1. I was having problems using cache with coolMenu and I have looked over the thread trying to find a solution. It could be due to my lack of searching skills, but I was unable to find a solution. So I loosened up the 'ol fingers and thought I would try to hack it myself (Though I am a super PHP n00b :thumbsup: ) The Problem: When using cache and navigating to a category that has many subcategories, like "Hardware" the categories would expand and stick out below my coolMenu. alike so: The Solution: The solution I came up with was simple... but I hope it doesn't cause any problems. So if a keen PHP'er out there thinks this solution would cause problems, please let me know. In *catalog*/includes/column_left.php comment out two lines: if ((USE_CACHE == 'true') && empty($SID)) { // echo tep_cache_categories_box(); // } else { include(DIR_WS_BOXES . 'coolmenu.php'); } ?> That did the trick. I can run with my cache and still have coolMenu! YAY! BTW, if you were already running cache, you can clear out the old category box, I don't know if it will cause problems... but who wants an old cache file just sitting around? ok... one more thing. If you're having problems with the spacing after your coolMenu just add these lines after the 'coolmenu.php' line in column_left.php: include(DIR_WS_BOXES . 'coolmenu.php'); } ?> <tr> <td> <img src="images/pixel_trans.gif" width="100%" height="15"> </td> </tr> <?php This is to get the spacing between coolMenu and my next infobox correct. I just stuck it in there and adjusted the height until is looked right. Well I hope this helps someone. joey
  2. If I'm looking at the code right, it doesn't seem that you have applied the changes correctly. Make double sure your in *root*\includes\modules\featured_sets.php (There is more than one featured_sets.php file.) Here is the code to change. Find // do product features if ( (OPEN_FEATURED_LIMIT_PRODUCTS_FEATURES=='true') && !empty($current_category_id) ) { /// We are in category depth $featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (".$categories_query_addition.") and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } else if ( (OPEN_FEATURED_LIMIT_PRODUCTS_FEATURES=='true') && tep_not_null($product_info['products_id']) ) { // products info page $featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = '" . (int)$featured_product_category_id . "' and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } else { // default $featured_products_query_raw = "SELECT p.products_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } And replace it with // do product features if ( (OPEN_FEATURED_LIMIT_PRODUCTS_FEATURES=='true') && !empty($current_category_id) ) { /// We are in category depth $featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from(( " . TABLE_PRODUCTS . " p )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c )left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (".$categories_query_addition.") and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } else if ( (OPEN_FEATURED_LIMIT_PRODUCTS_FEATURES=='true') && tep_not_null($product_info['products_id']) ) { // products info page $featured_products_query_raw = "SELECT distinct p.products_id, pd.products_name, p.products_image, p.products_tax_class_id, pd.products_description, pd.products_short, s.status as specstat, s.specials_new_products_price, p.products_price from(( " . TABLE_PRODUCTS . " p )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c )left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = '" . (int)$featured_product_category_id . "' and p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } else { // default $featured_products_query_raw = "SELECT p.products_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price from(( " . TABLE_PRODUCTS . " p )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id )left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' where p.products_status = '1' and p.products_featured = '1' order by " . FEATURED_PRODUCTS_SORT_ORDER . " " . FEATURED_PRODUCTS_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_PRODUCTS; } Then find if ((!isset($featured_manufacturer_products_id)) || ($featured_manufacturer_products_id == '0')) { $featured_manufacturer_products_query_raw = "select p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturer_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturer_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURER_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_MANUFACTURER; And replace it with if ((!isset($featured_manufacturer_products_id)) || ($featured_manufacturer_products_id == '0')) { $featured_manufacturer_products_query_raw = "select p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_description, pd.products_short, p.products_image, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.manufacturer_featured_until, mi.manufacturers_id, mi.languages_id, mi.manufacturers_url from( " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "' and m.manufacturer_featured = '1' order by " . FEATURED_MANUFACTURER_SORT_ORDER . " " . FEATURED_MANUFACTURER_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_MANUFACTURER; Then find //if ((!isset($featured_categories_id)) || ($featured_categories_id == '0')) { if ( (OPEN_FEATURED_LIMIT_CATEGORIES_FEATURES=='true') && !empty($current_category_id) ) { /// We are in category depth $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and (".$categories_query_addition.") and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } else if ( (OPEN_FEATURED_LIMIT_CATEGORIES_FEATURES=='true') && tep_not_null($product_info['products_id']) ) { // products info page $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and p2c.categories_id = '" . (int)$featured_product_category_id . "' and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } else { // default $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } And replace it with //if ((!isset($featured_categories_id)) || ($featured_categories_id == '0')) { if ( (OPEN_FEATURED_LIMIT_CATEGORIES_FEATURES=='true') && !empty($current_category_id) ) { /// We are in category depth $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from(( " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p )left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and (".$categories_query_addition.") and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } else if ( (OPEN_FEATURED_LIMIT_CATEGORIES_FEATURES=='true') && tep_not_null($product_info['products_id']) ) { // products info page $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from(( " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p )left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and p2c.categories_id = '" . (int)$featured_product_category_id . "' and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } else { // default $featured_categories_query_raw = "select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from(( " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p )left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '" . (int)$languages_id . "' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' order by " . FEATURED_CATEGORIES_SORT_ORDER . " " . FEATURED_CATEGORIES_DIRECTION . ' limit ' . MAX_DISPLAY_FEATURED_CATEGORIES; } I am mostly sure that's all the code to change. Should be as easy as copy and paste! (Though it's sorta like the blind leading the blind with me :blink:) I hope this helps...
  3. I am using the latest XAMPP on my system. It's running php 5.1. with apache and mysql and oscommerce-2.2ms2-051113. If you could paste the error using the code section, I or someone more knowledged in php might be able to help you better. This is probably a dumb question, so please excuse me, but are you just doing the "upgrade" in the contrib file or are you merging all the files in the "catalog" file with winmerge or something?
  4. Thanks alot for your patience, that worked... I must of missed the extra ")" when fixing the file! :blush: I hadn't seen the section... But now I do!! Sorry still very n00bish, but I'm learning quickly. Uber props to surfalot for this contrib, it does everything I wanted in one contrib that would've taken prolly 5+ contribs to do! :D
  5. Been trying to get the contrib to work as well, I had the same left join error and the "parenthesis-fix" worked for me. But now I am getting a different error. The error is not on the index page, but as soon as I click on a product it gives me this new error at the bottom of the page. 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where c.categories_featured = '1' and cd.language_id = '1' and c.categories_id =' at line 1 select c.categories_id, c.categories_image, c.parent_id, c.categories_featured_until, cd.categories_name, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, pd.products_name, pd.products_description, pd.products_short, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from(( categories c, categories_description cd, products_description pd, products p )left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where c.categories_featured = '1' and cd.language_id = '1' and c.categories_id = cd.categories_id and c.categories_id = p2c.categories_id and cd.categories_id = p2c.categories_id and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and (p2c.categories_id = '20') and pd.language_id = '1' order by rand() DESC limit 6 Obviously an SQL error, but as far as I know I installed the sql commands correctly (Just copy paste!) It's on a fresh install of OSC 2.2 MS3 on a fresh database. I have 2 individual products and 3 categories featured. Thanks evarious PS and is there a way to display more than 6 products at a time??
×
×
  • Create New...