I hereby claim:
- I am brianweiner on github.
- I am brianweiner (https://keybase.io/brianweiner) on keybase.
- I have a public key ASAX9LrQjmZZftaSPZnI6FHbiJKG_ZjxlxxVGI5Ej3xCdwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$(document).ready(function() { | |
$("#search-filter").bind("submit", function(event){ | |
event.preventDefault(); | |
$.ajax({ | |
url: '/ajax/search', | |
data: $(this).getForm().serialize(), | |
success: function(data){$('#product-list').html(data)}, | |
dataType: 'html' | |
}); | |
}); |
<!-- FIND CATEGORY --> | |
{% if selected_categories is defined %} | |
{% set current_category = method('Extensions320ny_Shop_Category', 'create').find_by_id(selected_categories[0]) %} | |
{% else %} | |
{% set current_category = category ? category : product.list_categories[0] %} | |
{% endif %} | |
<form id="search-filter" method="get" action="/search"> | |
<input type="hidden" name="query" value="{{ query ? query: '' }}"> | |
<!-- CATEGORIES --> | |
{% set categories = method('Shop_Category', 'create').list_root_children('front_end_sort_order') %} |
<section class="search-filter pull-left clearfix"> | |
<!-- FIND CATEGORY --> | |
{% if selected_categories is not defined %} | |
{% set my_cat = category ? method('Extensions320ny_Shop_Category', 'create').find_by_id(category.id) : ''%} | |
{% set selected_categories = category ? [category.id] : [] %} | |
{% endif %} | |
<form id="search-filter" method="get" action="/search"> | |
<input type="hidden" name="query" value="{{ query ? query: '' }}"> |
$(document).ready(function() { | |
$("#payment-form").submit(function(event) { | |
// disable the submit button to prevent repeated clicks | |
$('.submit-button').attr("disabled", "disabled"); | |
Stripe.createToken({ | |
number: $('.card-number').val(), | |
cvc: $('.card-cvc').val(), | |
exp_month: $('.card-expiry-month').val() || "0", | |
exp_year: $('.card-expiry-year').val() || "0" |
function stripeResponseHandler(status, response) { | |
if (response.error) { | |
... | |
// show the errors on the form | |
$(".payment-errors").text(response.error.message); | |
$(".submit-button").removeAttr("disabled"); | |
} else { | |
var form$ = $("#payment-form"); | |
// token contains id, last4, and card type | |
var token = response['id']; |
$(document).ready(function() { | |
$("#payment-form").submit(function(event) { | |
// disable the submit button to prevent repeated clicks | |
$('.submit-button').attr("disabled", "disabled"); | |
Stripe.createToken({ | |
number: $('.card-number').val(), | |
cvc: $('.card-cvc').val(), | |
exp_month: $('.card-expiry-month').val(), | |
exp_year: $('.card-expiry-year').val() |
<h4>Size</h4> | |
{% set option_values = category ? my_cat.list_unique_product_option_values('Size') : method('Shop_CustomAttribute','list_unique_values','Size') %} | |
{% set selected_size = selected_options['Size'] ? selected_options['Size'] : [] %} | |
<input type="hidden" name="option_names[]" value="Size"/> | |
<select style="display:none" id="size-select" class="search-filter-select" name="option_values[]"> | |
<option value=""><strong>Choose Size</strong></option> | |
{% for value in option_values %} | |
<option | |
{{ option_state(value, attribute(selected_options, 'Size')) }} |