I was not doing well with this... not after metamodguy posted his snippet. Then it dawned on me...
All these codes do fix everything... but then if you apply his to my situation
the pop confirmation dialogue pointed to some different cart. I made a menu link to this url. but this version of the cart still malfunctioned.
Well here is what happened.
All the fixes tell Virtuemart to get an actual Itemid or to at least try...
But then Metamod's snippet told the whole system to reference and redirect to Itemid=1 and that was still not working... one cart button brought up one page... and the tiny cart button in the pop up dialogue... pointed to another verion of the main storefront.... ODD!!! and this one was still broken
so I changed metatmod's code to make it a different number... and all is well
function getShopItemid() {
if( empty( $_REQUEST['shopItemid'] )) {
$db = new ps_DB;
$db->query( "SELECT id FROM #__menu WHERE link='index.php?option=com_virtuemart' AND published=1");
$ids = $db->loadResultArray();
if ( !is_array($ids) or count($ids) == 0 ) {
$_REQUEST['shopItemid'] = 18;
} else if ( array_search( $_REQUEST['Itemid'], $ids ) !== false ) {
$_REQUEST['shopItemid'] = $_REQUEST['Itemid'];
} else {
$_REQUEST['shopItemid'] = $ids[0];
}
}
return intval($_REQUEST['shopItemid']);
}
Yeah so far so good. Thanks for everyone's help on this!