I'll join the chorus for this question.
In my case I'm selling music - both a hard CD and/or mp3 downloads. I need both options to inhabit one product info page, hence the idea of attributes. But I need two independently functioning Add to Cart buttons - one for the CD and one for the downloads section. In other words, customers should be able to buy just the downloads without buying the hard CD.
I modified tpl_product_music_info_display.php to call a new file tpl_modules_music_attributes.php (instead of tpl_modules_attributes.php) so that I could customize music attributes, which will always be downloads. Then I had the zany idea that I could insert something like this at the beginning of tpl_modules_music_attributes.php in order to get a second form and Add to Cart button for the downloads:
Code:
</form>
<div id="productAttributes">
<!--bof Form start-->
<?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
<!--eof Form start-->
No luck. I have a very basic familiarity with PHP, so I'm not sure what to try here. For one thing, zen_href_link(zen_get_info_page($_GET['products_id']) is getting the product ID of, well, the product obviously (which is the CD). I'm sure there are other problems as well.
Suggestions?
Thanks,
tated