Fix variable definition for instock and sold out views to correctly loop pagination