at line 123 you start a for loop:
for ($n=0; $n<sizeof($eCart->Items); $n++) {
within that for loop you have the Settings, MenuStyle, Menu, and Design recordsets.
these redordsets do not need to be in the for loop, they do not use any of the cart variables, and having them in the loop just means they will be executed for as many items are in the cart, which is not necessary. move those recordsets out of the for loop.