Skip to content

Instantly share code, notes, and snippets.

{
"name": "anon",
"version": "1.0.0",
"description": "Anon package.json file, very basic",
"author": "Nick Toye <nick.toye@anon.co.uk>",
"scripts": { "test": "node test/all.js" },
"main": "Gruntfile.js",
"repository": {
"type": "git",
"url": "http://gitlab.sofaworks.co.uk/nick.toye/sw-mercury.git"
<?
$image_url = $product->image_url(100,100,true, $params = array(
'im_process'=>true,
'size_name'=>'cropped_100',
'cmd'=>'-resize 100x100^ - gravity center -extent 100x100'));
?>
<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 Information block
Created April 9, 2012 11:08
block_change_information.htm
<?
$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 Account block
Created April 9, 2012 11:07
block_change_account.htm
<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 Shipping block
Created April 9, 2012 11:08
block_change_shipping.htm
<?
$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 April 9, 2012 11:09
block_view_orders.htm
<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>
@NickToye
NickToye / Account page
Created April 9, 2012 11:10
page_account.htm
<?
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>
<?
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>
<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()))
?>