Hi,
Make sure that you fill the "canonical URL" setting of each product with the URL you want to be indexed by search engines.
That way, when a search engine crawls another URL which accesses that product, it will see the canonical URL and it will discard the URL it crawled in favor of the canonical URL you specified.
When a canonical URL is provided for a product, then the sitemap will also use this canonical URL instead of trying to generate a dynamic URL for the product.
HikaShop also has a "force canonical URLs on listings" setting in its configuration. If you activate it, it will use the canonical URL on the listings instead of generating the URL, and you can even have it auto filling the canonical URL of the products (it will look for the canonical URL each time it displays the product in a listing and if it doesn't find it, it will generate the link dynamically and then store that link as a canonical URL for the future).
Also, note that you have two things to take into account with canonical URLs:
- if you change your menu items, or the alias of the products, this can invalidate the canonical URLs and in that case, you'll have to modify them.
- you can't enter any URL you want as a canonical URL. You need to enter a URL which is already valid to access the product.
Finally, regarding the component/hikashop part of the URLs: This is added by Joomla SEF system automatically instead of the alias of the menu item when there is no menu item associated with the URL. In joomla, each page is supposed to be displayed as part of a menu item and that menu item needs to be of a type of the same component displaying the main area of the page.
So for example, if the search system of Joomla finds a HikaShop product to be displayed as a result, it needs to use a HikaShop type menu item for generating the link to the product page. However, it doesn't know which one to use (any website usually have several menu items for HikaShop views on the frontend). It might not use any (in which case it will display component/hikashop) or it might pick one randomly. With a canonical URL associated to the product, it will use that canonical URL automatically, so having canonical URLs in your products is also a great way to ensure that the URLs are nice everywhere on your website.