chey Posted October 31, 2006 Share Posted October 31, 2006 right now my sub categories display the following, which is the name of the category(in blue).this is the code[code]/** * CATEGORY DESCRIPTION */ $desc = $ps_product_category->get_description($category_id); /* Prepend Product Short Description Meta Tag "description" when applicable */ if( @$_REQUEST['output'] != "pdf") { $mainframe->prependMetaTag( "description", substr(strip_tags($desc ), 0, 255) ); } if( trim(str_replace( "<br />", "" , $desc)) != "" ) { echo $desc; echo '<br /><br />'; }if (!empty($category_id) ) { /** * PATHWAY - Navigation List */ echo '<div style="text-align:left;">'; $nav_list = $ps_product_category->get_navigation_list($category_id); if( @$_REQUEST['output'] != "pdf") { $mainframe->appendPathWay( $nav_list ); } else { echo "<strong>".$nav_list ."</strong><br />"; } $child_list = $ps_product_category->get_child_list($category_id); if (!empty( $child_list )) { echo $child_list; echo 'hello'; } echo '</div>'; if (!empty( $child_list )) { echo '<br style="clear:both;" /><br />'; } }[/code]so now, i want to add the category descriptions underneath it. i believe the variable name for it is 'category_descriptions'[attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/25659-shopping-cart-in-php/ Share on other sites More sharing options...
chey Posted October 31, 2006 Author Share Posted October 31, 2006 hmmm, currently i know where to solve the sub category descriptions, but i'm not good with php, so i need help.$child_list actually displays the categories. BUT, it displays it at the side as well. in shop.browse.php + ps_product_category.php, $child_list is used to generate the display. in order for it to display the descriptions under the one in the sub category page, i'll have to change the child_list function right? is there anyway way to modify the code for it?in shop.browse.php:[code]$child_list = $ps_product_category->get_child_list($category_id); $desc = $ps_product_category->get_description($category_id); if (!empty( $child_list )) { echo $child_list; } echo '</div>'; if (!empty( $child_list )) { echo '<br style="clear:both;" /><br />'; }[/code]this would display it on the main page.(shown below in blue)in ps_product_category.php[code]function print_child_list($category_id) { echo $this->get_child_list($category_id); }[/code]prints it on the module side.so... how can i enable both functions to print differently? Link to comment https://forums.phpfreaks.com/topic/25659-shopping-cart-in-php/#findComment-117166 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.