Skip to content

Instantly share code, notes, and snippets.

Nick Toye NickToye

Block or report user

Report or block NickToye

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2277852
<?
$image_url = $product->image_url(100,100,true, $params = array(
'im_process'=>true,
'size_name'=>'cropped_100',
'cmd'=>'-resize 100x100^ - gravity center -extent 100x100'));
?>
View gist:2322497
<div id="write_review" class="clearfix">
<? if (isset($review_posted)): ?>
<p class="flash success">Your taste review has been successfully posted.</p>
<? else: ?>
<h3 id="review_link" class="clearfix"><a href="#" onclick="$('#review_form').removeClass('hidden'); $('#review_link').addClass('hidden'); return false;">Write Your Taste Review</a></h3>
<div id="review_form" class="hidden bottom_offset">
<ul class="form">
<li class="field">
<label><span class="label">Rating</span>
@NickToye
NickToye / Change Account block
Created Apr 9, 2012
block_change_account.htm
View Change Account block
<div id="change_account" class="accounts col span_8">
<?= open_form() ?>
<ul class="form">
<li class="field text left">
<label for="first_name">First Name <span class="required">*</span></label>
<div class="text-box"><input id="first_name" name="first_name" type="text" value="<?= $this->customer->first_name ?>" /></div>
</li>
<li class="field text right">
<label for="last_name">Last Name <span class="required">*</span></label>
<div class="text-box"><input id="last_name" name="last_name" type="text" value="<?= $this->customer->last_name ?>" /></div>
@NickToye
NickToye / Change Information block
Created Apr 9, 2012
block_change_information.htm
View Change Information block
<?
$billing_info = Shop_CheckoutData::get_billing_info();
$billing_countries = Shop_Country::get_list($billing_info->country);
$billing_country = $billing_info->country ? $billing_info->country : $billing_countries[0]->id;
$billing_states = Shop_CountryState::create(true)->where('country_id=?', $billing_country)->order('name')->find_all();
?>
<div id="change_information" class="accounts col span_8">
<?= open_form(array('id' => 'billing_info')) ?>
<h3 class="block">Billing Information</h3>
<ul class="form billing_info">
@NickToye
NickToye / Change Shipping block
Created Apr 9, 2012
block_change_shipping.htm
View Change Shipping block
<?
$shipping_info = Shop_CheckoutData::get_shipping_info();
$shipping_countries = Shop_Country::get_list($shipping_info->country);
$shipping_country = $shipping_info->country ? $shipping_info->country : $shipping_countries[0]->id;
$shipping_states = Shop_CountryState::create(true)->where('country_id=?', $shipping_country)->order('name')->find_all();
?>
<div id="change_shipping" class="accounts col span_8">
<h3 class="block left">Shipping Information <a href="javascript:;" onclick="return $('#billing_info').sendRequest('profile:on_updateBilling', {
onSuccess: function() {
LS.sendRequest('<?= Phpr::$request->getCurrentUri() ?>', 'profile:on_copyBillingToShipping', {
@NickToye
NickToye / View Orders block
Created Apr 9, 2012
block_view_orders.htm
View View Orders block
<div id="view_orders" class="accounts col span_8">
<?= open_form() ?>
<? if(!$orders->count): ?>
<p>No orders yet.</p>
<? else: ?>
<p>Click an order for details.</p>
<table>
<thead>
<tr>
<th class="first"></th>
View Account page
<?
extract(array_merge(array(
'partial_step' => post('partial_step', false),
'section' => post('section', 'change_information') //defaults to the change_information section
), $params));
?>
<div id="account_page" class="col span_12">
<h2>My Account</h2>
View gist:2343098
<?
extract(array_merge(array(
'partial_step' => post('partial_step', false),
'section' => post('section', 'change_information') //defaults to the change_information section
), $params));
?>
<div id="account_page" class="col span_12">
<h2>My Account</h2>
View gist:2388087
<ul><? $this->render_partial('nav:customer_services') ?></ul>
// nav:customer_services
<?
$customer_services_page = Cms_Page::create()->find_by_url('/customer-services');
$this->render_partial('nav:sitemap_pages', array('pages'=>$customer_services_page->navigation_subpages()))
?>
View gist:2413569
<fieldset class="col span_12">
<input type="submit" class="btn" onclick="return $(this).getForm().sendRequest('profile:on_updatePassword', {
extraFields: {'no_flash': true},
onSuccess: function() {
alert('Done');
}
})" value="Save" />
</fieldset>
You can’t perform that action at this time.