Hi,
It's not a random menu item. It's the current page menu item. It's only random if the place where the email is generated doesn't have a menu item or the menu item is not HikaShop. Normally, when the order is created on the frontend, you're already on the HikaShop checkout, and thus it will use the menu item id used on the checkout.
You can see the code which generates the URL in the preload of the order creation notification email :
global $Itemid;
$url_itemid = '';
if(!empty($Itemid)) {
$url_itemid = '&Itemid=' . $Itemid;
}
....
$pay_url = 'index.php?option=com_hikashop&ctrl=order&task=pay&order_id='.$data->order_id.$url_itemid;
if(empty($customer->user_cms_id) && !empty($data->order_token)) {
$pay_url .= '&order_token='.urlencode($data->order_token);
}
$pay_url = hikashop_frontendLink($pay_url);
In $Itemid, you have the id of the current menu item, if any.
If you want to force it to something else, you could change the first part of the code to:
$url_itemid = '&Itemid=XX';
where XX would be the id of the menu item you want to be used.