modified the ordering code so it can deal with virtual_products