The Shulchan Aruch · Orach Chayim
אורח חיים תרמ״גOrach Chayim 643
Siman 643 of 697 in Orach Chayim — 3 se'ifim
הלכות סוכהLaws of Sukkot· siman 643
Se’if 1א׳
סֵדֶר הַקִּדּוּשׁ: יַיִן, קִדּוּשׁ וְסֻכָּה וְאַחַר כָּךְ זְמַן, לְפִי שֶׁהַזְּמַן חוֹזֵר עַל קִדּוּשׁ הַיּוֹם וְעַל מִצְוַת סֻכָּה.
The Order of Kiddush, 3 Seifim: 1. The order of Kiddush: wine, kiddush, and sukkah, and then followed by time, since time goes on the sanctification of the day and on the mitzvah of sukkah.
Se’if 2ב׳
לְהָרַמְבָּ"ם, מְקַדֵּשׁ מְעֻמָּד וּמְבָרֵךְ: לִישֵׁב בַּסֻכָּה, וְיוֹשֵׁב, וְאַחַר כָּךְ מְבָרֵךְ זְמַן וְאֵין נוֹהֲגִים כֵּן, אֶלָּא מְקַדְּשִׁין מְיֻשָּׁב וְכֵן דַּעַת הָרֹא"שׁ.
2. But the Rambam sanctifies standing and blesses to dwell in the sukkah and then he sits, followed by time (But we are not accustomed to do as such, but rather to sanctify while sitting, and similarly is the opinion of Rabbi Asher ben Yehiel.)
Se’if 3ג׳
בִּשְׁאָר יָמִים מְבָרֵךְ עַל הַסֻכָּה קֹדֶם בִּרְכַּת הַמּוֹצִיא; וְנוֹהֲגִים לְבָרֵךְ עַל הַסֻכָּה אַחַר בִּרְכַּת הַמּוֹצִיא, קֹדֶם שֶׁיִּטְעֹם. הַגָּה: וְהָכִי נוֹהֲגִין בַּחֹל, אֲבָל בְּשַׁבָּת וְיוֹם טוֹב שֶׁיֵּשׁ בָּהֶן קִדּוּשׁ, מְבָרֵךְ לְאַחַר קִדּוּשׁ (מהרי"ו); וְאִם קִדֵּשׁ בַּבַּיִת וְאוֹכֵל בַּסֻּכָּה, אוֹ אִיפְּכָא, עַיִּןִ לְעֵיל סִימָן רע"ג (סָעִיף ב').
3. On the rest of the days, we bless over the sukkah before saying "Hamotzi." Our practice is to bless on the sukkah after saying the "Hamotzi" blessing before eating. RAMA: and this is how we act during the week. But on Shabbat and Yom Tov, where Kiddush is said, we sanctify after making Kiddush [Mahari"v]. And if one says Kiddush in the house and eats in the Sukkah, or vice versa, see above Siman 273 Seif 2.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0