I'm working on a website made with D7 and the Commerce Module, with a "Products" view (for the Product content type) having this relationship field:
(Products referenced by field_info_prodotto) Commerce Product: Add to Cart form
I want this "Buy Now" button/form to also be inside each products' page (= in the template for the Product content type).
I can create a template for single nodes (see code), but how should I edit the general template (node--product-display.tpl.php)?
# node--181.tpl.php
<form class="commerce-add-to-cart commerce-cart-add-to-cart-form-24" autocomplete="off"
action="/en/products" method="post" id="commerce-cart-add-to-cart-form-24" accept-charset="UTF-8">
<div><input type="hidden" name="product_id" value="24">
<input type="hidden" name="form_id" value="commerce_cart_add_to_cart_form_24">
<input name='form_token' type='hidden' value='<?php print drupal_get_token('commerce_cart_add_to_cart_form_24'); ?>'>
<div id="edit-line-item-fields--9" class="form-wrapper"></div><input type="hidden" name="quantity"
value="1">
<input type="submit" id="edit-submit--9" name="op" value="Add to cart" class="form-submit">
</div>
</form>
(In the template there is already the code to show a "Buy Now" field - field_tab_5 - but that's just an empty text field and I suppose it's not what I'm after).