freddyboy377 Posted April 8, 2015 Share Posted April 8, 2015 SOMEONE PLEASE HELP I DON'T SEE IT. // Add products you wish to exclude to this list. // Go to Admin->Catalog->Categories/Products->[Your category] // and look at the left hand side of the list to determine // product id. Note that 99999 and 99998 are just given // as examples. function exclude_product($id) { switch($id) { case 99999: case 99998: return true; Link to comment Share on other sites More sharing options...
nigelt74 Posted April 8, 2015 Share Posted April 8, 2015 Can you explain what you are trying to do?Are you just trying to get the product ids or the category ids your image says category ids, but your post says product IDs in your Admin->Catalog->Categories/Products you need to click right down to the specific product and click edit on the productnow look in your address bar you will see a path like(you may need to click in the address bar to show the full URL with the query string)you will get something like thisyoursite/admin/categories.php?cPath=1_5&pID=27&action=new_productthe query stringcPath=1_5&pID=27 cPath=1_5 the categories are listed in descending order in this example category 1 is Hardware and category 5 is Keyboards (a subcategory of category 5)pid = productID = 27 Link to comment Share on other sites More sharing options...
freddyboy377 Posted April 8, 2015 Author Share Posted April 8, 2015 Trying to do this: http://addons.oscommerce.com/info/6751 Trying to exclude an entire category from being discounted or a particular product, either way I believe would accomplish my goal. // Add products you wish to exclude to this list. // Go to Admin->Catalog->Categories/Products->[Your category] // and look at the left hand side of the list to determine // product id. Note that 99999 and 99998 are just given // as examples. function exclude_product($id) { switch($id) { case 99999: case 99998: return true; Doing as per the comments in this php file are instructing to do. I cannot see what he is talking about, However, that said I do see how you are arriving to your solution by pulling from the address bar which is fine but why can't I see what the comment is suggesting? Link to comment Share on other sites More sharing options...
nigelt74 Posted April 8, 2015 Share Posted April 8, 2015 I don't know either, perhaps there has been a change in the layout of the categories page and it no longer shows the category id in the info window It shouldn't be too hard to add the code to display it in Ok to make the category id display in the info box to the right edit your admin/categories.php file (I am using 2.3.4BS so your line number may be different) $contents[] = array('text' => '<br />' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br />' . $cInfo->categories_image); Replace with $contents[] = array('text' => '<br />Category ID - '.$cInfo->categories_id .'<br />' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br />' . $cInfo->categories_image); Link to comment Share on other sites More sharing options...
nigelt74 Posted April 8, 2015 Share Posted April 8, 2015 And for the Product ID edit your admin/categories.php file (I am using 2.3.4BS so your line number may be different) $contents[] = array('text' => '<br />' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $pInfo->products_image); replace with $contents[] = array('text' => '<br />Product ID - '.$pInfo->products_id .'<br />' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $pInfo->products_image); It should appear in the right hand info box just above the product image Link to comment Share on other sites More sharing options...
freddyboy377 Posted April 8, 2015 Author Share Posted April 8, 2015 Thank You Very Much! I will study your notes and let you know of my Success...Staying Positive!! ;-) Link to comment Share on other sites More sharing options...
freddyboy377 Posted April 13, 2015 Author Share Posted April 13, 2015 You solution was very helpful Thank You. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.