Code: Select all
if($advanced == 1){
$segmentId = '';
$segmentCatid = '';
for ($i = 0; $i < $total; $i++){
if(isset($segments[$i]) && $i == 0 && in_array($segments[$i], $viewsNotOwnId)) {
$vars['view'] = $segments[$i];
continue;
}
if(empty($segmentCatid)){
$query = $db->getQuery(true)
->select($db->quoteName(array('id')))
->from($db->quoteName('#__phocacart_categories'))
->where($db->quoteName('alias') . ' = ' . $db->quote($segments[$i]));
$db->setQuery($query);
$segmentCatid = $db->loadResult();
if(!empty($segmentCatid)) {
$segments[$i] = $segmentCatid.'-'.$segments[$i];
continue;
}
}
if (empty($segmentId)){
//$segmentProductId = '';
$query = $db->getQuery(true)
->select($db->quoteName(array('id')))
->from($db->quoteName('#__phocacart_products'))
->where($db->quoteName('alias') . ' = ' . $db->quote($segments[$i]));
$db->setQuery($query);
$segmentId = $db->loadResult();
if(!empty($segmentId)) {
$segments[$i] = $segmentId.'-'.$segments[$i];
}
}
}
$advanced = 0;
}
This is even problematic:
Code: Select all
$segments[$i] = preg_replace('/-/', ':', $segments[$i], 1);
EDIT: seems like the last solution I have added (05/04/2020 15:57), solves the issue with more menu links
If there will be no other issues, I can add it to 3.5.0 stable as expermintal setting:
Jan