First, using buy/sell or equip, make sure the last item is listed as the first item of the last page in the shop's sell list. The last item and the 2nd last item also must be buyable from the shop. The third requirment is that the selling price of the 2nd last item have to be more than half the buying price for the last item.The trick works like this:
Buy up to 99 items for the last item, then go to sell. Select the last item, and press L1. This will select all 99 items for sell. Proceed to selling all 99 as usual. Without doing anything, the selection will then automatically go to the 2nd last item. Press O to sell, and it will ask if you want to sell 99 of that item. Press yes, and you have just sell 99 of the 2nd last item (last item now) even if you only have 1 of that item originally. Repeat by buying 1 for the 2nd last and 99 of the last item.