Skip to content

Instantly share code, notes, and snippets.

@objectivehtml
Created November 27, 2012 16:35
Show Gist options
  • Select an option

  • Save objectivehtml/4155300 to your computer and use it in GitHub Desktop.

Select an option

Save objectivehtml/4155300 to your computer and use it in GitHub Desktop.
{exp:cartthrob:cart_items_info}
{if segment_2 == "promo"}
<fieldset>
<h3>Coupon Code</h3>
<h4>Total: {cart_total} <i>(with tax)</i></h4>
{exp:cartthrob:add_coupon_form return="/subscribe"}
<input type="text" name="coupon_code" /><br>
<button type="submit">Update Total</button>
{/exp:cartthrob:add_coupon_form}
</fieldset>
{/if}
{/exp:cartthrob:cart_items_info}
{exp:cartthrob:checkout_form
class="subscription"
return="subscribe/checkout"
expiration_date="365"
show_errors="yes"
group_id="5"
error_handling="inline"
}
{if global_errors:count > 0}
<div class="errors group">
<h3>General Errors</h3>
<ul class="bullets">
{global_errors}
<li>{error}</li>
{/global_errors}
</ul>
</div>
{/if}
{if field_errors:count > 0}
<div class="errors group">
<h3>Validation Errors</h3>
<ul class="bullets">
{field_errors}
<li>{error}</li>
{/field_errors}
</ul>
</div>
{/if}
{if global_errors:count == 0 && field_errors:count == 0}
{exp:cartthrob:submitted_order_info}
{if authorized}
{/if}
{if declined}
<h3>Payment Errors</h3>
<p class="error">{error_message}</p>
{/if}
{if failed}
<h3>Payment Errors</h3>
<p class="error">{error_message}</p>
{/if}
{/exp:cartthrob:submitted_order_info}
{/if}
<fieldset id="payment" style="display:none">
<h3>Contact Information</h3>
<ol>
<li>
<label for="name">Name</label>
<input name="first_name" id="first_name" placeholder="First" type="hidden" required="required" value="{first_name}" />
<input name="last_name" id="last_name" placeholder="Last" type="hidden" required="required" value="{last_name}" />
</li>
<li>
<label for="company-name">Company Name</label>
<input name="company" id="company-name" type="hidden" required="required" value="{company}">
</li>
<li>
<label for="address">Street Address</label>
<input name="address" id="address" value="{address}" type="hidden" required="required"><br>
<input name="address_2" id="address" value="{address2}" type="hidden" required="required">
</li>
<li>
<label for="city">City</label>
<input name="city" id="city" value="{city}" type="hidden" required="required">
</li>
<li>
<label for="state">State</label>
<input name="state" id="state" value="{state}" required="required">
</li>
<li>
<label for="zip">Postal / Zip Code</label>
<input name="zipcode" id="zip" value="{zip}" type="hidden" required="required">
</li>
<li>
<label for="phone">Phone</label>
<input name="phone" id="phone" value="{phone}" type="hidden" required="required" placeholder="xxx-xxx-xxxx">
</li>
</ol>
</fieldset>
<fieldset id="payment">
<h3>Payment Details</h3>
<ol>
<li class="card-number">
<label for="credit_card_number" class="required">Credit Card Number</label>
<input type="text" name="credit_card_number" value="" id="credit_card_number" class="required" maxlength="16">
</li>
<li class="cvv2">
<label for="CVV2">Card Security Code</label>
<input type="text" name="CVV2" value="" id="CVV2" maxlength="4">
</li>
<li class="payment-type">
<label for="card_type">Payment Type</label>
<select name="card_type" id="card_type">
<option value="visa">Visa</option>
<option value="mc">Mastercard</option>
<option value="amex">American Express</option>
<option value="discover">Discover</option>
</select>
</li>
<li>
<label for="exp-month">Expiration Date</label>
<select name="expiration_month" id="exp-month" value="">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select name="expiration_year" id="exp-year">
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
</select>
</li>
</ol>
</fieldset>
<div class="terms-and-conditions-details">
<p>By clicking <i>Process My Order</i>, you agree to the <a href="/terms">Terms &amp; Conditions</a>.</p>
<div class="details-of-terms-and-conditions">
<h3>Terms &amp; Conditions</h2>
<p>A subscription to join our group is for a one-year term from the date the fee is paid. Information will be made availabe to subscribers as it becomes available and is deemed relevant by the operators of the website. No amount or number of reports is guaranteed in any way.</p>
<h4>Risk Disclosure and Disclaimer:</h4>
<p><i>There is a risk of loss in farming</i>&hellip; and in every other endeavor in life. All the material presented or shared in any way is believed to be accurate as presented but is not guaranteed as to accuracy or completeness. It should not be assumed or is any representation made that this information can guarantee profits in any business undertaken by the subscriber. Past performance is NOT a guide as to future performance. Only risk capital should be used in the futures markets. NO FUTURES market trades will be advised. No one should take any of the information presented as an implied investment recommendation. All investments and trades carry risk and all business decisions of an individual are solely the responsibility of that individual.</p>
</div>
</div>
<fieldset>
<ol class="group">
<li><h4>Total: {cart_total} <i>(with tax)</i></h4></li>
<li><button type="submit">Process My Order</button></li>
</ol>
</fieldset>
{/exp:cartthrob:checkout_form}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment