Twice_knightly Posted February 21, 2005 Share Posted February 21, 2005 Hi Please could somebody help me out, in my store I have a category which contains only 1 product, when the customer clicks on the category I'd like it to display the product info page for the product instead of going to the index.php page and the customer having to click again on the item to get to the details/checkout. Is this possible in osc ? Many thanks Cheers Carl. Link to comment Share on other sites More sharing options...
3960AD Posted February 21, 2005 Share Posted February 21, 2005 Hi Please could somebody help me out, in my store I have a category which contains only 1 product, when the customer clicks on the category I'd like it to display the product info page for the product instead of going to the index.php page and the customer having to click again on the item to get to the details/checkout. Is this possible in osc ? Many thanks Cheers Carl. <{POST_SNAPBACK}> do you mean sub-category or category? anyhow the point of concern that you have to modify is between lines 26-34 in boxes/categories.php. $categories_string .= '<a href="'; if ($tree[$counter]['parent'] == 0) { $cPath_new = 'cPath=' . $counter; } else { $cPath_new = 'cPath=' . $tree[$counter]['path']; } The first $cPath_new will indicate the path for the category (example: Hardware) The second $cPath_new will indicate the path for a sub-category (example: Mouse) $categories_string .= tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">'; This string basically creates the link. FILENAME_DEFAULT which if you look up in includes/filenames.php line 38 is index.php. If you wanted to change that to the product page youll do something like tep_href_link(FILENAME_PRODUCT_INFO, $cPath_new). Now this suggestion may be a solution for the sub-category and if thats the case you'll have to add additional lines of code to the above osCommerce code by looking at the index.php and seeing how they specify the call to the PRODUCT_INFO page. bye, Link to comment Share on other sites More sharing options...
Twice_knightly Posted February 21, 2005 Author Share Posted February 21, 2005 Thanks for the reply, I don't have any sub-categories just 10 categories. Forgot the say earlier that I only want one of these categories to go straight to the product info page not all of them. Is this still possible? Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.