Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/theyoungdesigners_com/modules/store/view/ |
Upload File : |
<?php
// everything to do with the enduser experience
class StoreClient_View extends View {
// the basic product
// this is extended by any of the store modules
// /site/best-buy-50-best-buy-balloons-gift-card/6492280.p?skuId=6492280
// COL0 = header - eg breadcrumbs
// COL1 = left column - images - about - etc
// COL2 = right column - manufacturer, product, sku, ratings, price, variations
/*
<div class="about-this-item lv mb-200">
<h2 class="description-title heading-5 font-500 leading-8" style="color:#000">About this item</h2>
<div class="description-text lv text-style-body-lg-400" style="line-height:1.6">
<p>{{about}}<!-- --> </p>
</div>
</div>
*/
public function store_product() {
// does not include breadcrumb
// pb-200 line will contain link to the seller page - with grid
$html = <<<BLOCK
<form id="storeform" method="post">
<!-- [COL0] -->
<div class="product-container">
<div class="column column-left">
<!-- [COL1] -->
</div>
<div class="column column-right">
<div class="shop-product-title">
<div class=" ">
<div class="pb-200">
{{sm_caption}}
</div>
<div class="sku-title" itemprop="name">
<h1 class="heading-5 v-fw-regular">{{sp_product}}</h1>
</div>
<div class=" title-data lv">
<div class="w-full py-100 px-none data-section">
{{#if sp_model}}
<div class="model product-data pr-100 inline-block border-box ">
<span class="body-copy product-data-label text-info mr-50">
<strong>Model</strong>:
</span>
<span class="product-data-value body-copy">{{sp_model}}</span>
</div>
{{/if}}
<div class="sku product-data pr-100 inline-block border-box ">
<span class="body-copy product-data-label text-info mr-50">
<strong>SKU</strong>:
</span>
<span class="product-data-value body-copy">{{sp_sku}}</span>
</div>
</div>
</div>
</div>
</div>
<!-- [COL2] -->
</div>
</div>
</form>
BLOCK;
$html = hook_execute('template.store.product.COL0', $html); // update the html template for enabled features
$html = hook_execute('template.store.product.COL1', $html);
$html = hook_execute('template.store.product.COL2', $html);
$this('store_product')->html($html);
}
public function store_category() {
$price = $this->Column2Text();
// three products per row
$html = <<<BLOCK
<h3>{{page_title}}</h3>
<!-- [COL1] -->
<div class="productlist-container">
{{#each product}}
<div class="product-item">
<a href="{{uri}}" class="product-link" target="product"></a>
<div class="product-image">
<img src="{{thumb}}" width="100%">
</div>
<div class="product-text">
{{sp_product}}
</div>
<!-- [COL2] -->
$price
<!-- [COL3] -->
</div>
{{/each}}
</div>
BLOCK;
$html = hook_execute('template.store.category.COL1', $html); // sponsored etc. Short product info/quick look?
$html = hook_execute('template.store.category.COL2', $html); // rating, number purchased
$html = hook_execute('template.store.category.COL3', $html); // freight options
$this('store_category')->html($html);
}
public function UpdateHTML(&$html, $needle, $replacement) {
$needle = "<!-- [{$needle}] -->";
$q = 0;
while(($p = strpos($html, $needle, $q)) !== FALSE) {
$html = substr($html, 0, $p) . $replacement . substr($html, $p);
$q = $p + strlen($replacement) + strlen($needle);
}
}
public function Column1Text() {
return <<<'BLOCK'
<div class="about-this-item lv mb-200">
<h2 class="description-title heading-5 font-500 leading-8" style="color:#000">About this item</h2>
<div class="description-text lv text-style-body-lg-400" style="line-height:1.6">
<p>{{{sp_desc}}}</p>
</div>
</div>
BLOCK;
// <!-- -->
}
public function Column2Text() {
$html = <<<'BLOCK'
{{#if @root/priceformat}}
<div class="a-section a-spacing-none aok-align-center aok-relative">
<span class="aok-offscreen"> ${{price.full}} </span>
<span class="a-price aok-align-center priceToPay"><span class="a-offscreen"> </span><span aria-hidden="true"><span class="a-price-symbol">$</span><span class="a-price-whole">{{price.whole}}<span class="a-price-decimal">.</span></span><span class="a-price-fraction">{{price.frac}}</span></span></span>
<!-- [COL9] -->
</div>
{{else}}
<div class="priceView-hero-price" data-testid="customer-price" tabindex="-1">
<span aria-hidden="true">${{price.full}}</span>
<span class="sr-only">Your price for this item is $
<!-- -->{{price.full}}
</span>
<!-- [COL9] -->
</div>
{{/if}}
BLOCK;
$html = hook_execute('template.store.product.COL9', $html);
return $html;
}
public function Column2AddToCart() {
return <<<'BLOCK'
<input type="hidden" name="product" value="{{sp_id}}">
<div class="row mt-500">
<div class="col-xs-9">
<div>
{{#compare stock ">" 9}}
<button class="c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading action-addcart" type="button" {{{a2c_extra}}} style="padding:0 8px;margin-bottom:8px;margin-left:0px">
<svg aria-hidden="true" role="img" viewBox="0 0 100 100" style="width:16px;height:16px;fill:currentColor;position:relative;margin-right:9px;top:min(0px, max(-8px, calc(100vw - 0px)))">
<svg
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve">
<path d="M31.75 7.39a1.2 1.2 0 0 0-.96-.48H6.75L6 4.11a1.2 1.2 0 0 0-1.17-.9H1.21a1.2 1.2 0 1 0 0 2.41h2.7l4.35 16.24c.14.52.62.9 1.16.9h17.35a1.2 1.2 0 0 0 0-2.42H10.35l-.76-2.82h18.97a1.2 1.2 0 0 0 1.16-.9l2.24-8.18c.1-.36.02-.75-.2-1.05M13.13 23.96a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83m10.95 0a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83"></path>
</svg>
</svg>Add to Cart
</button>
{{else}}{{#compare stock ">" 0}}
<div class="cart-available">Quantity Available: <span>{{stock}}</span></div>
<button class="c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading action-addcart" type="button" {{{a2c_extra}}} style="padding:0 8px;margin-bottom:8px;margin-left:0px">
<svg aria-hidden="true" role="img" viewBox="0 0 100 100" style="width:16px;height:16px;fill:currentColor;position:relative;margin-right:9px;top:min(0px, max(-8px, calc(100vw - 0px)))">
<svg
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve">
<path d="M31.75 7.39a1.2 1.2 0 0 0-.96-.48H6.75L6 4.11a1.2 1.2 0 0 0-1.17-.9H1.21a1.2 1.2 0 1 0 0 2.41h2.7l4.35 16.24c.14.52.62.9 1.16.9h17.35a1.2 1.2 0 0 0 0-2.42H10.35l-.76-2.82h18.97a1.2 1.2 0 0 0 1.16-.9l2.24-8.18c.1-.36.02-.75-.2-1.05M13.13 23.96a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83m10.95 0a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83"></path>
</svg>
</svg>Add to Cart
</button>
{{else}}
<div class="cart-available">Out of Stock</div>
<button class="c-button c-button-disabled c-button-lg c-button-block c-button-icon c-button-icon-leading " type="button" {{{a2c_extra}}} style="padding:0 8px;margin-bottom:8px;margin-left:0px">
<svg aria-hidden="true" role="img" viewBox="0 0 100 100" style="width:16px;height:16px;fill:currentColor;position:relative;margin-right:9px;top:min(0px, max(-8px, calc(100vw - 0px)))">
<svg
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve">
<path d="M31.75 7.39a1.2 1.2 0 0 0-.96-.48H6.75L6 4.11a1.2 1.2 0 0 0-1.17-.9H1.21a1.2 1.2 0 1 0 0 2.41h2.7l4.35 16.24c.14.52.62.9 1.16.9h17.35a1.2 1.2 0 0 0 0-2.42H10.35l-.76-2.82h18.97a1.2 1.2 0 0 0 1.16-.9l2.24-8.18c.1-.36.02-.75-.2-1.05M13.13 23.96a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83m10.95 0a2.42 2.42 0 1 0 0 4.83 2.42 2.42 0 0 0 0-4.83"></path>
</svg>
</svg>Add to Cart
</button>
{{/compare}}
{{/compare}}
</div>
</div>
<!-- [COL2B] -->
</div>
BLOCK;
}
/*
<div class="col-xs-3">
<div class="shop-save-for-later">
<button class="c-button-unstyled flex align-items-center justify-content-center rounded-full" type="button" aria-label="Save" style="border: 1px solid rgb(197, 203, 213); border-radius: 4px; height: 45px; width: 100%;">
<svg
xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 24 24" aria-hidden="true" role="img" class="heart-svg" fill="#1d252c" height="18" width="18" style="">
<path d="M12 22.03c-.2 0-.4-.08-.54-.23l-8.55-8.9a5.997 5.997 0 0 1 .21-8.5 5.96 5.96 0 0 1 4.3-1.65 6 6 0 0 1 4.59 2.31 5.934 5.934 0 0 1 4.57-2.3c1.61-.03 3.13.55 4.3 1.65a5.96 5.96 0 0 1 1.87 4.21 5.96 5.96 0 0 1-1.66 4.29l-8.55 8.89c-.14.15-.34.23-.54.23M7.26 4.24c-1.16 0-2.26.44-3.1 1.24-.87.83-1.37 1.95-1.4 3.16s.41 2.35 1.24 3.22l8 8.34 8.01-8.33c.83-.87 1.27-2.02 1.24-3.22a4.48 4.48 0 0 0-1.41-3.16 4.49 4.49 0 0 0-3.23-1.24c-1.2.03-2.32.53-3.15 1.4-.31.33-.58.71-.79 1.14-.13.26-.39.42-.67.42a.74.74 0 0 1-.67-.42c-.2-.41-.46-.79-.8-1.15-.82-.87-1.94-1.36-3.15-1.4z"></path>
</svg>
<span class="pl-50 v-text-tech-black font-weight-medium">Save</span>
</button>
</div>
</div>
*/
public function AsMenu($menu) {
$output = '';
foreach($menu as $item) {
if ($output != '') $output .= ' // ';
$safecaption = htmlspecialchars($item['caption']);
$safehref = htmlspecialchars($item['href']);
if (!empty($item['hint'])) {
$safehint = htmlspecialchars($item['hint']);
$output .= "<a href=\"$safehref\" title=\"$safehint\">$safecaption</a>";
} else {
$output .= "<a href=\"$safehref\">$safecaption</a>";
}
}
return $output;
}
// cart data for this page is taken from the session
public function store_cart() {
$html = <<<'BLOCK'
<form id="storeform" method="post"><div class="cart-wrapper">
<div class="cart-left">
<h3>Shopping Cart</h3>
{{#if totalqty}}
<div class="a-row">
<div class="a-column a-span10"></div>
<div class="a-column a-span2 a-text-right a-spacing-top-micro a-span-last">
<span class="a-color-secondary">Price</span>
</div>
</div>
<div class="a-section a-spacing-mini sc-list-body sc-java-remote-feature">
{{#each cart}}
<div class="shop-container" data-id="{{product}}" data-custom="{{custom}}">
<div class="shop-photo">
<img src="{{thumb}}">
</div>
<div class="shop-content">
<div class="desc"><a href="{{uri}}">{{description}}</a></div>
<!-- [COL2] -->
<div class="shop-item-links">
<span class="sc-action-quantity" data-old-value="{{count}}">
<span class="a-dropdown-container {{#compare count ">" 9}} sc-hidden{{/compare}}">
<label for="quantity" class="a-native-dropdown sc-update-quantity-select">Qty:<span class="sc-offscreen-label" aria-label="Quantity"></span></label>
<span tabindex="-1" class="action-dropdown a-button a-button-dropdown quantity" aria-hidden="true"><span class="a-button-inner"><span class="a-button-text a-declarative" aria-hidden="true"><span class="a-dropdown-label">Qty:<span class="sc-offscreen-label" aria-label="Quantity"></span></span><span class="a-dropdown-prompt">{{count}}</span></span>
<i class="fas fa-chevron-down"></i></span></span>
</span>
<span class="sc-action-input{{#compare count "<" 10}} sc-hidden{{/compare}}">
<input type="text" maxlength="3" value="{{count}}" autocomplete="off" name="quantityBox" class="a-input-text a-width-small a-spacing-mini sc-quantity-textfield sc-update-quantity-input" data-feature-id="sc-update-quantity-input" aria-label="Quantity" style="width:60px">
<span class="a-spacing-top-small">
<span class="a-button a-button-primary a-button-small sc-update-link"><span class="a-button-inner">
<a href="#" class="a-button-text action-quantity">Update</a>
</span></span></span>
</span>
</span>
<span><a class="action-delete" href="#">Delete</a></span><!-- [COL3] --></div>
</div>
<div class="shop-pricing">
${{full}}
</div>
</div>
{{/each}}
</div>
<div class="a-text-right a-subtotal">
<span class="a-size-medium">Subtotal <span class="item-count">({{itemcount}})</span>:</span> <span class="a-text-bold a-size-medium sc-white-space-nowrap">${{subtotal}}</span>
</div>
{{else}}
<p class="message-empty">Your shopping cart is empty</p>
{{/if}}
</div>
<div class="cart-right">
<div class="a-subtotal"><span class="a-size-medium">Subtotal <span class="item-count">({{itemcount}})</span>:</span> <span class="a-text-bold a-size-medium sc-white-space-nowrap">${{subtotal}}</span></div>
<!-- [COL4] -->
</div>
</div></form>
BLOCK;
// <span>Save For Later</span><span>Share</span>
// add coupon code
$html = hook_execute('template.store.cart.COL2', $html);
$html = hook_execute('template.store.cart.COL2B', $html);
$html = hook_execute('template.store.cart.COL3', $html);
$html = hook_execute('template.store.cart.COL4', $html);
$this('store_cart')->html($html)->Title('Cart');
}
public function Column4Text_checkout() {
return <<<'BLOCK'
{{#if totalqty}}
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading action-addcart"
href="/store/checkout" style="padding:0 8px;margin-bottom:8px;margin-left:0px">
Proceed to checkout
</a>
</div>
{{else}}
<div style="margin-top: 20px">
<a class="c-button c-button-secondary c-button-lg c-button-block c-button-icon c-button-icon-leading action-addcart"
href="/" style="padding:0 8px;margin-bottom:8px;margin-left:0px">
Continue Shopping
</a>
</div>
{{/if}}
BLOCK;
}
// this will be displayed inline if no addresses present, or only 1
// otherwise there will be a summary with the option to edit/add addresses
// and this html will be used in a popup
private function _address($prefix = '') {
return <<<BLOCK
<div class="bind-address" data-address="#{$prefix}del_a,#{$prefix}town,#{$prefix}state,#{$prefix}zip,#{$prefix}country" data-format="short" data-next="#{$prefix}addr2">
{{#if ro_address}}<input type="hidden" name="ro_address" value="1">{{/if}}
<div class="control-group sp-name required">
<label for="{$prefix}name">Name</label>
<div class="controls"><input class="required{{#if ro_address}} readonly{{/if}}"{{#if ro_address}} readonly{{/if}} id="{$prefix}name" name="name" size="30" type="text" value="{{name}}"></div>
<div class="status-message" for="{$prefix}name"></div>
</div>
<div class="control-group sp-addr1 required">
<label for="{$prefix}del_a">Delivery Add<span></span>ress</label>
<div class="controls"><input class="required{{#if ro_address}} readonly{{/if}}"{{#if ro_address}} readonly{{/if}} id="{$prefix}del_a" name="del_a" size="30" type="text" value="{{del_a}}" autocomplete="off" ></div>
<div class="status-message" for="{$prefix}del_a"></div>
</div>
<div class="control-group sp-addr2">
<label for="{$prefix}addr2">Apartment / Unit / Suite</label>
<div class="controls"><input id="{$prefix}addr2"{{#if ro_address}} class="readonly" readonly{{/if}} name="addr2" size="30" type="text" value="{{addr2}}"></div>
<div class="status-message" for="{$prefix}addr2"></div>
</div>
<div>
<div class="control-group sp-town" style="width:300px;display:inline-block;margin-right:20px;">
<label for="{$prefix}town">City/Town</label>
<div class="controls"><input id="{$prefix}town" {{#if ro_address}} class="readonly" readonly{{/if}} name="town" size="30" type="text" value="{{town}}"></div>
<div class="status-message" for="{$prefix}town"></div>
</div>
<div class="control-group sp-state" style="width:200px;display:inline-block;margin-right:20px;">
<label for="{$prefix}state">State</label>
<div class="controls"><input id="{$prefix}state"{{#if ro_address}} class="readonly" readonly{{/if}} name="state" size="30" type="text" value="{{state}}"></div>
<div class="status-message" for="{$prefix}state"></div>
</div>
<div class="control-group sp-zip" style="width:150px;display:inline-block;">
<label for="{$prefix}zip">Zip</label>
<div class="controls"><input id="{$prefix}zip"{{#if ro_address}} class="readonly" readonly{{/if}} name="zip" size="30" type="text" value="{{zip}}"></div>
<div class="status-message" for="{$prefix}zip"></div>
</div>
</div>
<!-- no large items to po boxes -->
<div class="control-group sp-country">
<label for="{$prefix}country">Country</label>
<div class="controls"> <!-- {{@root/country}} -->
<select id="{$prefix}country" name="country"{{#if ro_address}} class="readonly" readonly{{/if}}>
{{#each list_country}}<option value="{{key}}"{{#ifeq key @root/country}} selected{{/ifeq}}>{{value}}</option>{{/each}}
</select>
</div>
<div class="status-message" for="{$prefix}country"></div>
</div>
</div>
BLOCK;
}
private function freight_panel() {
return <<<BLOCK
<form id="freight_info" method="post" class="frm">
<input type="hidden" name="action" value="freight">
{{#each service}}<div class="service-container row">
<div class="col-xs col-xs-3" style="width: 40px; align-self: center;">
<input type="radio" name="freight" value="{{key}}" id="id_{{key}}"{{#ifeq key @root/freight}} checked{{/ifeq}}>
</div>
<div class="col-xs col-xs-9 name-class">
<label for="id_{{key}}">{{caption}}</label>
</div>
<div class="col-xs col-xs-2 text-class">
<label for="id_{{key}}">{{cost}}</label>
</div>
</div>{{/each}}
</form>
BLOCK;
}
private function delivery_panel() {
$address = $this->_address(); // action-next action-addcart
return <<<BLOCK
<form id="delivery_addr" method="post" autocomplete="off" class="frm json">
<input type="hidden" name="action" value="delivery">
<input type="hidden" name="type" value="{{single}}">
{{#if single}}
<input type="hidden" name="guid" value="{{guid}}">
$address
<div class="row">
<div class="col-xs-9">
</div>
{{#if ro_address}}
<div class="col-xs-3" style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading action-next" data-next="freight"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">
Next
</a>
</div>
{{else}}
<div class="col-xs-3" style="margin-top: 20px">
<a class="submit c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">
Save Address
</a>
</div>
{{/if}}
</div>
{{else}}
<!-- list possible addresses -->
{{#each list_address}}
<div class="address-container row">
<div class="col-xs" style="width: 40px; align-self: center;">
<input type="radio" name="address" value="{{guid}}" id="id_{{guid}}"{{#ifeq guid @root/default}} checked{{/ifeq}}>
</div>
<div class="col-xs" style="width: 600px;" >
<label for="id_{{guid}}">
<div class="name-class">{{name}}</div>
<div class="text-class">{{text}}</div>
</label>
<div class="text-class"><a class="json-request" href="/store/checkout/edit-address/{{guid}}">Edit address</a></div>
</div>
</div>
{{/each}}
{{/if}}
{{#if can_add}}{{#unless ro_delivery}}
<div><a class="json-request" href="/store/checkout/new-address">Add a new delivery address</a></div>
{{/unless}}{{/if}}
</form>
BLOCK;
}
// cart data for this page is taken from the order table
public function store_checkout() {
hook_execute('component.add', FALSE, 'address');
$panel = $this->delivery_panel();
$freight = $this->freight_panel();
$subtotal = $this->subtotal_panel();
// {{#unless user.level}} {{/unless}}
$html = <<<BLOCK
<div class="product-container">
<div class="column column-left">
<h3>Checkout</h3>
<div class="bind-accordion">
<h3 data-tab="account">Account</h3>
<div>
<form id="account_info" method="post" class="frm">
<input type="hidden" name="action" value="account">
{{#if ro_account}}<input type="hidden" name="ro_account" value="1">{{/if}}
<div class="account-container">
<div class="column column-left">
{{#unless user.level}}
<div class="column-header">New Customer</div>
{{/unless}}
<div class="control-group sp-name required">
<label for="ac_name">Name</label>
<div class="controls"><input class="required{{#if ro_account}} readonly{{/if}}"{{#if ro_account}} readonly{{/if}} id="ac_name" name="ac_name" size="30" type="text" value="{{ac_name}}"></div>
<div class="status-message" for="ac_name"></div>
</div>
<div class="control-group sp-email required">
<label for="ac_email">Email</label>
<div class="controls"><input class="required{{#if ro_account}} readonly{{/if}}"{{#if ro_account}} readonly{{/if}} id="ac_email" name="ac_email" size="30" type="text" value="{{ac_email}}"></div>
<div class="status-message" for="ac_email"></div>
</div>
{{#if physical}}
<div class="row">
<div class="col-xs-6"></div><div class="col-xs-6">
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block action-next" data-next="delivery"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
</div>
</div>
</div>
{{else}}
{{#if hide_payment}}
<div class="row">
<div class="col-xs-6"></div><div class="col-xs-6">
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block action-next" data-next="confirm"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
</div>
</div>
</div>
{{else}}
<div class="row">
<div class="col-xs-6"></div><div class="col-xs-6">
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block action-next" data-next="payment"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
</div>
</div>
</div>
{{/if}}
{{/if}}
</div>
{{#unless user.level}}
<div class="column column-right">
<div class="column-header">Existing Account</div>
<div>Use your existing <strong>Google</strong> or <strong>{{@root/host}}</strong> account</div>
<div>{{#each list_login}}
{{#if button}}
{{{button}}}
{{else}}
<a class="icon-login icon-{{cat}} {{className}}" href="{{href}}" title="{{hint}}">{{{icon}}}</a>
{{/if}}
{{/each}}</div>
</div>
{{/unless}}
</div>
</form>
</div>
{{#if physical}}
<h3 data-tab="delivery">Delivery Address</h3>
<div>
<div id="panel_delivery">
{$panel}
</div>
{{#unless single}}
<div class="row">
<div class="col-xs-9"></div><div class="col-xs-3">
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block action-next" data-next="freight"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
</div>
</div>
</div>
{{/unless}}
</div>
<h3 data-tab="freight">Freight</h3>
<div>
<div id="panel_freight">
{$freight}
</div>
<div class="row">
<div class="col-xs-9"></div><div class="col-xs-3">
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block action-next"
{{#if hide_payment}}data-next="confirm"{{else}}data-next="payment"{{/if}}
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
</div>
</div>
</div>
</div>
{{/if}}
{{#unless hide_payment}}
<h3 data-tab="payment">Payment</h3>
<div>
<input type="hidden" name="action" value="payment">
<!-- [COL5] -->
<div class="row payment-row">
<div class="col-xs-9">
<!-- [COL6] -->
</div><div class="col-xs-3">
<div style="margin-top: 20px">
{{#if custom_payment}}
<!-- [COL7] -->
{{else}}
<a id="button_payment" class="c-button c-button-primary c-button-lg c-button-block action-next" data-next="confirm"
href="#" style="padding:0 8px;margin-bottom:8px;margin-left:0px">Next</a>
{{/if}}
</div>
</div>
</div>
</div>
{{/unless}}{{#unless hide_confirm}}
<h3 data-tab="confirm">Confirm Order</h3>
<div>
<form method="post" class="frm json">
<input type="hidden" name="action" value="confirm">
<!-- <div class="control-group cf-checkbox">
<label> </label>
<div class="controls">
<div class="control-checkbox" style="width:520px">
<input type="checkbox" id="o_newsletter" name="o_newsletter" value="1"{{#if o_newsletter}} checked{{/if}}>
<label for="o_newsletter">Sign up for our free newsletters and promotions</label>
</div>
</div>
</div> -->
<div class="control-group cf-checkbox">
<label> </label>
<div class="controls">
<div class="control-checkbox" style="width:520px">
<input type="checkbox" id="o_terms" name="o_terms" value="1"{{#if o_terms}} checked{{/if}}>
<label for="o_terms">I have read the <a href="/store/terms-and-conditions" target="_blank">Terms and Conditions</a></label>
</div>
</div>
</div>
<div style="margin-top: 20px">
<a class="c-button c-button-primary c-button-lg c-button-block c-button-icon c-button-icon-leading submit"
href="/store/checkout" style="padding:0 8px;margin-bottom:8px;margin-left:0">
Place Order
</a>
</div>
</form>
{{#ifeq method "paypal"}}
<p>Your Paypal account will only be charged when the order is shipped.</p>
{{else}}
<p>Your Credit/Debit card will only be charged when the order is shipped.</p>
{{/ifeq}}
</div>
{{/unless}}
</div>
</div>
<div id="panel_subtotal" class="column column-right">
<div id="subtotals">
{$subtotal}
</div>
<!-- [COL2] -->
</div>
</div>
BLOCK;
$html = hook_execute('template.store.checkout.COL2', $html);
$html = hook_execute('template.store.checkout.COL5', $html); // payment
$html = hook_execute('template.store.checkout.COL6', $html);
$html = hook_execute('template.store.checkout.COL7', $html); // payment button
$this('store_checkout')->html($html)->Title('Checkout');
/* we don't add sales tax, since turnover < $100K
{{#unless physical}}
<div class="control-group sp-country">
<label for="country">Country</label>
<div class="controls">
<select id="country" name="country"{{#if ro_account}} class="readonly" readonly{{/if}}>
{{#each list_country}}<option value="{{key}}"{{#ifeq key @root/country}} selected{{/ifeq}}>{{value}}</option>{{/each}}
</select>
</div>
<div class="status-message" for="country"></div>
</div>
<div class="control-group sp-postcode" style="width:150px">
<label for="postcode">Zip / Postcode</label>
<div class="controls"><input id="postcode" {{#if ro_account}} class="readonly" readonly{{/if}} name="postcode" size="30" type="text" value="{{postcode}}"></div>
<div class="status-message" for="postcode"></div>
</div>
<p>Your Country and Zip/Postcode are used to determine taxes.</p>
{{/unless}}
*/
}
private function subtotal_panel() {
return <<<BLOCK
<div class="subtotal-frame">
<div class="a-subtotal"><span class="a-size-medium col1">Subtotal <span class="item-count">({{itemcount}})</span>:</span><span class="a-size-medium sc-white-space-nowrap col2">\${{subtotal}}</span></div>
{{#each extras}}
<div class="a-subtotal"><span class="a-size-medium col1">{{desc}}:</span><span class="a-size-medium sc-white-space-nowrap col2">{{display}}</span></div>
{{/each}}
{{#if showtax}}
{{#if taxable}}
<div class="a-subtotal"><span class="a-size-medium col1">Freight:</span><span class="a-size-medium sc-white-space-nowrap col2">{{freightcharge}}</span></div>
<div class="a-subtotal"><span class="a-size-medium col1">Tax:</span><span class="a-size-medium sc-white-space-nowrap col2">{{tax}}</span></div>
{{else}}
<div class="a-subtotal"><span class="a-size-medium col1">Tax:</span><span class="a-size-medium sc-white-space-nowrap col2">{{tax}}</span></div>
<div class="a-subtotal"><span class="a-size-medium col1">Freight:</span><span class="a-size-medium sc-white-space-nowrap col2">{{freightcharge}}</span></div>
{{/if}}
{{else}}
<div class="a-subtotal"><span class="a-size-medium col1">Freight:</span><span class="a-size-medium sc-white-space-nowrap col2">{{freightcharge}}</span></div>
{{/if}}
<div class="a-subtotal"><span class="a-size-medium col1">Total:</span><span class="a-text-bold a-size-medium sc-white-space-nowrap col2">{{total}}</span></div>
</div>
BLOCK;
}
// generate the login popup
public function login_email() {
hook_execute('component.add', FALSE, 'formedit');
$html = <<<BLOCK
<form class="frm" accept-charset="UTF-8" autocomplete="off" method="post" id="login_form" action="/~/loginEmail/login">
{{> formedit}}
<div class="form-options">
<div class="option-left">
<a href="/~/loginEmail/forgot-password" rel="nofollow">Forgot Password?</a><br>
<a href="/~/loginEmail/register" rel="nofollow">Register</a>
</div>
</div>
</form>
BLOCK;
$this('login_email')->html($html);
}
public function store_address() {
hook_execute('component.add', FALSE, 'address');
$address = $this->_address('p_');
$html = <<<BLOCK
<form id="delivery_addr" method="post" autocomplete="off" class="frm json">
<input type="hidden" name="guid" value="{{guid}}">
<input type="hidden" name="action" value="delivery">
<input type="hidden" name="type" value="1">
$address
{{#unless single}}
<div class="control-group cf-checkbox">
<label> </label>
<div class="controls">
<div class="control-checkbox" style="width:520px">
<input type="checkbox" id="default" name="default" value="1"{{#ifeq guid default}} checked{{/ifeq}}>
<label for="default">Set as Default Address</label>
</div>
</div>
</div>
{{/unless}}
</form>
BLOCK;
$this('store_address')->html($html);
}
public function store_panel() {
hook_execute('component.add', FALSE, 'address');
$html = $this->delivery_panel();
$this('store_panel')->html($html);
}
public function store_panel_freight() {
$html = $this->freight_panel();
$this('store_panel_freight')->html($html);
}
public function store_panel_subtotal() {
$html = $this->subtotal_panel();
$this('store_panel_subtotal')->html($html);
}
public function store_confirm() {
hook_execute('component.add', FALSE, 'password');
$button = hook_execute_late('html.button', '', 'Set Password', 'fas fa-key', 'cc-blue');
$html = <<<BLOCK
<h3>Order placed, thanks!</h3>
<p>Confirmation will be sent to your email.</p>
<p><b>Shipping to {{name}},</b> {{address}}</p>
<hr>
<p><b>{{estimated}}</b><br>
Estimated delivery</p>
<div>
<div class="order-flex">
{{#each cart}}
<div class="order-item">
{{#if qty}}<span class="bubble">{{qty}}</span>{{/if}}
<img src="{{thumb}}">
</div>
{{/each}}
</div>
<p><a href="/account/order">Review or edit your recent orders></a></p>
<br><br>
{{#if needpassword}}
<p>We have created an account for you on this website - but you'll need a password to access it. Please set it below:</p>
<form id="password_info" method="post" class="frm json">
<input type="hidden" name="auth" value="{{auth}}">
<fieldset style="width:400px">
<legend> Add Password </legend>
<div class="control-group password required">
<label for="u_password">Password</label>
<div class="controls"><input class="admin-password" id="u_password" name="u_password" size="30" type="password" value=""></div>
<div class="status-message" for="u_password"></div>
</div>
<div class="control-group password required">
<label for="c_password">Confirm Password</label>
<div class="controls"><input class="admin-password" id="c_password" name="c_password" size="30" type="password" value=""></div>
<div class="status-message" for="c_password"></div>
</div>
<div class="form-actions right"><a class="submit action-serialize" href="#">$button</a></div>
</fieldset>
</form>
{{/if}}
BLOCK;
$this('store_confirm')->html($html)->Title('Thanks');
}
public function store_checkout_debug() {
$html = <<<BLOCK
<h3>Order {{order_id}}</h3>
<pre>{{debug}}</pre>
BLOCK;
$this('store_checkout_debug')->html($html)->Title('Debug');
}
/////////////////////////////////// /////////////////////////////////// ///////////////////////////////////
public function template_seller() {
$body = <<<BLOCK
<div style="margin-bottom: 30px">
<h2>You have made a sale</h2>
Order Number: <a href="{{hostname}}/admin/fulfillment/{{ordernum}}">{{ordernum}}</a><br>
Date: {{date}}
</div>
<div style="margin-bottom: 30px">
<h3>Items Ordered</h3>
<table class="ordered" cellspacing="0" cellpadding="0">
<tr><td colspan="2"></td><td class="amountcol right">Quantity</td><td class="right">Price</td></tr>
{{#each cart}}
<tr>
<td><img src="{{thumb}}"></td>
<td>{{desc}}
<!-- [COL2] -->
</td>
<td class="amountcol right">{{quantity}}</td>
<td class="right">{{sell}}</td>
</tr>
{{/each}}
{{#each extras}}
<tr><td></td><td colspan="2" class="amountcol right">{{desc}}</td><td class="right">{{display}}</td></tr>
{{/each}}
{{#if showtax}}
{{#if taxable}}
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
<tr><td></td><td colspan="2" class="amountcol right">Tax</td><td class="right">{{tax}}</td></tr>
{{else}}
<tr><td></td><td colspan="2" class="amountcol right">Tax</td><td class="right">{{tax}}</td></tr>
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
{{/if}}
{{else}}
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
{{/if}}
<tr><td></td><td colspan="2" class="amountcol right">Total</td><td class="right bold">{{total}}</td></tr>
</table>
</div>
{{#if address}}
{{#with address}}
<div style="margin-bottom: 30px">
<h3>Shipping Address</h3>
<b>{{name}}</b><br>
{{del_a}}<br>
{{#if addr2}}{{addr2}}<br>{{/if}}
{{town}} {{state}} {{zip}}<br>
{{country_name}}
</div>
{{/with}}
{{/if}}
<div style="margin-bottom: 30px">
</div>
BLOCK;
$body = hook_execute('template.store.fulfill.COL2', $body);
$css = <<<BLOCK
.ordered tr td {
padding: 4px;
}
.amountcol {
padding-right: 20px !important;
}
.right {
text-align: right;
}
.bold {
font-weight: bold;
}
BLOCK;
return [
'title' => 'New Order - Seller',
'subject' => "[{{ordernum}}] New order from {{address/name}}",
'body' => $body,
'css' => $css,
];
}
public function template_buyer() {
$body = <<<BLOCK
<p>Thank you for shopping with us. We'll send a confirmation when your items ship.</p>
<div style="margin-bottom: 30px">
Order Number: <a href="{{hostname}}/account/order/{{ordernum}}">{{ordernum}}</a><br>
Date: {{date}}
</div>
<div style="margin-bottom: 30px">
<h3>Items Ordered</h3>
<table class="ordered" cellspacing="0" cellpadding="0">
<tr><td colspan="2"></td><td class="amountcol right">Quantity</td><td class="right">Price</td></tr>
{{#each cart}}
<tr>
<td><img src="{{thumb}}"></td>
<td>{{desc}}
<!-- [COL2] -->
</td>
<td class="amountcol right">{{quantity}}</td>
<td class="right">{{sell}}</td>
</tr>
{{/each}}
{{#each extras}}
<tr><td></td><td colspan="2" class="amountcol right">{{desc}}</td><td class="right">{{display}}</td></tr>
{{/each}}
{{#if showtax}}
{{#if taxable}}
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
<tr><td></td><td colspan="2" class="amountcol right">Tax</td><td class="right">{{tax}}</td></tr>
{{else}}
<tr><td></td><td colspan="2" class="amountcol right">Tax</td><td class="right">{{tax}}</td></tr>
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
{{/if}}
{{else}}
{{#if freightamt}}
<tr><td></td><td colspan="2" class="amountcol right">Freight ({{freight/caption}})</td><td class="right">{{freightcharge}}</td></tr>
{{/if}}
{{/if}}
<tr><td></td><td colspan="2" class="amountcol right">Total</td><td class="right bold">{{total}}</td></tr>
</table>
</div>
{{#if address}}
{{#with address}}
<div style="margin-bottom: 30px">
<h3>Shipping Address</h3>
<b>{{name}}</b><br>
{{del_a}}<br>
{{#if addr2}}{{addr2}}<br>{{/if}}
{{town}} {{state}} {{zip}}<br>
{{country_name}}
</div>
{{/with}}
{{/if}}
BLOCK;
$body = hook_execute('template.store.fulfill.COL2', $body);
$css = <<<BLOCK
.ordered tr td {
padding: 4px;
}
.amountcol {
padding-right: 20px !important;
}
.right {
text-align: right;
}
.bold {
font-weight: bold;
}
BLOCK;
return [
'title' => 'New Order - Buyer',
'subject' => "Your Order from {{companyname}}",
'body' => $body,
'css' => $css,
];
}
/////////////////////////////////// /////////////////////////////////// ///////////////////////////////////
// https://stage.theyoungdesigners.com/account/order/025-34350042/track/9400108106245989478968
public function template_track() {
$body = <<<BLOCK
<div style="margin-bottom: 30px">
Order Number: <a href="{{hostname}}/account/order/{{ordernum}}">{{ordernum}}</a><br>
Date: {{date}}
</div>
<p style="font-size:18pt;">Hi {{name_first}}, let the tracking begin! Follow progress in real time. </p>
<div style="margin-bottom:30px"><a class="v1button v1cta v1col-276px" href="{{hostname}}/account/order/{{ordernum}}/track//{{tracking}}" style="background-color: #0968F6; font-size: 14px; line-height: 20px; font-family: Helvetica,Arial,sans-serif; font-weight: bold; text-decoration: none; padding: 9px 24px 9px 24px; color: #FFFFFF; border: 1px solid #0968F6; border-radius: 24px; display: inline-block; mso-padding-alt: 0; text-align: center; width:300px; max-width: 100%; box-sizing: border-box" target="_blank" rel="noreferrer"><span style="mso-text-raise: 10pt">Track package</span></a></div>
<div style="margin-bottom: 30px">
<h3>Items Ordered</h3>
<table class="ordered" cellspacing="0" cellpadding="0">
<tr><td colspan="2"></td><td class="amountcol right">Quantity</td></tr>
{{#each cart}}
<tr>
<td><img src="{{thumb}}"></td>
<td>{{desc}}
<!-- [COL2] -->
</td>
<td class="amountcol right">{{quantity}}</td>
</tr>
{{/each}}
</table>
</div>
{{#if address}}
{{#with address}}
<div style="margin-bottom: 30px">
<h3>Shipping Address</h3>
<b>{{name}}</b><br>
{{del_a}}<br>
{{#if addr2}}{{addr2}}<br>{{/if}}
{{town}} {{state}} {{zip}}<br>
{{country_name}}
</div>
{{/with}}
{{/if}}
BLOCK;
$body = hook_execute('template.store.fulfill.COL2', $body);
$css = <<<BLOCK
.ordered tr td {
padding: 4px;
}
.amountcol {
padding-right: 20px !important;
}
.right {
text-align: right;
}
.bold {
font-weight: bold;
}
BLOCK;
return [
'title' => 'Tracking Number Entered',
'subject' => "Your package is on its way",
'body' => $body,
'css' => $css,
];
}
/////////////////////////////////// /////////////////////////////////// ///////////////////////////////////
public function Column1Text_fulfill() {
return <<<'BLOCK'
{{#if unshipped}}
<span class="a-button a-button-normal a-spacing-mini a-button-base">
<span class="a-button-inner"><a href="/admin/fulfillment/{{ordernum}}/pslip?auth={{auth}}" class="json-request a-button-text" role="button">Packing Slip</a></span>
</span>
{{/if}}
{{#if physical}}
<span class="a-button a-button-normal a-spacing-mini a-button-base">
<span class="a-button-inner"><a href="/admin/fulfillment/{{ordernum}}/tracking?auth={{auth}}" class="json-request a-button-text" role="button">Tracking Number(s)</a></span>
</span>
{{/if}}
<span class="a-button a-button-normal a-spacing-mini a-button-base" title="wait until product has been returned?">
<span class="a-button-inner"><a href="/admin/fulfillment/{{ordernum}}/cancel?auth={{auth}}" class="json-request a-button-text" role="button">Cancel Order</a></span>
</span>
BLOCK;
}
public function store_packingslip() {
$html = <<<'BLOCK'
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="pslip-header order-header border">
<div class="column column-left">
<h4>Ship to</h4>
{{#with address}}
{{name}}<br>
{{del_a}}<br>
{{#ifeq addr2 ""}}{{else}}{{addr2}}<br>{{/ifeq}}
{{town}}, {{state}} {{zip}}<br>
{{country_name}}
{{/with}}
</div>
<div class="column column-right">
<h4 style="text-align: right; font-size:24pt">Packing Slip</h4>
<div class="textentry"><span class="caption">Order Number:</span><span class="value">{{ordernum}}</span></div>
<div class="textentry"><span class="caption">Order Date:</span><span class="value">{{orderdate}}</span></div>
</div>
</div>
<table class="pslip-body order-detail border" cellspacing="0" cellpadding="0">
{{#each cart}}
<tr>
<td class="width1"><img src="{{thumb}}" style="width:98px;max-height:98px;"></td>
<td>
<div>{{desc}}</div>
{{#if sku}}<div>SKU: {{sku}}</div>{{/if}}
{{#if model}}<div>Model: {{model}}</div>{{/if}}
<!-- [COL2] -->
</td>
<td class="amountcol right{{#ifeq quantity 1}}{{else}} hilite{{/ifeq}}" style="text-align:right">{{quantity}}</td>
</tr>
{{/each}}
</table>
</body>
</html>
BLOCK;
$html = hook_execute('template.store.report.COL2', $html); // show customization
return $html;
}
function store_packingslip_blue() {
return <<<'BLOCK'
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
font-family: Arial;
}
.footer-container,
.header2-container,
.total-container,
.header-container {
display: table;
width: 100%;
max-width: 1000px;
margin-bottom: 20px;
}
.total-container .column,
.table-container .column,
.header2-container .column,
.header-container .column {
display: table-cell;
vertical-align: top;
}
.header-container .column1 {
font-size: 32px;
color: #000;
}
.header-container .column2 {
width: 200px;
text-align: right;
font-size: 32px;
color: #003962;
font-weight: bold;
}
.header2-container .column1 {
width: 250px;
}
.header2-container .column3 {
width: 300px;
text-align: right;
}
.hilited {
background-color: #003962;
color: #fff;
padding: 4px 10px;
margin: 5px 0;
}
.header2-container .address {
padding: 4px 10px;
margin: 5px 0;
line-height: 1.5;
}
.header2-container .item-row {
padding: 4px 0px;
}
.header2-container .item-key {
display: inline-block;
width: 150px;
text-align: left;
}
.header2-container .item-value {
display: inline-block;
width: 150px;
text-align: right;
}
.table-container {
display: table;
width: 100%;
max-width: 1000px;
}
.total-container .column1,
.table-container .column1 {
width: 100px;
text-align: left;
}
.total-container .column3,
.table-container .column3 {
width: 80px;
text-align: right;
}
.total-container .column2 {
text-align: right;
}
.body-container > div.table-container:nth-child(even) {
background-color: #ececec;
}
.body-container .table-container .column {
border-left: 1px solid #cccccc;
padding: 3px 10px;
}
.body-container .table-container .column3 {
border-right: 1px solid #cccccc;
}
.body-container > div.table-container:last-child {
border-bottom: 1px solid #cccccc;
}
.total-container {
margin-top: 10px;
}
.total-container .column {
padding: 3px 10px;
}
.total-container .column2 {
font-size: 12px;
font-weight: bold;
}
.footer-container {
margin-top: 20px;
text-align: center;
font-size: 12px;
}
.footer-container .message {
font-size: 14px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="header-container">
<div class="column column1">{{company_name}}</div>
<div class="column column2">Packing Slip</div>
</div>
<div class="header2-container">
<div class="column column1">
<div class="hilited">Ship To:</div>
<div class="address">{{#with address}}
{{name}}<br>
{{del_a}}<br>
{{#ifeq addr2 ""}}{{else}}{{addr2}}<br>{{/ifeq}}
{{town}}, {{state}} {{zip}}<br>
{{country_name}}
{{/with}}</div>
</div>
<div class="column column2">
</div>
<div class="column column3">
<div class="item-row"><span class="item-key">Order Number:</span><span class="item-value">{{ordernum}}</span></div>
<div class="item-row"><span class="item-key">Order Date:</span><span class="item-value">{{orderdate}}</span></div>
<div class="item-row"><span class="item-key">Carrier:</span><span class="item-value">{{carrier_abbr}}</span></div>
<div class="item-row">{{carrier_service}}</div>
</div>
</div>
<div class="table-container">
<div class="column column1 hilited">SKU #</div>
<div class="column column2 hilited">Description</div>
<div class="column column3 hilited">Quantity</div>
</div>
<div class="body-container">
{{#each tableline}}
<div class="table-container">
<div class="column column1">{{sku}}</div>
<div class="column column2">{{#if html}}{{{html}}}{{else}}{{desc}}{{/if}}</div>
<div class="column column3">{{qty}}</div>
</div>
{{/each}}
</div>
<div class="total-container">
<div class="column column1"> </div>
<div class="column column2">Total Quantity</div>
<div class="column column3">{{total_qty}}</div>
</div>
<br>
<div class="footer-container">
<div class="message">Thank you for your business!</div>
<div>Should you have any enquiries concerning this packing slip or your goods, please contact us.</div>
<div> </div>
<div>E-mail: {{coemail}} // Web: {{hostname}}</div>
</div>
</body>
</html>
BLOCK;
$html = hook_execute('template.store.report.COL2', $html); // show customization
return $html;
}
public function store_snafu() {
$html = <<<BLOCK
<h2 class="templateheader">{{page_title}}</h2>
<p class="snafu-message">{{desc}}</p>
BLOCK;
$this('store_snafu')->html($html);
}
}