Revert "Simplify query for StockLocation#stock_item" method needs to
handle variant or id as argument

This reverts commit 0d9cce2196bbcccfe8dcbba90778a2d789ef6e6c.
make_permalink option for prefix and generate by default