Thank you so much! This helps a ton.

<div class="price" id="products-p3">
<cms:pages masterpage='products.php' limit='1' folder=k_folder_name >
<form action="https://xxx.foxycart.com/cart" method="post" accept-charset="utf-8">
<input type="hidden" name="name" value="<cms:show k_page_title />" />
<input type="hidden" name="price" value="<cms:show product_price />" />
<input type="hidden" name="code" value="<cms:show product_sku />" />
<input type="hidden" name="weight" value="<cms:show product_weight />" />
<input type="hidden" name="category" value="<cms:show product_fc_category />" />
Only <sup>$</sup><span class="dark"><cms:number_format product_price /></span>
<div class="gap-20"></div>
<select id="p3" class="getselect">
<cms:set current_page=k_page_name />
<cms:pages masterpage='products.php'>
<option value="<cms:show k_page_link />" <cms:if k_page_name=current_page>selected</cms:if>><cms:show k_page_title /></option>
</cms:pages>
</select>
<input type="submit" class="order-button" value="<cms:get_custom_field 'button_text' masterpage='sections/second_section.php' />" class="submit" />
</form>
</cms:pages>
</div>
The k_folder_name variable is available only in 'folder-view'. Are you sure you are using the code you posted in a folder-view?folder=k_folder_name
<h1>Folder is: <cms:show k_folder_name /></h1>
What is the variable that shows the folder name? I guess you are in page_view and the variable is k_page_foldername.but when I do a dump I see the folder name.