mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
Some SilverShop and SilverBlog improvements
This commit is contained in:
parent
e2ec5b0c75
commit
69c6209250
@ -24,27 +24,4 @@ class BlogPostExtension extends DataExtension
|
||||
$mainTab = $fields->findOrMakeTab('Root.Main');
|
||||
$mainTab->push(CheckboxField::create('Featured'));
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows custom summary of the post, otherwise
|
||||
* Displays summary of the first content element
|
||||
*/
|
||||
public function Summary($wordsToDisplay = 30)
|
||||
{
|
||||
$summary = $this->owner->getField('Summary');
|
||||
if ($summary) {
|
||||
return $summary;
|
||||
}
|
||||
|
||||
$element = ElementContent::get()->filter([
|
||||
'ParentID' => $this->owner->ElementalArea()->ID,
|
||||
'HTML:not' => [null],
|
||||
])->first();
|
||||
|
||||
if ($element) {
|
||||
return $element->dbObject('HTML')->Summary($wordsToDisplay);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,30 @@
|
||||
//namespace Site\Pages;
|
||||
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
|
||||
class Page extends SiteTree
|
||||
{
|
||||
/*
|
||||
* Shows custom summary of the post, otherwise
|
||||
* Displays summary of the first content element
|
||||
*/
|
||||
public function Summary($wordsToDisplay = 30)
|
||||
{
|
||||
$summary = $this->getField('Summary');
|
||||
if ($summary) {
|
||||
return $summary;
|
||||
}
|
||||
|
||||
$element = ElementContent::get()->filter([
|
||||
'ParentID' => $this->ElementalArea()->ID,
|
||||
'HTML:not' => [null],
|
||||
])->first();
|
||||
|
||||
if ($element) {
|
||||
return $element->dbObject('HTML')->Summary($wordsToDisplay);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,27 @@
|
||||
<div class="blog-post-info">
|
||||
<div class="blog-post-info card">
|
||||
<div class="published-date">
|
||||
<div class="day">$PublishDate.Format("d")</div>
|
||||
<div class="month">$PublishDate.Format("MMM")</div>
|
||||
</div>
|
||||
<% if $FeaturedImage %>
|
||||
<div class="img">
|
||||
<div class="img card-img-top">
|
||||
<a href="$Link">$FeaturedImage.Fill(350,200)</a>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
|
||||
<h5 class="title">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title title">
|
||||
<a href="$Link.ATT" title="Go to the $Title post">
|
||||
$Title
|
||||
</a>
|
||||
</h5>
|
||||
|
||||
<div class="typography summary">
|
||||
<div class="card-text typography summary">
|
||||
$Summary
|
||||
</div>
|
||||
|
||||
<a href="{$Link}" class="btn btn-link">Read More »</a>
|
||||
<a href="{$Link}" class="btn btn-link"><%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> »</a>
|
||||
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
</div>
|
||||
</div>
|
26
app/templates/SilverShop/Admin/OrderAdmin_Addresses.ss
Normal file
26
app/templates/SilverShop/Admin/OrderAdmin_Addresses.ss
Normal file
@ -0,0 +1,26 @@
|
||||
<div class="grid grid-field">
|
||||
<table class="shop-order shop-order--addresses table grid-field__table">
|
||||
<thead>
|
||||
<tr class="shop-order__title">
|
||||
<th colspan="2">
|
||||
<h2><%t SilverShop\Model\Address.SINGULARNAME "Address" %></h2>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="shop-order__header">
|
||||
<th><%t SilverShop\Model\Order.ShipTo "Ship To" %></th>
|
||||
<th><%t SilverShop\Model\Order.BillTo "Bill To" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="shop-order__address">$getShippingAddress</td>
|
||||
<td class="shop-order__address">$getBillingAddress</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="bottom-all" colspan="2"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
24
app/templates/SilverShop/Admin/OrderAdmin_Content.ss
Normal file
24
app/templates/SilverShop/Admin/OrderAdmin_Content.ss
Normal file
@ -0,0 +1,24 @@
|
||||
<div class="grid grid-field">
|
||||
<table class="shop-order shop-order--content table grid-field__table">
|
||||
<thead>
|
||||
<tr class="shop-order__title">
|
||||
<th colspan="5">
|
||||
<h2><%t SilverShop\Model\OrderItem.PLURALNAME "Items" %></h2>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="shop-order__header">
|
||||
<th></th>
|
||||
<th><span><%t SilverShop\Page\Product.SINGULARNAME "Product" %></span></th>
|
||||
<th><span><%t SilverShop\Model\Order.UnitPrice "Unit Price" %></span></th>
|
||||
<th><span><%t SilverShop\Model\Order.Quantity "Quantity" %></span></th>
|
||||
<th><span><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loop $Items %>
|
||||
<% include SilverShop\Admin\OrderAdmin_Content_ItemLine %>
|
||||
<% end_loop %>
|
||||
</tbody>
|
||||
<% include SilverShop\Admin\OrderAdmin_Content_SubTotals %>
|
||||
</table>
|
||||
</div>
|
@ -0,0 +1,25 @@
|
||||
<tr class="shop-order__itemline $EvenOdd $FirstLast">
|
||||
<td>
|
||||
<% if $Buyable && $Buyable.Image %>
|
||||
<div class="shop-order__image">
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Buyable.Title %>">
|
||||
<img src="$Buyable.Image.ScaleWidth(45).AbsoluteURL" alt="$Buyable.Title"/>
|
||||
</a>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</td>
|
||||
<td class="shop-order__product shop-order__title">
|
||||
<strong>
|
||||
<% if $Link %>
|
||||
<a href="$Link" target="new">$TableTitle</a>
|
||||
<% else %>
|
||||
$TableTitle
|
||||
<% end_if %>
|
||||
</strong>
|
||||
<% if $SubTitle %><div class="shop-order__subtitle">$SubTitle</div><% end_if %>
|
||||
<% if $Buyable.InternalItemID %><div class="shop-order__sku"><%t SilverShop\Page\Product.ProductCodeShort "SKU" %>: $Buyable.InternalItemID</div><% end_if %>
|
||||
</td>
|
||||
<td class="shop-order__unitprice">$UnitPrice.Nice</td>
|
||||
<td class="shop-order__quantity count-$Quantity">$Quantity</td>
|
||||
<td class="shop-order__item-total">$Total.Nice</td>
|
||||
</tr>
|
@ -0,0 +1,30 @@
|
||||
<tfoot class="shop-order__subtotals">
|
||||
<tr>
|
||||
<th colspan="4"><%t SilverShop\Model\Order.SubTotal "Sub-total" %></th>
|
||||
<th>$SubTotal.Nice</th>
|
||||
</tr>
|
||||
<% loop $Modifiers %>
|
||||
<% if $ShowInTable %>
|
||||
<tr class="$EvenOdd $FirstLast $Classes">
|
||||
<td colspan="4">
|
||||
$TableTitle
|
||||
<% if $SubTitle %><small class="shop-order__subtitle">($SubTitle)</small><% end_if %>
|
||||
</td>
|
||||
<td>$TableValue.Nice</td>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
<tr class="shop-order__total">
|
||||
<th colspan="4"><%t SilverShop\Model\Order.Total "Total" %></th>
|
||||
<th>$Total.Nice $Currency</th>
|
||||
</tr>
|
||||
<% if $TotalOutstanding %>
|
||||
<tr>
|
||||
<td colspan="4"><%t SilverShop\Model\Order.Outstanding "Outstanding" %></td>
|
||||
<td>$TotalOutstanding.Nice $Currency</td>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
<tr>
|
||||
<td class="bottom-all" colspan="5"></td>
|
||||
</tr>
|
||||
</tfoot>
|
30
app/templates/SilverShop/Admin/OrderAdmin_Customer.ss
Normal file
30
app/templates/SilverShop/Admin/OrderAdmin_Customer.ss
Normal file
@ -0,0 +1,30 @@
|
||||
<div class="grid grid-field">
|
||||
<table class="shop-order shop-order--customer table grid-field__table">
|
||||
<thead>
|
||||
<tr class="shop-order__title">
|
||||
<th colspan="2">
|
||||
<h2><%t SilverShop\Generic.Customer "Customer" %></h2>
|
||||
</th>
|
||||
</tr>
|
||||
<tr class="shop-order__header">
|
||||
<th><%t SilverShop\Page\AccountPage.MemberName "Name" %></th>
|
||||
<th><%t SilverShop\Page\AccountPage.MemberEmail "Email" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>$Name</td>
|
||||
<td>
|
||||
<% if $LatestEmail %>
|
||||
<a href="mailto:$LatestEmail">$LatestEmail</a>
|
||||
<% end_if %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="bottom-all" colspan="2"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
21
app/templates/SilverShop/Admin/OrderAdmin_Notes.ss
Normal file
21
app/templates/SilverShop/Admin/OrderAdmin_Notes.ss
Normal file
@ -0,0 +1,21 @@
|
||||
<div class="grid grid-field">
|
||||
<table class="shop-order shop-order--notes table grid-field__table">
|
||||
<thead>
|
||||
<tr class="shop-order__title">
|
||||
<th>
|
||||
<h2><%t SilverShop\Model\Order.db_Notes "Notes" %></h2>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>$Notes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="bottom-all"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
16
app/templates/SilverShop/Admin/OrderAdmin_Printable.ss
Normal file
16
app/templates/SilverShop/Admin/OrderAdmin_Printable.ss
Normal file
@ -0,0 +1,16 @@
|
||||
<html>
|
||||
<head>
|
||||
<% base_tag %>
|
||||
$MetaTags
|
||||
<% include SilverShop\Includes\OrderReceiptStyle %>
|
||||
</head>
|
||||
<body>
|
||||
<div style="page-break-after: always;">
|
||||
<h1 class="title">
|
||||
<%t SilverShop\Admin\OrdersAdmin.ReceiptTitle "{SiteTitle} Order {OrderNo}" SiteTitle=$SiteConfig.Title OrderNo=$Reference %>
|
||||
</h1>
|
||||
<% include SilverShop\Model\Order %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
117
app/templates/SilverShop/Cart/Cart.ss
Normal file
117
app/templates/SilverShop/Cart/Cart.ss
Normal file
@ -0,0 +1,117 @@
|
||||
<% if $Items %>
|
||||
<table class="cart" summary="<%t SilverShop\Cart\ShoppingCart.TableSummary "Current contents of your cart." %>">
|
||||
<colgroup>
|
||||
<col class="image"/>
|
||||
<col class="product title"/>
|
||||
<col class="unitprice" />
|
||||
<col class="quantity" />
|
||||
<col class="total"/>
|
||||
<col class="remove"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"><%t SilverShop\Page\Product.SINGULARNAME "Product" %></th>
|
||||
<th scope="col"><%t SilverShop\Model\Order.UnitPrice "Unit Price" %></th>
|
||||
<th scope="col"><%t SilverShop\Model\Order.Quantity "Quantity" %></th>
|
||||
<th scope="col"><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %></th>
|
||||
<% if $Editable %>
|
||||
<th scope="col"><%t SilverShop\Generic.Remove "Remove" %></th>
|
||||
<% end_if %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loop $Items %><% if $ShowInTable %>
|
||||
<tr id="$TableID" class="$Classes $EvenOdd $FirstLast">
|
||||
<td>
|
||||
<% if $Image %>
|
||||
<div class="image">
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$TableTitle %>">
|
||||
$Image.setWidth(45)
|
||||
</a>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</td>
|
||||
<td id="$TableTitleID">
|
||||
<h3>
|
||||
<% if $Link %>
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$TableTitle %>">$TableTitle</a>
|
||||
<% else %>
|
||||
$TableTitle
|
||||
<% end_if %>
|
||||
</h3>
|
||||
<% if $SubTitle %><p class="subtitle">$SubTitle</p><% end_if %>
|
||||
<% if $Product.Variations && $Up.Editable %>
|
||||
<%t SilverShop\Generic.Change "Change" %>: $VariationField
|
||||
<% end_if %>
|
||||
</td>
|
||||
<td>$UnitPrice.Nice</td>
|
||||
<td><% if $Up.Editable %>$QuantityField<% else %>$Quantity<% end_if %></td>
|
||||
<td id="$TableTotalID">$Total.Nice</td>
|
||||
<% if $Up.Editable %>
|
||||
<td>
|
||||
<% if $RemoveField %>
|
||||
$RemoveField
|
||||
<% else %>
|
||||
<a href="$removeallLink" title="<%t SilverShop\Cart\ShoppingCart.RemoveAllTitle "Remove all of "{Title}" from your cart" Title=$TableTitle %>">
|
||||
<img src="$resourceURL('silvershop/core:client/dist/images/remove.gif')" alt="x"/>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
</td>
|
||||
<% end_if %>
|
||||
</tr>
|
||||
<% end_if %><% end_loop %>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<th colspan="4" scope="row"><%t SilverShop\Model\Order.SubTotal "Sub-total" %></th>
|
||||
<td id="$TableSubTotalID">$SubTotal.Nice</td>
|
||||
<% if $Editable %><td> </td><% end_if %>
|
||||
</tr>
|
||||
<% if $ShowSubtotals %>
|
||||
<% if $Modifiers %>
|
||||
<% loop $Modifiers %>
|
||||
<% if $ShowInTable %>
|
||||
<tr id="$TableID" class="$Classes">
|
||||
<th id="$TableTitleID" colspan="4" scope="row">
|
||||
<% if $Link %>
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$TableTitle %>">$TableTitle</a>
|
||||
<% else %>
|
||||
$TableTitle
|
||||
<% end_if %>
|
||||
</th>
|
||||
<td id="$TableTotalID">$TableValue.Nice</td>
|
||||
<% if $Up.Editable %>
|
||||
<td>
|
||||
<% if $CanRemove %>
|
||||
<strong>
|
||||
<a class="ajaxQuantityLink" href="$removeLink" title="<%t SilverShop\Cart\ShoppingCart.RemoveTitle "Remove "{Title}" from your cart." Title=$TableTitle %>">
|
||||
<img src="$resourceURL('silvershop/core:client/dist/images/remove.gif')" alt="x"/>
|
||||
</a>
|
||||
</strong>
|
||||
<% end_if %>
|
||||
</td>
|
||||
<% end_if %>
|
||||
</tr>
|
||||
<% if $Form %>
|
||||
<tr>
|
||||
<td colspan="5">$Form</td><td colspan="10"></td>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
<tr class="gap Total">
|
||||
<th colspan="4" scope="row"><%t SilverShop\Model\Order.Total "Total" %></th>
|
||||
<td id="$TableTotalID"><span class="value">$Total.Nice</span> <span class="currency">$Currency</span></td>
|
||||
<% if $Editable %><td> </td><% end_if %>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
</tfoot>
|
||||
</table>
|
||||
<% else %>
|
||||
<p class="message warning">
|
||||
<%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %>
|
||||
</p>
|
||||
<% end_if %>
|
9
app/templates/SilverShop/Cart/ShoppingCart_debug.ss
Normal file
9
app/templates/SilverShop/Cart/ShoppingCart_debug.ss
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
$MetaTags(0)
|
||||
<title>Debugging ShoppingCart</title>
|
||||
</head>
|
||||
<body>
|
||||
$Content
|
||||
</body>
|
||||
</html>
|
40
app/templates/SilverShop/Cart/SideCart.ss
Normal file
40
app/templates/SilverShop/Cart/SideCart.ss
Normal file
@ -0,0 +1,40 @@
|
||||
<% require css("silvershop/core: client/dist/css/sidecart.css") %>
|
||||
|
||||
<div class="sidecart">
|
||||
<h3><%t SilverShop\Cart\ShoppingCart.Headline "Shopping cart" %></h3>
|
||||
<% if $Cart %>
|
||||
<% with $Cart %>
|
||||
<p class="itemcount">
|
||||
<% if $Items.Plural %>
|
||||
<%t SilverShop\Cart\ShoppingCart.ItemsInCartPlural 'There are <a href="{link}">{quantity} items</a> in your cart.' link=$Top.CartLink quantity=$Items.Quantity %>
|
||||
<% else %>
|
||||
<%t SilverShop\Cart\ShoppingCart.ItemsInCartSingular 'There is <a href="{link}">1 item</a> in your cart.' link=$Top.CartLink %>
|
||||
<% end_if %>
|
||||
</p>
|
||||
<div class="checkout">
|
||||
<a href="$Top.CheckoutLink"><%t SilverShop\Cart\ShoppingCart.Checkout "Checkout" %></a>
|
||||
</div>
|
||||
<% loop $Items %>
|
||||
<div class="item $EvenOdd $FirstLast">
|
||||
<% if $Product.Image %>
|
||||
<div class="image">
|
||||
<a href="$Product.Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>">
|
||||
<% with $Product %>$Image.setWidth(45)<% end_with %>
|
||||
</a>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<p class="title">
|
||||
<a href="$Product.Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>">
|
||||
$TableTitle
|
||||
</a>
|
||||
</p>
|
||||
<p class="quantityprice"><span class="quantity">$Quantity</span> <span class="times">x</span> <span class="unitprice">$UnitPrice.Nice</span></p>
|
||||
<% if $SubTitle %><p class="subtitle">$SubTitle</p><% end_if %>
|
||||
<a class="remove" href="$removeallLink" title="<%t SilverShop\Cart\ShoppingCart.RemoveTitle "Remove "{Title}" from your cart." Title=$TableTitle %>">x</a>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<% end_with %>
|
||||
<% else %>
|
||||
<p class="noItems"><%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %></p>
|
||||
<% end_if %>
|
||||
</div>
|
21
app/templates/SilverShop/Dev/ShopDevelopmentAdmin.ss
Normal file
21
app/templates/SilverShop/Dev/ShopDevelopmentAdmin.ss
Normal file
@ -0,0 +1,21 @@
|
||||
<h3><%t SilverShop\Dev\ShopDevelopmentAdmin.CartTasks "Cart tasks" %></h3>
|
||||
<ul>
|
||||
<li><a href="{$BaseHref}shoppingcart/clear"><%t SilverShop\Dev\ShopDevelopmentAdmin.ClearCart "Clear the current shopping cart" %></a></li>
|
||||
<li><a href="{$BaseHref}shoppingcart/debug"><%t SilverShop\Dev\ShopDevelopmentAdmin.DebugCart "Debug the shopping cart" %></a></li>
|
||||
<li><a href="{$BaseHref}dev/tasks/PopulateCartTask"><%t SilverShop\Dev\ShopDevelopmentAdmin.PopulateCart "Populate cart with some available products" %></a></li>
|
||||
</ul>
|
||||
|
||||
<h3><%t SilverShop\Dev\ShopDevelopmentAdmin.BuildTasks "Build Tasks" %></h3>
|
||||
<ul>
|
||||
<li><a href="{$BaseHref}dev/tasks/CartCleanupTask"><%t SilverShop\Dev\ShopDevelopmentAdmin.CartCleanup "Cleanup old carts" %></a>
|
||||
- <%t SilverShop\Dev\ShopDevelopmentAdmin.CartCleanupDesc "Remove abandoned carts." %></li>
|
||||
<li><a href="{$BaseHref}dev/tasks/RecalculateAllOrdersTask"><%t SilverShop\Dev\ShopDevelopmentAdmin.RecalculateOrders "Recalculate all orders" %></a>
|
||||
- <%t SilverShop\Dev\ShopDevelopmentAdmin.RecalculateOrdersDesc "Recalculate all order values. Warning: this will overwrite any historical values." %></li>
|
||||
<li><a href="{$BaseHref}dev/tasks/PopulateShopTask"><%t SilverShop\Dev\ShopDevelopmentAdmin.PopulateShop "Populate shop" %></a>
|
||||
- <%t SilverShop\Dev\ShopDevelopmentAdmin.PopulateShopDesc "Populate the shop with dummy products, categories, and other necessary pages." %></li>
|
||||
</ul>
|
||||
|
||||
<h3><%t SilverShop\Dev\ShopDevelopmentAdmin.UnitTests "Unit Tests" %></h3>
|
||||
<ul>
|
||||
<li><a href="{$BaseHref}dev/tests/module/$ShopFolder"><%t SilverShop\Dev\ShopDevelopmentAdmin.RunAllTests "Run all shop unit tests" %></a></li>
|
||||
</ul>
|
7
app/templates/SilverShop/Forms/ShopQuantityField.ss
Normal file
7
app/templates/SilverShop/Forms/ShopQuantityField.ss
Normal file
@ -0,0 +1,7 @@
|
||||
<div class="quantityfield">
|
||||
<a class="removelink" href="$DecrementLink"
|
||||
title="<%t SilverShop\Forms\ShopQuantityField.RemoveOne "Remove one of "{ItemTitle}" from your cart" ItemTitle=$Item.TableTitle %>">-</a>
|
||||
<span class="quantity">$Field</span>
|
||||
<a class="addlink" href="$IncrementLink"
|
||||
title="<%t SilverShop\Forms\ShopQuantityField.AddOne "Add one more of "{ItemTitle}" to your cart" ItemTitle=$Item.TableTitle %>">+</a>
|
||||
</div>
|
47
app/templates/SilverShop/Includes/AccountNavigation.ss
Normal file
47
app/templates/SilverShop/Includes/AccountNavigation.ss
Normal file
@ -0,0 +1,47 @@
|
||||
<div class="accountnav">
|
||||
<div class="nav">
|
||||
<h2><%t SilverShop\Page\AccountPage.Title 'My Account' %></h2>
|
||||
<ul class="nav nav-list">
|
||||
<li>
|
||||
<a href="{$Link}">
|
||||
<i class="icon icon-list fa fa-list"></i><%t SilverShop\Page\AccountPage.PastOrders 'Past Orders' %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$Link('editprofile')}">
|
||||
<i class="icon icon-user fa fa-user"></i><%t SilverShop\Page\AccountPage.EditProfile 'Edit Profile' %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$Link('addressbook')}">
|
||||
<i class="icon icon-book fa fa-book"></i><%t SilverShop\Page\AccountPage.AddressBook 'Address Book' %>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="Security/logout">
|
||||
<i class="icon icon-off fa fa-sign-out"></i><%t SilverShop\Page\AccountPage.LogOut 'Log Out' %>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="memberdetails">
|
||||
<% with $CurrentMember %>
|
||||
<dl>
|
||||
<dt><%t SilverShop\Page\AccountPage.MemberName 'Name' %></dt>
|
||||
<dd>$Name</dd>
|
||||
|
||||
<dt><%t SilverShop\Page\AccountPage.MemberEmail 'Email' %></dt>
|
||||
<dd>$Email</dd>
|
||||
|
||||
<dt><%t SilverShop\Page\AccountPage.MemberSince 'Member Since' %></dt>
|
||||
<dd>$Created.Nice</dd>
|
||||
|
||||
<dt><%t SilverShop\Page\AccountPage.MemberLastVisit 'Last Visit' %></dt>
|
||||
<dd>$LastVisited.Nice</dd>
|
||||
|
||||
<dt> <%t SilverShop\Page\AccountPage.NumberOfOrders 'Number of orders' %></dt>
|
||||
<dd><% if $PastOrders %>{$PastOrders.Count}<% else %>0<% end_if %></dd>
|
||||
</dl>
|
||||
<% end_with %>
|
||||
</div>
|
||||
</div>
|
28
app/templates/SilverShop/Includes/OrderHistory.ss
Normal file
28
app/templates/SilverShop/Includes/OrderHistory.ss
Normal file
@ -0,0 +1,28 @@
|
||||
<table class="table table-bordered orderhistory">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%t SilverShop\Model\Order.db_Reference 'Reference' %></th>
|
||||
<th><%t SilverShop\Model\Order.Date 'Date' %></th>
|
||||
<th><%t SilverShop\Model\Order.has_many_Items 'Items' %></th>
|
||||
<th><%t SilverShop\Model\Order.Total 'Total' %></th>
|
||||
<th><%t SilverShop\Model\Order.db_Status 'Status' %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loop $PastOrders %>
|
||||
<tr class="{$Status}">
|
||||
<td>$Reference</td>
|
||||
<td>$Created.Nice</td>
|
||||
<td>$Items.Quantity</td>
|
||||
<td>$Total.Nice</td>
|
||||
<td>$StatusI18N</td>
|
||||
<td>
|
||||
<a class="btn btn-mini btn-primary" href="$Link">
|
||||
<i class="icon icon-white icon-eye-open fa fa-eye"></i> <%t SilverShop\Generic.View 'view' %>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
</tbody>
|
||||
</table>
|
159
app/templates/SilverShop/Includes/OrderReceiptStyle.ss
Normal file
159
app/templates/SilverShop/Includes/OrderReceiptStyle.ss
Normal file
@ -0,0 +1,159 @@
|
||||
<style>
|
||||
/** Global Resets for Email Design **/
|
||||
/** Reference: https://github.com/seanpowell/Email-Boilerplate/blob/master/email.html **/
|
||||
|
||||
html {
|
||||
font-size: 1em;
|
||||
font-family: Tahoma, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
body, table#container {
|
||||
font-size: 12px;
|
||||
line-height: 100% !important;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100% !important;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust:100%;
|
||||
}
|
||||
|
||||
table td {border-collapse: collapse;} /* Outlook 07 & 10 padding issue */
|
||||
|
||||
table { /* Remove spacing around Outlook 07, 10 tables */
|
||||
border-collapse:collapse;
|
||||
mso-table-lspace:0pt;
|
||||
mso-table-rspace:0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border:0;
|
||||
outline:none;
|
||||
text-decoration:none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
display:block;
|
||||
}
|
||||
|
||||
a img { border: none; }
|
||||
|
||||
table#container {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Main left and right padding */
|
||||
table#container > tr > td {
|
||||
padding: 0 20px 0 20px;
|
||||
}
|
||||
|
||||
/* Styling for Silvershop order */
|
||||
h1.title{
|
||||
font-size:1.5em;
|
||||
display:block;
|
||||
text-align:right;
|
||||
border-bottom:1px solid #CDDDDD;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
#Content {
|
||||
text-align:left;
|
||||
margin:auto;
|
||||
}
|
||||
|
||||
table#SenderTable{
|
||||
width:100%;
|
||||
}
|
||||
table#SenderTable .sender,
|
||||
table#SenderTable .meta{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
table#MetaTable{
|
||||
margin-left:auto;
|
||||
}
|
||||
|
||||
table#MetaTable .label{
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
table.infotable{
|
||||
border:1px solid #CDDDDD;
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
border-top:1px solid #ccc;
|
||||
border-bottom:1px solid #ccc;
|
||||
background:#fff;
|
||||
margin-top:10px;
|
||||
}
|
||||
.warningMessage {
|
||||
margin: 4px 0 0 3px;
|
||||
padding: 5px;
|
||||
width: 92%;
|
||||
color: #DC1313;
|
||||
border: 4px solid #FF7373;
|
||||
background: #FED0D0;
|
||||
}
|
||||
table.infotable h3 {
|
||||
color: #4EA3D7;
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
font-family: Tahoma, Verdana, sans-serif;
|
||||
}
|
||||
|
||||
table.infotable tr.Total td {
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
|
||||
text-transform:uppercase;
|
||||
}
|
||||
table.infotable tr td,
|
||||
table.infotable tr th {
|
||||
padding:5px;
|
||||
color: #333;
|
||||
border:1px solid #CDDDDD;
|
||||
}
|
||||
table.infotable td {
|
||||
font-size:12px;
|
||||
}
|
||||
table.infotable tr.summary {
|
||||
font-weight: bold;
|
||||
}
|
||||
table.infotable td.ordersummary {
|
||||
font-size:1em;
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
table.infotable th {
|
||||
font-weight:bold;
|
||||
font-size:12px;
|
||||
color:#000;
|
||||
background:#E7EFEF;
|
||||
}
|
||||
table.infotable tr td a {
|
||||
color:#4EA3D7;
|
||||
text-decoration:underline;
|
||||
}
|
||||
table.infotable tr td a:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
table.infotable .modifierRow,
|
||||
table.infotable .threeColHeader{
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
table.infotable .right {
|
||||
text-align:right;
|
||||
}
|
||||
table.infotable .center {
|
||||
text-align:center;
|
||||
}
|
||||
table.infotable .left,
|
||||
table.infotable th {
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#ShippingTable td,
|
||||
#ShippingTable th{
|
||||
width:50%;
|
||||
}
|
||||
</style>
|
13
app/templates/SilverShop/Includes/Price.ss
Normal file
13
app/templates/SilverShop/Includes/Price.ss
Normal file
@ -0,0 +1,13 @@
|
||||
<% if $PriceRange %>
|
||||
<div class="price">
|
||||
<strong class="value">$PriceRange.Min.Nice</strong>
|
||||
<% if $PriceRange.HasRange %>
|
||||
- <strong class="value">$PriceRange.Max.Nice</strong>
|
||||
<% end_if %>
|
||||
<span class="currency">$Price.Currency</span>
|
||||
</div>
|
||||
<% else_if $Price %>
|
||||
<div class="price">
|
||||
<strong class="value">$Price.Nice</strong> <span class="currency">$Price.Currency</span>
|
||||
</div>
|
||||
<% end_if %>
|
14
app/templates/SilverShop/Includes/PriceTag.ss
Normal file
14
app/templates/SilverShop/Includes/PriceTag.ss
Normal file
@ -0,0 +1,14 @@
|
||||
<div class="pricetag">
|
||||
<% if $DiscountedPrice %>
|
||||
<span class="original strikeout">
|
||||
<span class="symbol">$Price.Symbol</span>
|
||||
<strong class="main">$Price.Main</strong>
|
||||
<small class="fractional">$Price.Fractional</small>
|
||||
<span class="code">$Price.CurrencyCode</span>
|
||||
</span>
|
||||
<span class="discounted">$DiscountedPrice.Nice</span> <%t SilverShop\Includes\PriceTag.SAVE "Save" %>: <span class="savings">$DiscountedPrice.Savings</span>
|
||||
<% else %>
|
||||
<span class="original"><strong class="price">$Price.Nice</strong></span>
|
||||
<% end_if %>
|
||||
<% if $RecommendedPrice %><span>$RecommendedPrice.Nice</span><% end_if %>
|
||||
</div>
|
70
app/templates/SilverShop/Includes/ProductGroupItem.ss
Normal file
70
app/templates/SilverShop/Includes/ProductGroupItem.ss
Normal file
@ -0,0 +1,70 @@
|
||||
<div class="product-item row align-items-center">
|
||||
<div class="col-sm-6">
|
||||
<% if $Image %>
|
||||
<a
|
||||
class="product-image"
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
>
|
||||
<img src="$Image.Fill(255,430).URL" alt="<%t SilverShop\Page\Product.ImageAltText "{Title} image" Title=$Title %>" />
|
||||
</a>
|
||||
<% else %>
|
||||
<a
|
||||
class="product-image product-image-no"
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
><!-- no image --></a>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<h3 class="product-title">
|
||||
<a
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
>$Title</a>
|
||||
</h3>
|
||||
|
||||
<% if $Model %>
|
||||
<div class="field field-model">
|
||||
<b class="field-title"><%t SilverShop\Page\Product.Model "Model" %>:</b>
|
||||
<span class="field-val">$Model.XML</span>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<div class="field field-summary typography">
|
||||
$Summary
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<% include SilverShop\Includes\Price %>
|
||||
|
||||
<% if $View %>
|
||||
<div class="view">
|
||||
<a
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
class="btn btn-success"
|
||||
>
|
||||
<i class="fas fa-cart-bars"></i>
|
||||
<%t SilverShop\Page\Product.View "View Product" %>
|
||||
</a>
|
||||
</div>
|
||||
<% else_if $canPurchase %>
|
||||
<div class="add">
|
||||
<a
|
||||
href="$addLink"
|
||||
title="<%t SilverShop\Page\Product.AddToCartTitle "Add "{Title}" to your cart" Title=$Title %>"
|
||||
class="btn btn-success"
|
||||
>
|
||||
<i class="fas fa-cart-plus"></i>
|
||||
<%t SilverShop\Page\Product.AddToCart "Add to Cart" %>
|
||||
<% if $IsInCart %>
|
||||
($Item.Quantity)
|
||||
<% end_if %>
|
||||
</a>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
27
app/templates/SilverShop/Includes/ProductGroupPagination.ss
Normal file
27
app/templates/SilverShop/Includes/ProductGroupPagination.ss
Normal file
@ -0,0 +1,27 @@
|
||||
<% if $Products.MoreThanOnePage %>
|
||||
<div id="PageNumbers">
|
||||
<p><%t SilverShop\Includes\ProductGroup.Page "Page" %>:
|
||||
<% if $Products.NotFirstPage %>
|
||||
<a class="prev" href="$Products.PrevLink" title="<%t SilverShop\Includes\ProductGroup.ViewPrevious "View the previous page" %>"><%t SilverShop\Includes\ProductGroup.Previous "previous" %></a>
|
||||
<% end_if %>
|
||||
|
||||
<span>
|
||||
<% loop $Products.PaginationSummary(4) %>
|
||||
<% if $CurrentBool %>
|
||||
$PageNum
|
||||
<% else %>
|
||||
<% if $Link %>
|
||||
<a href="$Link" title="<%t SilverShop\Includes\ProductGroup.ViewPage "View page number {pageNum}" pageNum=$PageNum %>">$PageNum</a>
|
||||
<% else %>
|
||||
…
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</span>
|
||||
|
||||
<% if $Products.NotLastPage %>
|
||||
<a class="next" href="$Products.NextLink" title="<%t SilverShop\Includes\ProductGroup.ViewNext "View the next page" %>"><%t SilverShop\Includes\ProductGroup.Next "next" %></a>
|
||||
<% end_if %>
|
||||
</p>
|
||||
</div>
|
||||
<% end_if %>
|
22
app/templates/SilverShop/Includes/ProductMenu.ss
Normal file
22
app/templates/SilverShop/Includes/ProductMenu.ss
Normal file
@ -0,0 +1,22 @@
|
||||
<div id="ProductNavigation">
|
||||
<h3><% with $Level(1) %><a href="$Link">$Title</a><% end_with %></h3>
|
||||
<ul>
|
||||
<% loop $GroupsMenu %>
|
||||
<% if $Children %>
|
||||
<li class="$LinkingMode"><a href="$Link" title="<%t SilverShop\Includes\ProductMenu.GotoPageTitle "Go to the {Title} page" Title=$Title.XML %>" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
|
||||
<% else %>
|
||||
<li><a href="$Link" title=<%t SilverShop\Includes\ProductMenu.GotoPageTitle "Go to the {Title} page" Title=$Title.XML %>" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>
|
||||
<% end_if %>
|
||||
<% if $LinkOrSection == 'section' %>
|
||||
<% if $ChildGroups %>
|
||||
<ul>
|
||||
<% loop $ChildGroups %>
|
||||
<li><a href="$Link" title="<%t SilverShop\Includes\ProductMenu.GotoPageTitle "Go to the {Title} page" Title=$Title.XML %>" class="$LinkingMode levelb">$MenuTitle.LimitCharacters(22)</a></li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
12
app/templates/SilverShop/Includes/SideBar.ss
Normal file
12
app/templates/SilverShop/Includes/SideBar.ss
Normal file
@ -0,0 +1,12 @@
|
||||
<div id="Sidebar">
|
||||
<% if $GroupsMenu %>
|
||||
<% include SilverShop\Includes\ProductMenu %>
|
||||
<% else %>
|
||||
<% with $Parent %>
|
||||
<% include SilverShop\Includes\ProductMenu %>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<div class="cart">
|
||||
<% include SilverShop\Cart\SideCart %>
|
||||
</div>
|
||||
</div>
|
29
app/templates/SilverShop/Includes/VariationsTable.ss
Normal file
29
app/templates/SilverShop/Includes/VariationsTable.ss
Normal file
@ -0,0 +1,29 @@
|
||||
<table class="variationstable">
|
||||
<tr>
|
||||
<th><%t SilverShop\Model\ProductVariation.SINGULARNAME "Variation" %></th>
|
||||
<th><%t SilverShop\Page\Product.Price "Price" %></th>
|
||||
<% if $canPurchase %>
|
||||
<th><%t SilverShop\Model\Order.Quantity "Quantity" %></th>
|
||||
<% end_if %>
|
||||
</tr>
|
||||
<% loop $Variations %>
|
||||
<tr>
|
||||
<td>$Title.XML</td>
|
||||
<td>$Price.Nice $Currency</td>
|
||||
<td>
|
||||
<% if $canPurchase %>
|
||||
<% if $IsInCart %>
|
||||
<% with $Item %>
|
||||
$QuantityField
|
||||
<% end_with %>
|
||||
<% else %>
|
||||
<a href="$Item.addLink" title="<%t SilverShop\Page\Product.AddToCartTitle "Add "{Title}" to your cart" Title=$Title.XML %>">
|
||||
<%t SilverShop\Page\Product.AddToCart "Add to Cart" %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% end_if %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
</table>
|
9
app/templates/SilverShop/Model/Address.ss
Normal file
9
app/templates/SilverShop/Model/Address.ss
Normal file
@ -0,0 +1,9 @@
|
||||
<% if $Name %>$Name<br/><% end_if %>
|
||||
<% if $Company %>$Company<br/><% end_if %>
|
||||
<% if $Address %>$Address<br/><% end_if %>
|
||||
<% if $AddressLine2 %>$AddressLine2<br/><% end_if %>
|
||||
<% if $City %>$City<br/><% end_if %>
|
||||
<% if $PostalCode %>$PostalCode<br/><% end_if %>
|
||||
<% if $State %>$State<br/><% end_if %>
|
||||
<% if $Country %>$Country<br/><% end_if %>
|
||||
<% if $Phone %>$Phone<% end_if %>
|
32
app/templates/SilverShop/Model/Order.ss
Normal file
32
app/templates/SilverShop/Model/Order.ss
Normal file
@ -0,0 +1,32 @@
|
||||
<% require css("silvershop/core: client/dist/css/order.css") %>
|
||||
|
||||
<%-- As Order.ss is also used in emails, avoid div, paragraph and heading elements --%>
|
||||
<% include SilverShop\Model\Order_Address %>
|
||||
<% include SilverShop\Model\Order_Content %>
|
||||
<% if $Total %>
|
||||
<% if $Payments %>
|
||||
<% include SilverShop\Model\Order_Payments %>
|
||||
<% end_if %>
|
||||
<table id="OutstandingTable" class="infotable">
|
||||
<tbody>
|
||||
<tr class="gap summary" id="Outstanding">
|
||||
<th colspan="4" scope="row" class="threeColHeader"><strong><%t SilverShop\Model\Order.TotalOutstanding "Total outstanding" %></strong></th>
|
||||
<td class="right"><strong>$TotalOutstanding.Nice </strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end_if %>
|
||||
<% if $Notes %>
|
||||
<table id="NotesTable" class="infotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%t SilverShop\Model\Order.db_Notes "Notes" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</tbody>
|
||||
<tr>
|
||||
<td>$Notes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end_if %>
|
14
app/templates/SilverShop/Model/Order_Address.ss
Normal file
14
app/templates/SilverShop/Model/Order_Address.ss
Normal file
@ -0,0 +1,14 @@
|
||||
<table id="ShippingTable" class="infotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%t SilverShop\Model\Order.ShipTo "Ship To" %></th>
|
||||
<th><%t SilverShop\Model\Order.BillTo "Bill To" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>$getShippingAddress</td>
|
||||
<td>$getBillingAddress</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
|
||||
<title><%t SilverShop\ShopEmail.AdminNotificationTitle "Shop Receipt" %></title>
|
||||
<% include SilverShop\Includes\OrderReceiptStyle %>
|
||||
</head>
|
||||
<body>
|
||||
<table id="container" cellpadding="0" cellspacing="0" border="0" >
|
||||
<tr>
|
||||
<td>
|
||||
<table id="Content" cellspacing="0" cellpadding="0" summary="Email Information">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" colspan="2">
|
||||
<h1 class="title">$Subject</h1>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if $Order %>
|
||||
<% loop $Order %>
|
||||
<tr>
|
||||
<td>
|
||||
<% include SilverShop\Model\Order %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
41
app/templates/SilverShop/Model/Order_ConfirmationEmail.ss
Normal file
41
app/templates/SilverShop/Model/Order_ConfirmationEmail.ss
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
|
||||
<title><%t SilverShop\ShopEmail.ConfirmationTitle "Order Confirmation" %></title>
|
||||
<% include SilverShop\Includes\OrderReceiptStyle %>
|
||||
</head>
|
||||
<body>
|
||||
<table id="container" cellpadding="0" cellspacing="0" border="0" >
|
||||
<tr>
|
||||
<td>
|
||||
<table id="Content" cellspacing="0" cellpadding="0" summary="Email Information">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" colspan="2">
|
||||
<h1 class="title">$Subject</h1>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td scope="row" colspan="2" class="typography">
|
||||
$PurchaseCompleteMessage
|
||||
</td>
|
||||
</tr>
|
||||
<% if $Order %>
|
||||
<% loop $Order %>
|
||||
<tr>
|
||||
<td>
|
||||
<% include SilverShop\Model\Order %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
22
app/templates/SilverShop/Model/Order_Content.ss
Normal file
22
app/templates/SilverShop/Model/Order_Content.ss
Normal file
@ -0,0 +1,22 @@
|
||||
<table id="InformationTable" class="infotable ordercontent">
|
||||
<colgroup class="image"/>
|
||||
<colgroup class="product title"/>
|
||||
<colgroup class="unitprice" />
|
||||
<colgroup class="quantity" />
|
||||
<colgroup class="total"/>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col"><%t SilverShop\Page\Product.SINGULARNAME "Product" %></th>
|
||||
<th class="center" scope="col"><%t SilverShop\Model\Order.UnitPrice "Unit Price" %></th>
|
||||
<th class="center" scope="col"><%t SilverShop\Model\Order.Quantity "Quantity" %></th>
|
||||
<th class="right" scope="col"><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loop $Items %>
|
||||
<% include SilverShop\Model\Order_Content_ItemLine %>
|
||||
<% end_loop %>
|
||||
</tbody>
|
||||
<% include SilverShop\Model\Order_Content_SubTotals %>
|
||||
</table>
|
22
app/templates/SilverShop/Model/Order_Content_ItemLine.ss
Normal file
22
app/templates/SilverShop/Model/Order_Content_ItemLine.ss
Normal file
@ -0,0 +1,22 @@
|
||||
<tr class="itemRow $EvenOdd $FirstLast">
|
||||
<td class="image">
|
||||
<% if $Image %>
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$TableTitle %>">
|
||||
<img src="<% with $Image.setWidth(45) %>$Me.AbsoluteURL<% end_with %>" alt="$Buyable.Title"/>
|
||||
</a>
|
||||
<% end_if %>
|
||||
</td>
|
||||
<td class="product title" scope="row">
|
||||
<% if $Link %>
|
||||
<a href="$Link" title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$TableTitle %>">$TableTitle</a>
|
||||
<% else %>
|
||||
$TableTitle
|
||||
<% end_if %>
|
||||
<% if $SubTitle %>
|
||||
<span class="subtitle">$SubTitle</span>
|
||||
<% end_if %>
|
||||
</td>
|
||||
<td class="center unitprice">$UnitPrice.Nice</td>
|
||||
<td class="center quantity">$Quantity</td>
|
||||
<td class="right total">$Total.Nice</td>
|
||||
</tr>
|
18
app/templates/SilverShop/Model/Order_Content_SubTotals.ss
Normal file
18
app/templates/SilverShop/Model/Order_Content_SubTotals.ss
Normal file
@ -0,0 +1,18 @@
|
||||
<tfoot>
|
||||
<tr class="gap summary" id="SubTotal">
|
||||
<td colspan="4" scope="row" class="threeColHeader subtotal"><%t SilverShop\Model\Order.SubTotal "Sub-total" %></td>
|
||||
<td class="right">$SubTotal.Nice</td>
|
||||
</tr>
|
||||
<% loop $Modifiers %>
|
||||
<% if $ShowInTable %>
|
||||
<tr class="modifierRow $EvenOdd $FirstLast $Classes">
|
||||
<td colspan="4" scope="row">$TableTitle</td>
|
||||
<td class="right">$TableValue.Nice</td>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
<tr class="gap summary total" id="Total">
|
||||
<td colspan="4" scope="row" class="threeColHeader total"><%t SilverShop\Model\Order.Total "Total" %></td>
|
||||
<td class="right">$Total.Nice $Currency</td>
|
||||
</tr>
|
||||
</tfoot>
|
32
app/templates/SilverShop/Model/Order_Payments.ss
Normal file
32
app/templates/SilverShop/Model/Order_Payments.ss
Normal file
@ -0,0 +1,32 @@
|
||||
<table id="PaymentTable" class="infotable">
|
||||
<thead>
|
||||
<tr class="gap mainHeader">
|
||||
<th colspan="4" class="left"><%t SilverShop\Payment.PaymentsHeadline "Payment(s)" %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="twoColHeader"><%t SilverStripe\Omnipay\Model\Payment.Date "Date" %></th>
|
||||
<th scope="row" class="twoColHeader"><%t SilverStripe\Omnipay\Model\Payment.Amount "Amount" %></th>
|
||||
<th scope="row" class="twoColHeader"><%t SilverStripe\Omnipay\Model\Payment.db_Status "Payment Status" %></th>
|
||||
<th scope="row" class="twoColHeader"><%t SilverStripe\Omnipay\Model\Payment.db_Gateway "Method" %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% loop $Payments %>
|
||||
<tr>
|
||||
<td class="price">$Created.Nice</td>
|
||||
<td class="price">$Amount.Nice $Currency</td>
|
||||
<td class="price">$PaymentStatus</td>
|
||||
<td class="price">$GatewayTitle</td>
|
||||
</tr>
|
||||
<% if $ShowMessages %>
|
||||
<% loop $Messages %>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
$ClassName $Message $User.Name
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</tbody>
|
||||
</table>
|
41
app/templates/SilverShop/Model/Order_ReceiptEmail.ss
Normal file
41
app/templates/SilverShop/Model/Order_ReceiptEmail.ss
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
|
||||
<title><%t SilverShop\ShopEmail.ReceiptTitle "Shop Receipt" %></title>
|
||||
<% include SilverShop\Includes\OrderReceiptStyle %>
|
||||
</head>
|
||||
<body>
|
||||
<table id="container" cellpadding="0" cellspacing="0" border="0" >
|
||||
<tr>
|
||||
<td>
|
||||
<table id="Content" cellspacing="0" cellpadding="0" summary="Email Information">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" colspan="2">
|
||||
<h1 class="title">$Subject</h1>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td scope="row" colspan="2" class="typography">
|
||||
$PurchaseCompleteMessage
|
||||
</td>
|
||||
</tr>
|
||||
<% if $Order %>
|
||||
<% loop $Order %>
|
||||
<tr>
|
||||
<td>
|
||||
<% include SilverShop\Model\Order %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
135
app/templates/SilverShop/Model/Order_StatusEmail.ss
Normal file
135
app/templates/SilverShop/Model/Order_StatusEmail.ss
Normal file
@ -0,0 +1,135 @@
|
||||
<!-- Reference: https://github.com/mailgun/transactional-email-templates -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title><%t SilverShop\ShopEmail.StatusChangeTitle "Shop Status Change" %></title>
|
||||
<style type="text/css">
|
||||
table { /* Remove spacing around Outlook 07, 10 tables */
|
||||
border-collapse:collapse;
|
||||
mso-table-lspace:0pt;
|
||||
mso-table-rspace:0pt;
|
||||
}
|
||||
table td {border-collapse: collapse;} /* Outlook 07 & 10 padding issue */
|
||||
tr {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
}
|
||||
td {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
body, table#container {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
background-color: #f6f6f6;
|
||||
font-size: 14px;
|
||||
line-height: 1.6em;
|
||||
padding: 0;
|
||||
margin: auto;
|
||||
width: 100% !important;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust:100%;
|
||||
}
|
||||
table#container > tr > td {
|
||||
padding: 0 5px 0 5px;
|
||||
}
|
||||
td.max-width {
|
||||
max-width: 600px !important;
|
||||
display: block !important;
|
||||
clear: both !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
table.main {
|
||||
border: 1px solid #e9e9e9;
|
||||
border-radius: 3px;
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
td.banner {
|
||||
color: #fff;
|
||||
background-color: #659726;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
border-radius: 3px 3px 0 0;
|
||||
padding: 20px;
|
||||
}
|
||||
td#Content {
|
||||
padding: 20px;
|
||||
text-align:left;
|
||||
margin:auto;
|
||||
}
|
||||
td.content-block {
|
||||
padding: 0 0 20px;
|
||||
}
|
||||
@media only screen and (max-width: 640px) {
|
||||
body, table#container {
|
||||
padding: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
td#Content {
|
||||
padding: 10px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table id="container">
|
||||
<tr>
|
||||
<td class="max-width">
|
||||
<table class="main" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="banner" align="center" valign="top">
|
||||
<strong><%t SilverShop\ShopEmail.StatusChangeTitle 'Shop Status Change' %></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="Content" valign="top">
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<% with Order %>
|
||||
<tr>
|
||||
<td class="content-block" valign="top">
|
||||
<%t SilverStripe\Control\ChangePasswordEmail_ss.Hello 'Hello' %> <% if $FirstName %>$FirstName<% else %>$Member.FirstName<% end_if %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block" valign="top">
|
||||
<%t SilverShop\ShopEmail.StatusChanged 'Status for order #{OrderNo} changed to "{OrderStatus}"' OrderNo=$Reference OrderStatus=$StatusI18N %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end_with %>
|
||||
<tr>
|
||||
<td class="content-block" valign="top">
|
||||
$Note
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block" valign="top">
|
||||
<%t SilverShop\ShopEmail.Regards "Kind regards" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="content-block" valign="top">
|
||||
$SiteConfig.Title<br/>
|
||||
$FromEmail<br/>
|
||||
<%t SilverShop\ShopEmail.PhoneNumber "PhoneNumber" %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
21
app/templates/SilverShop/Page/Layout/AccountPage.ss
Normal file
21
app/templates/SilverShop/Page/Layout/AccountPage.ss
Normal file
@ -0,0 +1,21 @@
|
||||
<div class="container page-content">
|
||||
<div class="account element">
|
||||
<% include SilverShop\Includes\AccountNavigation %>
|
||||
|
||||
<% include Content %>
|
||||
|
||||
<h2 class="page-header">
|
||||
<%t SilverShop\Page\AccountPage.PastOrders 'Past Orders' %>
|
||||
</h2>
|
||||
|
||||
<% with $Member %>
|
||||
<% if $PastOrders %>
|
||||
<% include SilverShop\Includes\OrderHistory %>
|
||||
<% else %>
|
||||
<div class="alert alert-warning message warning">
|
||||
<%t SilverShop\Page\AccountPage.NoPastOrders 'No past orders found.' %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,73 @@
|
||||
<div class="page-content container">
|
||||
<div class="account element">
|
||||
<% include SilverShop\Includes\AccountNavigation %>
|
||||
|
||||
|
||||
<h2 class="pagetitle">
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.Title 'Default Addresses' %>
|
||||
</h2>
|
||||
|
||||
<%-- If you want the old dropdown system back you can just use $DefaultAddressForm here instead --%>
|
||||
<% if $CurrentMember.AddressBook %>
|
||||
<% loop $CurrentMember.AddressBook %>
|
||||
<div class="panel radius address-panel $EvenOdd">
|
||||
<% if $ID == $CurrentMember.DefaultShippingAddressID %>
|
||||
<span class="tag def-shipping">
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.DefaultShippingAddress 'Default Shipping Address' %>
|
||||
</span>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ID == $CurrentMember.DefaultBillingAddressID %>
|
||||
<span class="tag def-billing">
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.DefaultBillingAddress 'Default Billing Address' %>
|
||||
</span>
|
||||
<% end_if %>
|
||||
|
||||
<div class="panel-body">
|
||||
<% include SilverShop\Model\Address %>
|
||||
</div>
|
||||
|
||||
<div class="panel-footer cf">
|
||||
<% if $ID != $CurrentMember.DefaultShippingAddressID %>
|
||||
<a
|
||||
title="<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultShippingTitle 'Make this my default shipping address' %>"
|
||||
href="account/setdefaultshipping/{$ID}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultShipping 'Make Default Shipping' %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ID != $CurrentMember.DefaultBillingAddressID %>
|
||||
<a
|
||||
title="<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultBillingTitle 'Make this my default billing address' %>"
|
||||
href="account/setdefaultbilling/{$ID}"
|
||||
class="btn btn-primary"
|
||||
>
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.MakeDefaultBilling 'Make Default Billing' %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<a
|
||||
href="account/deleteaddress/{$ID}"
|
||||
class="remove-address"
|
||||
title="<%t SilverShop\Page\AccountPage_AddressBook.DeleteAddress 'Delete this address' %>"
|
||||
>
|
||||
<i class="fas fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<% else %>
|
||||
<div class="alert alert-warning">
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.NoAddress 'No addresses found.' %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<h2>
|
||||
<%t SilverShop\Page\AccountPage_AddressBook.CreateNewTitle 'Create New Address' %>
|
||||
</h2>
|
||||
|
||||
$CreateAddressForm
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
<div class="container page-content">
|
||||
<div class="element account">
|
||||
<% include SilverShop\Includes\AccountNavigation %>
|
||||
|
||||
<h2 class="pagetitle">
|
||||
<%t SilverShop\Page\AccountPage_EditProfile.Title 'Edit Profile' %>
|
||||
</h2>
|
||||
|
||||
$EditAccountForm
|
||||
$ChangePasswordForm
|
||||
</div>
|
||||
</div>
|
21
app/templates/SilverShop/Page/Layout/AccountPage_order.ss
Normal file
21
app/templates/SilverShop/Page/Layout/AccountPage_order.ss
Normal file
@ -0,0 +1,21 @@
|
||||
<div class="container page-content">
|
||||
<div class="element">
|
||||
<% include SilverShop\Includes\AccountNavigation %>
|
||||
<div class="account">
|
||||
<% if $Order %>
|
||||
<% with $Order %>
|
||||
<h2><%t SilverShop\Model\Order.OrderHeadline "Order #{OrderNo} {OrderDate}" OrderNo=$Reference OrderDate=$Created.Nice %></h2>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<% if $Message %>
|
||||
<div class="alert message $MessageType">$Message</div>
|
||||
<% end_if %>
|
||||
<% if $Order %>
|
||||
<% with $Order %>
|
||||
<% include SilverShop\Model\Order %>
|
||||
<% end_with %>
|
||||
$ActionsForm
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
35
app/templates/SilverShop/Page/Layout/CartPage.ss
Normal file
35
app/templates/SilverShop/Page/Layout/CartPage.ss
Normal file
@ -0,0 +1,35 @@
|
||||
<div class="container page-content">
|
||||
<div class="element cart-page">
|
||||
<% include Content %>
|
||||
|
||||
<% if $Cart %>
|
||||
|
||||
<% if $CartForm %>
|
||||
$CartForm
|
||||
<% else %>
|
||||
<% with $Cart %><% include SilverShop\Cart\Cart Editable=true %><% end_with %>
|
||||
<% end_if %>
|
||||
|
||||
<% else %>
|
||||
<div class="alert alert-warning message warning"><%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %></div>
|
||||
<% end_if %>
|
||||
|
||||
<div class="cartfooter">
|
||||
<% if $ContinueLink %>
|
||||
<a class="continuelink btn btn-primary" href="$ContinueLink">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
<%t SilverShop\Cart\ShoppingCart.ContinueShopping 'Continue Shopping' %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Cart %>
|
||||
<% if $CheckoutLink %>
|
||||
<a class="checkoutlink btn btn-primary" href="$CheckoutLink">
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
<%t SilverShop\Cart\ShoppingCart.ProceedToCheckout 'Proceed to Checkout' %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
22
app/templates/SilverShop/Page/Layout/CheckoutPage.ss
Normal file
22
app/templates/SilverShop/Page/Layout/CheckoutPage.ss
Normal file
@ -0,0 +1,22 @@
|
||||
<div class="page-content container">
|
||||
<div class="checkout element">
|
||||
<% if $PaymentErrorMessage %>
|
||||
<div class="alert alert-danger message error">
|
||||
<%t SilverShop\Page\CheckoutPage.PaymentErrorMessage 'Received error from payment gateway:' %>
|
||||
$PaymentErrorMessage
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include Content %>
|
||||
|
||||
<% if $Cart %>
|
||||
<% with $Cart %>
|
||||
<% include SilverShop\Cart\Cart ShowSubtotals=true %>
|
||||
<% end_with %>
|
||||
|
||||
$OrderForm
|
||||
<% else %>
|
||||
<div class="alert alert-warning message warning"><%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %></div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
<div class="page-content container">
|
||||
<div class="checkout element">
|
||||
<% include Content %>
|
||||
|
||||
<div class="createaccount">
|
||||
$Form
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,14 @@
|
||||
<div class="page-content container">
|
||||
<div class="checkout element">
|
||||
<% include Content %>
|
||||
|
||||
<div class="membership">
|
||||
$Form
|
||||
</div>
|
||||
|
||||
<div class="login">
|
||||
<h2><%t SilverStripe\Security\Security.LOGIN 'Log In' %></h2>
|
||||
$LoginForm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
20
app/templates/SilverShop/Page/Layout/CheckoutPage_order.ss
Normal file
20
app/templates/SilverShop/Page/Layout/CheckoutPage_order.ss
Normal file
@ -0,0 +1,20 @@
|
||||
<div class="page-content container">
|
||||
<div class="account element">
|
||||
<% if $Order %>
|
||||
<% with $Order %>
|
||||
<h2><%t SilverShop\Model\Order.OrderHeadline "Order #{OrderNo} {OrderDate}" OrderNo=$Reference OrderDate=$Created.Nice %></h2>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Message %>
|
||||
<div class="alert alert-{$MessageType} message $MessageType">$Message</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Order %>
|
||||
<% with $Order %>
|
||||
<% include SilverShop\Model\Order %>
|
||||
<% end_with %>
|
||||
$Form
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,7 @@
|
||||
<div class="container page-content">
|
||||
<div class="checkout element">
|
||||
<% include Content %>
|
||||
|
||||
$OrderForm
|
||||
</div>
|
||||
</div>
|
68
app/templates/SilverShop/Page/Layout/Product.ss
Normal file
68
app/templates/SilverShop/Page/Layout/Product.ss
Normal file
@ -0,0 +1,68 @@
|
||||
<div class="container page-content">
|
||||
<div class="product-item element">
|
||||
<div class="product-details">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<% if $Image %>
|
||||
<a
|
||||
class="product-image"
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
>
|
||||
<img src="$Image.Fill(570,840).URL" alt="<%t SilverShop\Page\Product.ImageAltText "{Title} image" Title=$Title %>" />
|
||||
</a>
|
||||
<% else %>
|
||||
<a
|
||||
class="product-image product-image-no"
|
||||
href="$Link"
|
||||
title="<%t SilverShop\Generic.ReadMoreTitle "Click here to read more on "{Title}"" Title=$Title %>"
|
||||
><!-- no image --></a>
|
||||
<% end_if %>
|
||||
|
||||
|
||||
<div class="field field-title">
|
||||
<h4 class="field-val">{$Title}</h4>
|
||||
</div>
|
||||
|
||||
<% if $InternalItemID %>
|
||||
<div class="field field-internal-item-id">
|
||||
<b class="field-title"><%t SilverShop\Page\Product.Code "Product Code" %>:</b>
|
||||
<span class="field-val">{$InternalItemID}</span>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Model %>
|
||||
<div class="field field-model">
|
||||
<b class="field-title"><%t SilverShop\Page\Product.Model "Model" %>:</b>
|
||||
<span class="field-val">$Model.XML</span>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Size %>
|
||||
<div class="field field-size">
|
||||
<b class="field-title"><%t SilverShop\Page\Product.Size "Size" %>:</b>
|
||||
<span class="field-val">$Size.XML</span>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<% include Content %>
|
||||
<% include SilverShop\Includes\Price %>
|
||||
|
||||
<% if $IsInCart %>
|
||||
<div class="product-num-items-in-cart">
|
||||
<% if $Item.Quantity == 1 %>
|
||||
<%t SilverShop\Page\Product.NumItemsInCartSingular "You have this item in your cart" %>
|
||||
<% else %>
|
||||
<%t SilverShop\Page\Product.NumItemsInCartPlural "You have {Quantity} items in your cart" Quantity=$Item.Quantity %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- include SilverShop\Includes\SideBar --%>
|
||||
</div>
|
24
app/templates/SilverShop/Page/Layout/ProductCategory.ss
Normal file
24
app/templates/SilverShop/Page/Layout/ProductCategory.ss
Normal file
@ -0,0 +1,24 @@
|
||||
<% include Content %>
|
||||
|
||||
<div class="container page-content">
|
||||
<div class="product-group element">
|
||||
<% if $Products %>
|
||||
<div class="category">
|
||||
<%-- include Sorter --%>
|
||||
<div class="product-list row">
|
||||
<% loop $Products %>
|
||||
<div class="col-sm-6">
|
||||
<% include SilverShop\Includes\ProductGroupItem %>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
|
||||
<% with $Products %>
|
||||
<% include Objects\Pagination %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<%-- include SilverShop\Includes\SideBar --%>
|
||||
</div>
|
202
app/templates/SilverShop/Page/Layout/SteppedCheckoutPage.ss
Normal file
202
app/templates/SilverShop/Page/Layout/SteppedCheckoutPage.ss
Normal file
@ -0,0 +1,202 @@
|
||||
<div class="container page-content">
|
||||
<% if $PaymentErrorMessage %>
|
||||
<div class="alert alert-danger message error">
|
||||
<%t SilverShop\Page\CheckoutPage.PaymentErrorMessage 'Received error from payment gateway:' %>
|
||||
$PaymentErrorMessage
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Cart %>
|
||||
<div id="Checkout" class="accordion element">
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<h3 class="accordion-toggle" id="cont">
|
||||
<a href="cart" title="edit cart contents">Cart</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% with $Cart %>
|
||||
<% include SilverShop\Cart\Cart %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<% if $IsPastStep('contactdetails') %>
|
||||
<h3><a href="$Link('contactdetails')" class="accordion-toggle" title="edit contact details">Contact</a></h3>
|
||||
<% else %>
|
||||
<h3 class="accordion-toggle">Contact</h3>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% if $IsFutureStep('contactdetails') %>
|
||||
|
||||
<% else %>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% if $IsCurrentStep('contactdetails') %>
|
||||
<p><%t SilverShop\Checkout\Step\Address.SupplyContactInformation "Supply your contact information" %></p>
|
||||
$OrderForm
|
||||
<% end_if %>
|
||||
<% if $IsPastStep('contactdetails') %>
|
||||
<% with $Cart %>
|
||||
$Name ($Email)
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<% if $IsPastStep('shippingaddress') %>
|
||||
<h3><a class="accordion-toggle" title="edit address(es)" href="$Link('shippingaddress')">
|
||||
<%t SilverShop\Model\Address.SINGULARNAME "Address" %>
|
||||
</a></h3>
|
||||
<% else %>
|
||||
<h3 class="accordion-toggle"><%t SilverShop\Model\Address.SINGULARNAME "Address" %></h3>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% if $IsFutureStep('shippingaddress') %>
|
||||
|
||||
<% else %>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% if $IsCurrentStep('shippingaddress') %>
|
||||
<p><%t SilverShop\Checkout\Step\Address.EnterShippingAddress "Please enter your shipping address details." %></p>
|
||||
$OrderForm
|
||||
<% end_if %>
|
||||
<% if $IsPastStep('shippingaddress') %>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<% with $Cart %>
|
||||
<h4><%t SilverShop\Checkout\Step\Address.ShipTo "Ship To:" %></h4>
|
||||
$ShippingAddress
|
||||
<% end_with %>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h4><%t SilverShop\Checkout\Step\Address.BillTo "Bill To:" %></h4>
|
||||
<% if $IsCurrentStep('billingaddress') %>
|
||||
$OrderForm
|
||||
<% else %>
|
||||
<% with $Cart %>
|
||||
$BillingAddress
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<% if $IsPastStep('shippingmethod') %>
|
||||
<h3><a class="accordion-toggle" title="choose shipping method" href="$Link('shippingmethod')">
|
||||
<%t SilverShop\Checkout\Step\CheckoutStep.Shipping "Shipping" %>
|
||||
</a></h3>
|
||||
<% else %>
|
||||
<h3 class="accordion-toggle"><%t SilverShop\Checkout\Step\CheckoutStep.Shipping "Shipping" %></h3>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% if $IsFutureStep('shippingmethod') %>
|
||||
|
||||
<% else %>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% if $IsCurrentStep('shippingmethod') %>
|
||||
$OrderForm
|
||||
<% end_if %>
|
||||
<% if $IsPastStep('shippingmethod') %>
|
||||
<% with $Cart %>
|
||||
<p>$ShippingMethod.Title</p>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<% if $IsPastStep('paymentmethod') %>
|
||||
<h3><a class="accordion-toggle" title="choose payment method" href="$Link('paymentmethod')">
|
||||
<%t SilverShop\Forms\OrderActionsForm.PaymentMethod "Payment Method" %>
|
||||
</a></h3>
|
||||
<% else %>
|
||||
<h3 class="accordion-toggle"><%t SilverShop\Forms\OrderActionsForm.PaymentMethod "Payment Method" %></h3>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% if $IsFutureStep('paymentmethod') %>
|
||||
|
||||
<% else %>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% if $IsCurrentStep('paymentmethod') %>
|
||||
$OrderForm
|
||||
<% end_if %>
|
||||
<% if $IsPastStep('paymentmethod') %>
|
||||
$SelectedPaymentMethod
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<h3 class="accordion-toggle"><%t SilverShop\Checkout\Step\CheckoutStep.Summary "Summary" %></h3>
|
||||
</div>
|
||||
<% if $IsFutureStep('summary') %>
|
||||
|
||||
<% else %>
|
||||
<div class="accordion-body">
|
||||
<div class="accordion-inner">
|
||||
<% if $IsCurrentStep('summary') %>
|
||||
<% with $Cart %>
|
||||
<table class="table">
|
||||
<tfoot>
|
||||
<% loop $Modifiers %>
|
||||
<% if $ShowInTable %>
|
||||
<tr class="modifierRow $EvenOdd $FirstLast $ClassName">
|
||||
<td colspan="3">$TableTitle</td>
|
||||
<td>$TableValue.Nice</td>
|
||||
</tr>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
<tr>
|
||||
<th colspan="3"><%t SilverShop\Model\Order.GrandTotal "Grand Total" %></th>
|
||||
<td>$Total.Nice $Currency</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<% end_with %>
|
||||
$OrderForm
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<div class="message warning alert alert-block alert-info">
|
||||
<h4 class="alert-heading"><%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %></h4>
|
||||
</div>
|
||||
|
||||
<% if $ContinueLink %>
|
||||
<a class="continuelink btn btn-primary" href="$ContinueLink">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
<%t SilverShop\Cart\ShoppingCart.ContinueShopping 'Continue Shopping' %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% end_if %>
|
||||
</div>
|
@ -1,25 +1,24 @@
|
||||
<div id="PageContainer" class="page{$ClassName} action{$Action}">
|
||||
<article class="blog-entry">
|
||||
|
||||
<% if $FeaturedImage %>
|
||||
<div id="CarouselTop" class="carousel slide js-carousel d-none d-sm-block">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item">
|
||||
<img class="d-block w-100" src="$FeaturedImage.Fill(1200,400).URL" alt="$Title">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include Content %>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="element">
|
||||
<div class="container">
|
||||
<% if $FeaturedImage %>
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
$FeaturedImage.Fill(100,100)
|
||||
</div>
|
||||
<div class="col-sm-10">
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user