pdatee, để khắc phục lỗi pathway khi bạn tạo menu liên kết trực tiếp tới 1 category thì như sau: mở administrator/components/com_virtuemart/html/shop.product_details.phpComment dòng 157 thành như sau: // Set the CMS pathway //$vm_mainframe->vmAppendPathway( $pathway ); //$vm_mainframe->vmAppendPathway( $pathway ); Nếu bạn sử dụng menu của joomla để tạo ra danh mục các sản phẩm – mỗi menu gắn với 1 mã danh mục sản phẩm thì sẽ gặp lỗi này. Cách fix được release bởi yzedesign trên Virtuemart forum. Chỉ dùng cho joomla 1.5.x, virtuemart 1.1 hoặc virtuemart 1.2 và PHP của máy chủ là phiên bản 5 Bạn mở file administrator\components\com_virtuemart\classes\mainframe.class.php tìm tới đoạn: function vmAppendPathway( $pathway ) { và sửa thành code sau: function vmAppendPathway( $pathway ) { global $mainframe;
// Remove the link on the last pathway item $pathway[ count($pathway) - 1 ]->link = '';
if( vmIsJoomla('1.5') ) { $cmsPathway =& $mainframe->getPathway(); /***** YZEDESIGN HACK ******/ $whatinpath=','; foreach( $cmsPathway->_pathway as $tabpath ) { $whatinpath.=','.$tabpath->name.','; } /***** YZEDESIGN HACK ******/ foreach( $pathway AS $item) { if (!stripos($whatinpath,','.$item->name.',')){ //********* YZEDESIGN HACK $cmsPathway->addItem( $item->name, str_replace('&', '&', basename($item->link)) ); } } } else { $tpl = vmTemplate::getInstance(); $tpl->set( 'pathway', $pathway ); $vmPathway = $tpl->fetch( 'common/pathway.tpl.php' ); $mainframe->appendPathWay( $vmPathway ); } } ....
done
Tham khảo: http://forum.virtuemart.net/index.php?topic=41749.msg136615#msg136615 |