Fix undefined offset if there are no variable prices

If there are no variable prices for an item the array is empty which results in a undefined offset
Merge pull request #1615 from elliott-stocks/patch-6

Fix undefined offset if there are no variable prices