Working on adding template code for subscriptions. The user guide doesn't seem to document the changes for subscription based template code, so i'm using two new installs (Iron & wool ReadyTheme) as a guide. Both have the following Template code at the end of the Product Attribute Template:
	Which Renders as :
	Note Duplicate Radio Button.
							
						
					Code:
	
	
<input type="hidden" name="Product_Attribute_Count" value="<mvt:eval expr="miva_array_elements(l.settings:attributes)" />" id="js-product-attribute-count" />
<mvt:if expr="l.settings:subscription:term_count">
   <mvt:if expr="NOT l.settings:subscription:mandatory">
      <input type="radio" name="otps[]" id="l-otp" class="hide-subs" value="1" checked="checked" />
      <input type="radio" name="otps[]" id="l-subscribe" class="hide-subs" value="1" />
      <label for="l-otp" class="purchase-form_otps-otp uppercase align-center">One Time Purchase</label>
      <label for="l-subscribe" class="purchase-form_otps-s uppercase align-center">Subscribe</label>
      <div class="form-row" id="js-subscription">
   <mvt:else>
      <div class="form-row">
         <label for="l-Product_Subscription_Term_ID" title="&mvte:attribute:prompt;" class="medium">Subscribe</label>
   </mvt:if>
      <select name="Product_Subscription_Term_ID" id="l-Product_Subscription_Term_ID" class="input-medium">
         <mvt:if expr="NOT l.settings:subscription:mandatory">
            <option value="0">Select Subscription</option>
         </mvt:if>
         <mvt:foreach iterator="term" array="subscription:terms">
            <option value="&mvte:term:id;">&mvte:term:descrip;</option>
         </mvt:foreach>
      </select>
   </div>
</mvt:if>
Code:
	
	<div id="js-product-attributes" class="column whole product-attributes"> <input type="hidden" name="Product_Attribute_Count" value="0" id="js-product-attribute-count"> <input type="radio" name="otps[]" id="l-otp" class="hide-subs" value="1" checked="checked"> <input type="radio" name="otps[]" id="l-subscribe" class="hide-subs" value="1"> <label for="l-otp" class="purchase-form_otps-otp uppercase align-center">One Time Purchase</label> <label for="l-subscribe" class="purchase-form_otps-s uppercase align-center">Subscribe</label> <div class="form-row" id="js-subscription"> <select name="Product_Subscription_Term_ID" id="l-Product_Subscription_Term_ID" class="input-medium input"> <option value="0">Select Subscription</option> <option value="5">Reorder every month</option> </select> </div> </div>
Comment