Guest Posted April 30, 2006 Posted April 30, 2006 I have about 100 specials and I want to create banners on the front page that will link to these specials by manufacturer. e.g. have 50 warner bros and 50 microsoft specials and want to create a link - microsoft specials on mysite.com Is it possible to some how use the search to return just specials from one maufacturer? Is the solution to create specific specials.php for each manufacturer so it only displays specials from 1 manufacturer? Anybody help me out with the code change for this?
Guest Posted May 1, 2006 Posted May 1, 2006 It would be really good if I could wotk the above out or does anyone have a suggestion for a suitable contribution?
Guest Posted January 25, 2007 Posted January 25, 2007 BUMP, nearly a year since I made the first post and I still havnt worked it out. Anyone any ideas yet?
lostndazed Posted January 25, 2007 Posted January 25, 2007 Well, I'm not a programmer, so I'd have to muddle through this. I'd probably start with backing up admin/specials.php Then, on the copy I'd try to work with the code on that page in order to show the banners as specials. Some jobs are meant to be hired out, though. A small one like this could probably be done inexpensively if you put your job up for hire at one of the code/programming bidding job sites.
♥bruyndoncx Posted January 25, 2007 Posted January 25, 2007 This is a quick hack to just do as you requested, you'll need to know the id to put in the banner link, but it does work .. Hope this helps you out a little bit ! in catalog/specials.php Find $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; Replace with: $man_filter = (isset($HTTP_GET_VARS['manufacturers_id']) ? ' and p.manufacturers_id = '.(int)$HTTP_GET_VARS['manufacturers_id'].' ' : ''); $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' $man_filter order by s.specials_date_added DESC"; The call is like this, and it will just limit the selection shown http://www.yourdomain.com/specials.php?manufacturers_id=16 KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
boostmy.com Posted January 25, 2007 Posted January 25, 2007 thankyou I was looking for this exact information!!! Kind regards;
Guest Posted January 27, 2007 Posted January 27, 2007 This is a quick hack to just do as you requested, you'll need to know the id to put in the banner link, but it does work .. Hope this helps you out a little bit ! in catalog/specials.php Find $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC"; Replace with: $man_filter = (isset($HTTP_GET_VARS['manufacturers_id']) ? ' and p.manufacturers_id = '.(int)$HTTP_GET_VARS['manufacturers_id'].' ' : ''); $specials_query_raw = "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' $man_filter order by s.specials_date_added DESC"; The call is like this, and it will just limit the selection shown http://www.yourdomain.com/specials.php?manufacturers_id=16 You star!!! :thumbsup: :thumbsup:
♥bruyndoncx Posted January 27, 2007 Posted January 27, 2007 Nice to see it in action, think it is about time to get rid of my santa claus on the home page and replace it with banners like you did ! KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
♥bruyndoncx Posted January 28, 2007 Posted January 28, 2007 now see what you started :D Another contribution is born ... this and a bunch more to get a box listing all manufacturers with a minimum number of active specials: Specials By Manufacturers Box: http://www.oscommerce.com/community/contributions,4840 KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
buynotebookscheap Posted January 28, 2007 Posted January 28, 2007 now see what you started :D Another contribution is born ... this and a bunch more to get a box listing all manufacturers with a minimum number of active specials: Specials By Manufacturers Box: http://www.oscommerce.com/community/contributions,4840 All Manufacturers Categories where do I add the edit for english.php. ===> edit catalog/includes/languages/english.php ===> add the line : define('BOX_ALL_MAN_CATS', 'All Brands & Their Product Categories'); define('TITLE_ALL_MAN_CATS', 'Click here to see at a glance what our shop has to offer !'); where should I place this in the file anywhere? Thanks Buy Notebooks Cheap
♥bruyndoncx Posted January 28, 2007 Posted January 28, 2007 All Manufacturers Categories where do I add the edit for english.php. ===> edit catalog/includes/languages/english.php ===> add the line : define('BOX_ALL_MAN_CATS', 'All Brands & Their Product Categories'); define('TITLE_ALL_MAN_CATS', 'Click here to see at a glance what our shop has to offer !'); where should I place this in the file anywhere? Thanks You can add it anywhere you like (at the beginning, at the end before the closing ?>, or in the middle of the file together with other BOX define statements )as long as it is outside any if conditional structure so that the text is always defined. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
buynotebookscheap Posted January 28, 2007 Posted January 28, 2007 You can add it anywhere you like (at the beginning, at the end before the closing ?>, or in the middle of the file together with other BOX define statements )as long as it is outside any if conditional structure so that the text is always defined. I don't know if my template is compatible, I installed it and it created lines in the left column, So I removed it. Something I did wrong? http://www.buynotebookscheap.com Buy Notebooks Cheap
♥bruyndoncx Posted January 28, 2007 Posted January 28, 2007 I don't know if my template is compatible, I installed it and it created lines in the left column, So I removed it. Something I did wrong?http://www.buynotebookscheap.com First off, you have not uploaded the language file. (includes/languages/english/all_manufacturers_categories.php) Secondly, you need to check if you uploaded the box code in includes/boxes After you added the 2 defines to your english.php file, you can modify includes/column_left.php You could add the box before the call to the specials box. Your template normally shows anything added to your left column. Doing it all in this order ensures that things keep on working on your live site (assuming you didn't make any typo's). KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
buynotebookscheap Posted January 28, 2007 Posted January 28, 2007 First off, you have not uploaded the language file.(includes/languages/english/all_manufacturers_categories.php) Secondly, you need to check if you uploaded the box code in includes/boxes After you added the 2 defines to your english.php file, you can modify includes/column_left.php You could add the box before the call to the specials box. Your template normally shows anything added to your left column. Doing it all in this order ensures that things keep on working on your live site (assuming you didn't make any typo's). I have uploaded files. Column Left: Where do I place:. include(DIR_WS_BOXES . 'all_manufacturers_categories.php'); <?php /* $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // STS: ADD $sts_block_name = 'header2columnleft'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_categories_box(); } else { include(DIR_WS_BOXES . 'categories.php'); } // STS: ADD $sts_block_name = 'categorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_manufacturers_box(); } else { include(DIR_WS_BOXES . 'manufacturers.php'); } // STS: ADD $sts_block_name = 'manufacturerbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'whats_new.php'); // STS: ADD $sts_block_name = 'whatsnewbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'search.php'); // STS: ADD $sts_block_name = 'searchbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'information.php'); // STS: ADD $sts_block_name = 'informationbox'; require(STS_RESTART_CAPTURE); // STS: EOADD require(DIR_WS_BOXES . 'shopping_cart.php'); // STS: ADD $sts_block_name = 'cartbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php'); // STS: ADD $sts_block_name = 'maninfobox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php'); // STS: ADD $sts_block_name = 'orderhistorybox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (tep_session_is_registered('customer_id')) { $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'"); $check = tep_db_fetch_array($check_query); if ($check['count'] > 0) { include(DIR_WS_BOXES . 'best_sellers.php'); } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'product_notifications.php'); } } else { include(DIR_WS_BOXES . 'best_sellers.php'); } // STS: ADD $sts_block_name = 'bestsellersbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (isset($HTTP_GET_VARS['products_id'])) { if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php'); } else { include(DIR_WS_BOXES . 'specials.php'); } // STS: ADD $sts_block_name = 'specialfriendbox'; require(STS_RESTART_CAPTURE); // STS: EOADD if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); // STS: ADD $sts_block_name = 'languagebox'; require(STS_RESTART_CAPTURE); // STS: EOADD include(DIR_WS_BOXES . 'currencies.php'); // STS: ADD $sts_block_name = 'currenciesbox'; require(STS_RESTART_CAPTURE); // STS: EOADD } ?> Buy Notebooks Cheap
buynotebookscheap Posted January 28, 2007 Posted January 28, 2007 First off, you have not uploaded the language file.(includes/languages/english/all_manufacturers_categories.php) Secondly, you need to check if you uploaded the box code in includes/boxes After you added the 2 defines to your english.php file, you can modify includes/column_left.php You could add the box before the call to the specials box. Your template normally shows anything added to your left column. Doing it all in this order ensures that things keep on working on your live site (assuming you didn't make any typo's). Now what SQL file do I need to make this work I get this error now. http://www.buynotebookscheap.com/all_manuf...fb4147c4d08301a Top » Catalog » All Brands and Products Categories All Brands and Products Categories 1054 - Unknown column 'c.categories_status' in 'where clause' SELECT DISTINCT count(p2c.products_id) as prodcount, cd.categories_id, cd.categories_name, m.manufacturers_id, manufacturers_name, manufacturers_image FROM products p, categories c, categories_description cd, manufacturers m, products_to_categories p2c WHERE p.manufacturers_id = m.manufacturers_id AND p.products_id = p2c.products_id AND p.products_status = 1 AND p2c.categories_id = c.categories_id and c.categories_status = 1 and c.categories_id = cd.categories_id and cd.language_id = 1 GROUP BY m.manufacturers_name, cd.categories_name [TEP STOP] Buy Notebooks Cheap
♥bruyndoncx Posted January 28, 2007 Posted January 28, 2007 just remove 'and c.categories_status = 1' from the sql statement. My mistake, this is not in the standard MS2.2 installation, but added by the enable/disable categories contribution. I assume you have figured out how to include another box in your STS template ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt
Recommended Posts
Archived
This topic is now archived and is closed to further replies.