Use ‘before’ and ‘after’ block attributes to change the order of blocks. You can set the position of a block within a structural block by assigning the name of another block to either ‘before’ or ‘after’ attribute.
For example, if you’d like to put ‘Product Viewed’ box below ‘Cart’ box on the right menu, you can define the layout XML files as follows:
You can define block position at the very top or bottom by using before=”-” or after=”-”.