Created
January 14, 2013 16:27
-
-
Save bennick/4531288 to your computer and use it in GitHub Desktop.
grouped products for lemonstand unique product blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? if ($product->grouped_products->count): ?> | |
< label style="display:none;" for="product_id"><?= h($product->grouped_menu_label) ?></label> | |
<select id="product_id" name="product_id" style="display:none;" onchange="$(this).getForm().submit()"> | |
<? foreach ($product->grouped_products as $grouped_product): ?> | |
<option <?= option_state(post('product_id'), $grouped_product->id) ?> | |
value="<?= $grouped_product->id ?>"> | |
<?= h($grouped_product->grouped_option_desc) ?> | |
</option> | |
<? endforeach ?> | |
</select> | |
<? endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment