diff --git a/app/src/Extensions/BlogPostExtension.php b/app/src/Extensions/BlogPostExtension.php index a9d7895..c093d62 100644 --- a/app/src/Extensions/BlogPostExtension.php +++ b/app/src/Extensions/BlogPostExtension.php @@ -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; - } } diff --git a/app/src/Pages/Page.php b/app/src/Pages/Page.php index 7cae93c..49d063a 100644 --- a/app/src/Pages/Page.php +++ b/app/src/Pages/Page.php @@ -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; + } } diff --git a/app/templates/Includes/BlogPostInfo.ss b/app/templates/Includes/BlogPostInfo.ss index 1e00a80..4f7f0fb 100644 --- a/app/templates/Includes/BlogPostInfo.ss +++ b/app/templates/Includes/BlogPostInfo.ss @@ -1,25 +1,27 @@ -
+
$PublishDate.Format("d")
$PublishDate.Format("MMM")
<% if $FeaturedImage %> -
+ <% end_if %> - <% include SilverStripe\\Blog\\EntryMeta %> +
+
+ + $Title + +
-
- - $Title - -
+
+ $Summary +
-
- $Summary + <%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> » + + <% include SilverStripe\\Blog\\EntryMeta %>
- - Read More » -
\ No newline at end of file +
diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Addresses.ss b/app/templates/SilverShop/Admin/OrderAdmin_Addresses.ss new file mode 100644 index 0000000..98f1da1 --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Addresses.ss @@ -0,0 +1,26 @@ +
+ + + + + + + + + + + + + + + + + + + + + +
+

<%t SilverShop\Model\Address.SINGULARNAME "Address" %>

+
<%t SilverShop\Model\Order.ShipTo "Ship To" %><%t SilverShop\Model\Order.BillTo "Bill To" %>
$getShippingAddress$getBillingAddress
+
diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Content.ss b/app/templates/SilverShop/Admin/OrderAdmin_Content.ss new file mode 100644 index 0000000..9d11e10 --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Content.ss @@ -0,0 +1,24 @@ +
+ + + + + + + + + + + + + + + <% loop $Items %> + <% include SilverShop\Admin\OrderAdmin_Content_ItemLine %> + <% end_loop %> + + <% include SilverShop\Admin\OrderAdmin_Content_SubTotals %> +
+

<%t SilverShop\Model\OrderItem.PLURALNAME "Items" %>

+
<%t SilverShop\Page\Product.SINGULARNAME "Product" %><%t SilverShop\Model\Order.UnitPrice "Unit Price" %><%t SilverShop\Model\Order.Quantity "Quantity" %><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %>
+
diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Content_ItemLine.ss b/app/templates/SilverShop/Admin/OrderAdmin_Content_ItemLine.ss new file mode 100644 index 0000000..a42679c --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Content_ItemLine.ss @@ -0,0 +1,25 @@ + + + <% if $Buyable && $Buyable.Image %> +
+ "> + $Buyable.Title + +
+ <% end_if %> + + + + <% if $Link %> + $TableTitle + <% else %> + $TableTitle + <% end_if %> + + <% if $SubTitle %>
$SubTitle
<% end_if %> + <% if $Buyable.InternalItemID %>
<%t SilverShop\Page\Product.ProductCodeShort "SKU" %>: $Buyable.InternalItemID
<% end_if %> + + $UnitPrice.Nice + $Quantity + $Total.Nice + diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Content_SubTotals.ss b/app/templates/SilverShop/Admin/OrderAdmin_Content_SubTotals.ss new file mode 100644 index 0000000..5a7faf5 --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Content_SubTotals.ss @@ -0,0 +1,30 @@ + + + <%t SilverShop\Model\Order.SubTotal "Sub-total" %> + $SubTotal.Nice + + <% loop $Modifiers %> + <% if $ShowInTable %> + + + $TableTitle + <% if $SubTitle %>($SubTitle)<% end_if %> + + $TableValue.Nice + + <% end_if %> + <% end_loop %> + + <%t SilverShop\Model\Order.Total "Total" %> + $Total.Nice $Currency + + <% if $TotalOutstanding %> + + <%t SilverShop\Model\Order.Outstanding "Outstanding" %> + $TotalOutstanding.Nice $Currency + + <% end_if %> + + + + diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Customer.ss b/app/templates/SilverShop/Admin/OrderAdmin_Customer.ss new file mode 100644 index 0000000..e8debe6 --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Customer.ss @@ -0,0 +1,30 @@ +
+ + + + + + + + + + + + + + + + + + + + + +
+

<%t SilverShop\Generic.Customer "Customer" %>

+
<%t SilverShop\Page\AccountPage.MemberName "Name" %><%t SilverShop\Page\AccountPage.MemberEmail "Email" %>
$Name + <% if $LatestEmail %> + $LatestEmail + <% end_if %> +
+
diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Notes.ss b/app/templates/SilverShop/Admin/OrderAdmin_Notes.ss new file mode 100644 index 0000000..08bfd4f --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Notes.ss @@ -0,0 +1,21 @@ +
+ + + + + + + + + + + + + + + + +
+

<%t SilverShop\Model\Order.db_Notes "Notes" %>

+
$Notes
+
diff --git a/app/templates/SilverShop/Admin/OrderAdmin_Printable.ss b/app/templates/SilverShop/Admin/OrderAdmin_Printable.ss new file mode 100644 index 0000000..40a9749 --- /dev/null +++ b/app/templates/SilverShop/Admin/OrderAdmin_Printable.ss @@ -0,0 +1,16 @@ + + + <% base_tag %> + $MetaTags + <% include SilverShop\Includes\OrderReceiptStyle %> + + +
+

+ <%t SilverShop\Admin\OrdersAdmin.ReceiptTitle "{SiteTitle} Order {OrderNo}" SiteTitle=$SiteConfig.Title OrderNo=$Reference %> +

+ <% include SilverShop\Model\Order %> +
+ + + diff --git a/app/templates/SilverShop/Cart/Cart.ss b/app/templates/SilverShop/Cart/Cart.ss new file mode 100644 index 0000000..cb136b9 --- /dev/null +++ b/app/templates/SilverShop/Cart/Cart.ss @@ -0,0 +1,117 @@ +<% if $Items %> + "> + + + + + + + + + + + + + + + + <% if $Editable %> + + <% end_if %> + + + + <% loop $Items %><% if $ShowInTable %> + + + + + + + <% if $Up.Editable %> + + <% end_if %> + + <% end_if %><% end_loop %> + + + + + + <% if $Editable %><% end_if %> + + <% if $ShowSubtotals %> + <% if $Modifiers %> + <% loop $Modifiers %> + <% if $ShowInTable %> + + + + <% if $Up.Editable %> + + <% end_if %> + + <% if $Form %> + + + + <% end_if %> + <% end_if %> + <% end_loop %> + <% end_if %> + + + + <% if $Editable %><% end_if %> + + <% end_if %> + +
<%t SilverShop\Page\Product.SINGULARNAME "Product" %><%t SilverShop\Model\Order.UnitPrice "Unit Price" %><%t SilverShop\Model\Order.Quantity "Quantity" %><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %><%t SilverShop\Generic.Remove "Remove" %>
+ <% if $Image %> + + <% end_if %> + +

+ <% if $Link %> + ">$TableTitle + <% else %> + $TableTitle + <% end_if %> +

+ <% if $SubTitle %>

$SubTitle

<% end_if %> + <% if $Product.Variations && $Up.Editable %> + <%t SilverShop\Generic.Change "Change" %>: $VariationField + <% end_if %> +
$UnitPrice.Nice<% if $Up.Editable %>$QuantityField<% else %>$Quantity<% end_if %>$Total.Nice + <% if $RemoveField %> + $RemoveField + <% else %> + "> + x + + <% end_if %> + +
<%t SilverShop\Model\Order.SubTotal "Sub-total" %>$SubTotal.Nice 
+ <% if $Link %> + ">$TableTitle + <% else %> + $TableTitle + <% end_if %> + $TableValue.Nice + <% if $CanRemove %> + + "> + x + + + <% end_if %> +
$Form
<%t SilverShop\Model\Order.Total "Total" %>$Total.Nice $Currency 
+<% else %> +

+ <%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %> +

+<% end_if %> diff --git a/app/templates/SilverShop/Cart/ShoppingCart_debug.ss b/app/templates/SilverShop/Cart/ShoppingCart_debug.ss new file mode 100644 index 0000000..10aa2ab --- /dev/null +++ b/app/templates/SilverShop/Cart/ShoppingCart_debug.ss @@ -0,0 +1,9 @@ + + + $MetaTags(0) + Debugging ShoppingCart + + + $Content + + diff --git a/app/templates/SilverShop/Cart/SideCart.ss b/app/templates/SilverShop/Cart/SideCart.ss new file mode 100644 index 0000000..fc482e7 --- /dev/null +++ b/app/templates/SilverShop/Cart/SideCart.ss @@ -0,0 +1,40 @@ +<% require css("silvershop/core: client/dist/css/sidecart.css") %> + +
+

<%t SilverShop\Cart\ShoppingCart.Headline "Shopping cart" %>

+ <% if $Cart %> + <% with $Cart %> +

+ <% if $Items.Plural %> + <%t SilverShop\Cart\ShoppingCart.ItemsInCartPlural 'There are {quantity} items in your cart.' link=$Top.CartLink quantity=$Items.Quantity %> + <% else %> + <%t SilverShop\Cart\ShoppingCart.ItemsInCartSingular 'There is 1 item in your cart.' link=$Top.CartLink %> + <% end_if %> +

+ + <% loop $Items %> +
+ <% if $Product.Image %> + + <% end_if %> +

+ "> + $TableTitle + +

+

$Quantity x $UnitPrice.Nice

+ <% if $SubTitle %>

$SubTitle

<% end_if %> + ">x +
+ <% end_loop %> + <% end_with %> + <% else %> +

<%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %>

+ <% end_if %> +
diff --git a/app/templates/SilverShop/Dev/ShopDevelopmentAdmin.ss b/app/templates/SilverShop/Dev/ShopDevelopmentAdmin.ss new file mode 100644 index 0000000..2f059c6 --- /dev/null +++ b/app/templates/SilverShop/Dev/ShopDevelopmentAdmin.ss @@ -0,0 +1,21 @@ +

<%t SilverShop\Dev\ShopDevelopmentAdmin.CartTasks "Cart tasks" %>

+ + +

<%t SilverShop\Dev\ShopDevelopmentAdmin.BuildTasks "Build Tasks" %>

+ + +

<%t SilverShop\Dev\ShopDevelopmentAdmin.UnitTests "Unit Tests" %>

+ diff --git a/app/templates/SilverShop/Forms/ShopQuantityField.ss b/app/templates/SilverShop/Forms/ShopQuantityField.ss new file mode 100644 index 0000000..c67774f --- /dev/null +++ b/app/templates/SilverShop/Forms/ShopQuantityField.ss @@ -0,0 +1,7 @@ +
+ ">- + $Field + ">+ +
diff --git a/app/templates/SilverShop/Includes/AccountNavigation.ss b/app/templates/SilverShop/Includes/AccountNavigation.ss new file mode 100644 index 0000000..acc26a3 --- /dev/null +++ b/app/templates/SilverShop/Includes/AccountNavigation.ss @@ -0,0 +1,47 @@ +
+ +
+ <% with $CurrentMember %> +
+
<%t SilverShop\Page\AccountPage.MemberName 'Name' %>
+
$Name
+ +
<%t SilverShop\Page\AccountPage.MemberEmail 'Email' %>
+
$Email
+ +
<%t SilverShop\Page\AccountPage.MemberSince 'Member Since' %>
+
$Created.Nice
+ +
<%t SilverShop\Page\AccountPage.MemberLastVisit 'Last Visit' %>
+
$LastVisited.Nice
+ +
<%t SilverShop\Page\AccountPage.NumberOfOrders 'Number of orders' %>
+
<% if $PastOrders %>{$PastOrders.Count}<% else %>0<% end_if %>
+
+ <% end_with %> +
+
diff --git a/app/templates/SilverShop/Includes/OrderHistory.ss b/app/templates/SilverShop/Includes/OrderHistory.ss new file mode 100644 index 0000000..8dc4193 --- /dev/null +++ b/app/templates/SilverShop/Includes/OrderHistory.ss @@ -0,0 +1,28 @@ + + + + + + + + + + + + + <% loop $PastOrders %> + + + + + + + + + <% end_loop %> + +
<%t SilverShop\Model\Order.db_Reference 'Reference' %><%t SilverShop\Model\Order.Date 'Date' %><%t SilverShop\Model\Order.has_many_Items 'Items' %><%t SilverShop\Model\Order.Total 'Total' %><%t SilverShop\Model\Order.db_Status 'Status' %>
$Reference$Created.Nice$Items.Quantity$Total.Nice$StatusI18N + + <%t SilverShop\Generic.View 'view' %> + +
diff --git a/app/templates/SilverShop/Includes/OrderReceiptStyle.ss b/app/templates/SilverShop/Includes/OrderReceiptStyle.ss new file mode 100644 index 0000000..67f82ea --- /dev/null +++ b/app/templates/SilverShop/Includes/OrderReceiptStyle.ss @@ -0,0 +1,159 @@ + diff --git a/app/templates/SilverShop/Includes/Price.ss b/app/templates/SilverShop/Includes/Price.ss new file mode 100644 index 0000000..44d1404 --- /dev/null +++ b/app/templates/SilverShop/Includes/Price.ss @@ -0,0 +1,13 @@ +<% if $PriceRange %> +
+ $PriceRange.Min.Nice + <% if $PriceRange.HasRange %> + - $PriceRange.Max.Nice + <% end_if %> + $Price.Currency +
+<% else_if $Price %> +
+ $Price.Nice $Price.Currency +
+<% end_if %> \ No newline at end of file diff --git a/app/templates/SilverShop/Includes/PriceTag.ss b/app/templates/SilverShop/Includes/PriceTag.ss new file mode 100644 index 0000000..75be637 --- /dev/null +++ b/app/templates/SilverShop/Includes/PriceTag.ss @@ -0,0 +1,14 @@ +
+ <% if $DiscountedPrice %> + + $Price.Symbol + $Price.Main + $Price.Fractional + $Price.CurrencyCode + + $DiscountedPrice.Nice <%t SilverShop\Includes\PriceTag.SAVE "Save" %>: $DiscountedPrice.Savings + <% else %> + $Price.Nice + <% end_if %> + <% if $RecommendedPrice %>$RecommendedPrice.Nice<% end_if %> +
diff --git a/app/templates/SilverShop/Includes/ProductGroupItem.ss b/app/templates/SilverShop/Includes/ProductGroupItem.ss new file mode 100644 index 0000000..80831c3 --- /dev/null +++ b/app/templates/SilverShop/Includes/ProductGroupItem.ss @@ -0,0 +1,70 @@ +
+
+ <% if $Image %> + " + > + <%t SilverShop\Page\Product.ImageAltText " /> + + <% else %> + " + > + <% end_if %> +
+ +
+

+ " + >$Title +

+ + <% if $Model %> +
+ <%t SilverShop\Page\Product.Model "Model" %>: + $Model.XML +
+ <% end_if %> + +
+ $Summary +
+ + +
+
diff --git a/app/templates/SilverShop/Includes/ProductGroupPagination.ss b/app/templates/SilverShop/Includes/ProductGroupPagination.ss new file mode 100644 index 0000000..ffef4bd --- /dev/null +++ b/app/templates/SilverShop/Includes/ProductGroupPagination.ss @@ -0,0 +1,27 @@ +<% if $Products.MoreThanOnePage %> +
+

<%t SilverShop\Includes\ProductGroup.Page "Page" %>: + <% if $Products.NotFirstPage %> + + <% end_if %> + + + <% loop $Products.PaginationSummary(4) %> + <% if $CurrentBool %> + $PageNum + <% else %> + <% if $Link %> + ">$PageNum + <% else %> + … + <% end_if %> + <% end_if %> + <% end_loop %> + + + <% if $Products.NotLastPage %> + + <% end_if %> +

+
+<% end_if %> diff --git a/app/templates/SilverShop/Includes/ProductMenu.ss b/app/templates/SilverShop/Includes/ProductMenu.ss new file mode 100644 index 0000000..cb7f360 --- /dev/null +++ b/app/templates/SilverShop/Includes/ProductMenu.ss @@ -0,0 +1,22 @@ +
+

<% with $Level(1) %>$Title<% end_with %>

+ +
diff --git a/app/templates/SilverShop/Includes/SideBar.ss b/app/templates/SilverShop/Includes/SideBar.ss new file mode 100644 index 0000000..1553cb5 --- /dev/null +++ b/app/templates/SilverShop/Includes/SideBar.ss @@ -0,0 +1,12 @@ + diff --git a/app/templates/SilverShop/Includes/VariationsTable.ss b/app/templates/SilverShop/Includes/VariationsTable.ss new file mode 100644 index 0000000..4f02b82 --- /dev/null +++ b/app/templates/SilverShop/Includes/VariationsTable.ss @@ -0,0 +1,29 @@ + + + + + <% if $canPurchase %> + + <% end_if %> + + <% loop $Variations %> + + + + + + <% end_loop %> +
<%t SilverShop\Model\ProductVariation.SINGULARNAME "Variation" %><%t SilverShop\Page\Product.Price "Price" %><%t SilverShop\Model\Order.Quantity "Quantity" %>
$Title.XML$Price.Nice $Currency + <% if $canPurchase %> + <% if $IsInCart %> + <% with $Item %> + $QuantityField + <% end_with %> + <% else %> + "> + <%t SilverShop\Page\Product.AddToCart "Add to Cart" %> + + <% end_if %> + + <% end_if %> +
diff --git a/app/templates/SilverShop/Model/Address.ss b/app/templates/SilverShop/Model/Address.ss new file mode 100644 index 0000000..6645f17 --- /dev/null +++ b/app/templates/SilverShop/Model/Address.ss @@ -0,0 +1,9 @@ +<% if $Name %>$Name
<% end_if %> +<% if $Company %>$Company
<% end_if %> +<% if $Address %>$Address
<% end_if %> +<% if $AddressLine2 %>$AddressLine2
<% end_if %> +<% if $City %>$City
<% end_if %> +<% if $PostalCode %>$PostalCode
<% end_if %> +<% if $State %>$State
<% end_if %> +<% if $Country %>$Country
<% end_if %> +<% if $Phone %>$Phone<% end_if %> diff --git a/app/templates/SilverShop/Model/Order.ss b/app/templates/SilverShop/Model/Order.ss new file mode 100644 index 0000000..249a882 --- /dev/null +++ b/app/templates/SilverShop/Model/Order.ss @@ -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 %> + + + + + + + +
<%t SilverShop\Model\Order.TotalOutstanding "Total outstanding" %>$TotalOutstanding.Nice
+<% end_if %> +<% if $Notes %> + + + + + + + + + + + +
<%t SilverShop\Model\Order.db_Notes "Notes" %>
$Notes
+<% end_if %> diff --git a/app/templates/SilverShop/Model/Order_Address.ss b/app/templates/SilverShop/Model/Order_Address.ss new file mode 100644 index 0000000..8cc516b --- /dev/null +++ b/app/templates/SilverShop/Model/Order_Address.ss @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +
<%t SilverShop\Model\Order.ShipTo "Ship To" %><%t SilverShop\Model\Order.BillTo "Bill To" %>
$getShippingAddress$getBillingAddress
diff --git a/app/templates/SilverShop/Model/Order_AdminNotificationEmail.ss b/app/templates/SilverShop/Model/Order_AdminNotificationEmail.ss new file mode 100644 index 0000000..24ba758 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_AdminNotificationEmail.ss @@ -0,0 +1,36 @@ + + + + + <%t SilverShop\ShopEmail.AdminNotificationTitle "Shop Receipt" %> + <% include SilverShop\Includes\OrderReceiptStyle %> + + + + + + +
+ + + + + + + + <% if $Order %> + <% loop $Order %> + + + + <% end_loop %> + <% end_if %> + +
+

$Subject

+
+ <% include SilverShop\Model\Order %> +
+
+ + diff --git a/app/templates/SilverShop/Model/Order_ConfirmationEmail.ss b/app/templates/SilverShop/Model/Order_ConfirmationEmail.ss new file mode 100644 index 0000000..c0418a4 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_ConfirmationEmail.ss @@ -0,0 +1,41 @@ + + + + + <%t SilverShop\ShopEmail.ConfirmationTitle "Order Confirmation" %> + <% include SilverShop\Includes\OrderReceiptStyle %> + + + + + + +
+ + + + + + + + + + + <% if $Order %> + <% loop $Order %> + + + + <% end_loop %> + <% end_if %> + +
+

$Subject

+
+ $PurchaseCompleteMessage +
+ <% include SilverShop\Model\Order %> +
+
+ + diff --git a/app/templates/SilverShop/Model/Order_Content.ss b/app/templates/SilverShop/Model/Order_Content.ss new file mode 100644 index 0000000..ee0240c --- /dev/null +++ b/app/templates/SilverShop/Model/Order_Content.ss @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + <% loop $Items %> + <% include SilverShop\Model\Order_Content_ItemLine %> + <% end_loop %> + + <% include SilverShop\Model\Order_Content_SubTotals %> +
<%t SilverShop\Page\Product.SINGULARNAME "Product" %><%t SilverShop\Model\Order.UnitPrice "Unit Price" %><%t SilverShop\Model\Order.Quantity "Quantity" %><%t SilverShop\Model\Order.TotalPriceWithCurrency "Total Price ({Currency})" Currency=$Currency %>
diff --git a/app/templates/SilverShop/Model/Order_Content_ItemLine.ss b/app/templates/SilverShop/Model/Order_Content_ItemLine.ss new file mode 100644 index 0000000..5cdd758 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_Content_ItemLine.ss @@ -0,0 +1,22 @@ + + + <% if $Image %> + "> + $Buyable.Title + + <% end_if %> + + + <% if $Link %> + ">$TableTitle + <% else %> + $TableTitle + <% end_if %> + <% if $SubTitle %> + $SubTitle + <% end_if %> + + $UnitPrice.Nice + $Quantity + $Total.Nice + diff --git a/app/templates/SilverShop/Model/Order_Content_SubTotals.ss b/app/templates/SilverShop/Model/Order_Content_SubTotals.ss new file mode 100644 index 0000000..396a408 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_Content_SubTotals.ss @@ -0,0 +1,18 @@ + + + <%t SilverShop\Model\Order.SubTotal "Sub-total" %> + $SubTotal.Nice + + <% loop $Modifiers %> + <% if $ShowInTable %> + + $TableTitle + $TableValue.Nice + + <% end_if %> + <% end_loop %> + + <%t SilverShop\Model\Order.Total "Total" %> + $Total.Nice $Currency + + diff --git a/app/templates/SilverShop/Model/Order_Payments.ss b/app/templates/SilverShop/Model/Order_Payments.ss new file mode 100644 index 0000000..90157e9 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_Payments.ss @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + <% loop $Payments %> + + + + + + + <% if $ShowMessages %> + <% loop $Messages %> + + + + <% end_loop %> + <% end_if %> + <% end_loop %> + +
<%t SilverShop\Payment.PaymentsHeadline "Payment(s)" %>
<%t SilverStripe\Omnipay\Model\Payment.Date "Date" %><%t SilverStripe\Omnipay\Model\Payment.Amount "Amount" %><%t SilverStripe\Omnipay\Model\Payment.db_Status "Payment Status" %><%t SilverStripe\Omnipay\Model\Payment.db_Gateway "Method" %>
$Created.Nice$Amount.Nice $Currency$PaymentStatus$GatewayTitle
+ $ClassName $Message $User.Name +
diff --git a/app/templates/SilverShop/Model/Order_ReceiptEmail.ss b/app/templates/SilverShop/Model/Order_ReceiptEmail.ss new file mode 100644 index 0000000..d9153e5 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_ReceiptEmail.ss @@ -0,0 +1,41 @@ + + + + + <%t SilverShop\ShopEmail.ReceiptTitle "Shop Receipt" %> + <% include SilverShop\Includes\OrderReceiptStyle %> + + + + + + +
+ + + + + + + + + + + <% if $Order %> + <% loop $Order %> + + + + <% end_loop %> + <% end_if %> + +
+

$Subject

+
+ $PurchaseCompleteMessage +
+ <% include SilverShop\Model\Order %> +
+
+ + diff --git a/app/templates/SilverShop/Model/Order_StatusEmail.ss b/app/templates/SilverShop/Model/Order_StatusEmail.ss new file mode 100644 index 0000000..47b2d20 --- /dev/null +++ b/app/templates/SilverShop/Model/Order_StatusEmail.ss @@ -0,0 +1,135 @@ + + + + + + + <%t SilverShop\ShopEmail.StatusChangeTitle "Shop Status Change" %> + + + + + + + +
+ + + + + + + + + +
+ + <% with Order %> + + + + + + + <% end_with %> + + + + + + + + + + +
+ <%t SilverStripe\Control\ChangePasswordEmail_ss.Hello 'Hello' %> <% if $FirstName %>$FirstName<% else %>$Member.FirstName<% end_if %> +
+ <%t SilverShop\ShopEmail.StatusChanged 'Status for order #{OrderNo} changed to "{OrderStatus}"' OrderNo=$Reference OrderStatus=$StatusI18N %> +
+ $Note +
+ <%t SilverShop\ShopEmail.Regards "Kind regards" %> +
+ $SiteConfig.Title
+ $FromEmail
+ <%t SilverShop\ShopEmail.PhoneNumber "PhoneNumber" %> +
+
+
+ + diff --git a/app/templates/SilverShop/Page/Layout/AccountPage.ss b/app/templates/SilverShop/Page/Layout/AccountPage.ss new file mode 100644 index 0000000..778580e --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/AccountPage.ss @@ -0,0 +1,21 @@ +
+ +
diff --git a/app/templates/SilverShop/Page/Layout/AccountPage_addressbook.ss b/app/templates/SilverShop/Page/Layout/AccountPage_addressbook.ss new file mode 100644 index 0000000..2d2960c --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/AccountPage_addressbook.ss @@ -0,0 +1,73 @@ +
+ +
diff --git a/app/templates/SilverShop/Page/Layout/AccountPage_editprofile.ss b/app/templates/SilverShop/Page/Layout/AccountPage_editprofile.ss new file mode 100644 index 0000000..910e138 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/AccountPage_editprofile.ss @@ -0,0 +1,12 @@ +
+ +
diff --git a/app/templates/SilverShop/Page/Layout/AccountPage_order.ss b/app/templates/SilverShop/Page/Layout/AccountPage_order.ss new file mode 100644 index 0000000..6ff091f --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/AccountPage_order.ss @@ -0,0 +1,21 @@ +
+
+ <% include SilverShop\Includes\AccountNavigation %> + +
+
diff --git a/app/templates/SilverShop/Page/Layout/CartPage.ss b/app/templates/SilverShop/Page/Layout/CartPage.ss new file mode 100644 index 0000000..f5a332d --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CartPage.ss @@ -0,0 +1,35 @@ +
+
+ <% include Content %> + + <% if $Cart %> + + <% if $CartForm %> + $CartForm + <% else %> + <% with $Cart %><% include SilverShop\Cart\Cart Editable=true %><% end_with %> + <% end_if %> + + <% else %> +
<%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %>
+ <% end_if %> + +
+ <% if $ContinueLink %> + + + <%t SilverShop\Cart\ShoppingCart.ContinueShopping 'Continue Shopping' %> + + <% end_if %> + + <% if $Cart %> + <% if $CheckoutLink %> + + + <%t SilverShop\Cart\ShoppingCart.ProceedToCheckout 'Proceed to Checkout' %> + + <% end_if %> + <% end_if %> +
+
+
diff --git a/app/templates/SilverShop/Page/Layout/CheckoutPage.ss b/app/templates/SilverShop/Page/Layout/CheckoutPage.ss new file mode 100644 index 0000000..e9c73b1 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CheckoutPage.ss @@ -0,0 +1,22 @@ +
+
+ <% if $PaymentErrorMessage %> +
+ <%t SilverShop\Page\CheckoutPage.PaymentErrorMessage 'Received error from payment gateway:' %> + $PaymentErrorMessage +
+ <% end_if %> + + <% include Content %> + + <% if $Cart %> + <% with $Cart %> + <% include SilverShop\Cart\Cart ShowSubtotals=true %> + <% end_with %> + + $OrderForm + <% else %> +
<%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %>
+ <% end_if %> +
+
diff --git a/app/templates/SilverShop/Page/Layout/CheckoutPage_createaccount.ss b/app/templates/SilverShop/Page/Layout/CheckoutPage_createaccount.ss new file mode 100644 index 0000000..348922f --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CheckoutPage_createaccount.ss @@ -0,0 +1,9 @@ +
+
+ <% include Content %> + +
+ $Form +
+
+
diff --git a/app/templates/SilverShop/Page/Layout/CheckoutPage_membership.ss b/app/templates/SilverShop/Page/Layout/CheckoutPage_membership.ss new file mode 100644 index 0000000..05958d0 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CheckoutPage_membership.ss @@ -0,0 +1,14 @@ +
+
+ <% include Content %> + +
+ $Form +
+ + +
+
diff --git a/app/templates/SilverShop/Page/Layout/CheckoutPage_order.ss b/app/templates/SilverShop/Page/Layout/CheckoutPage_order.ss new file mode 100644 index 0000000..04270f1 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CheckoutPage_order.ss @@ -0,0 +1,20 @@ +
+ +
diff --git a/app/templates/SilverShop/Page/Layout/CheckoutPage_payment.ss b/app/templates/SilverShop/Page/Layout/CheckoutPage_payment.ss new file mode 100644 index 0000000..57c8f42 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/CheckoutPage_payment.ss @@ -0,0 +1,7 @@ +
+
+ <% include Content %> + + $OrderForm +
+
diff --git a/app/templates/SilverShop/Page/Layout/Product.ss b/app/templates/SilverShop/Page/Layout/Product.ss new file mode 100644 index 0000000..2636d4f --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/Product.ss @@ -0,0 +1,68 @@ +
+
+
+
+
+ <% if $Image %> + " + > + <%t SilverShop\Page\Product.ImageAltText " /> + + <% else %> + " + > + <% end_if %> + + +
+

{$Title}

+
+ + <% if $InternalItemID %> +
+ <%t SilverShop\Page\Product.Code "Product Code" %>: + {$InternalItemID} +
+ <% end_if %> + + <% if $Model %> +
+ <%t SilverShop\Page\Product.Model "Model" %>: + $Model.XML +
+ <% end_if %> + + <% if $Size %> +
+ <%t SilverShop\Page\Product.Size "Size" %>: + $Size.XML +
+ <% end_if %> +
+ +
+ <% include Content %> + <% include SilverShop\Includes\Price %> + + <% if $IsInCart %> +
+ <% 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 %> +
+ <% end_if %> +
+
+
+
+ + <%-- include SilverShop\Includes\SideBar --%> +
diff --git a/app/templates/SilverShop/Page/Layout/ProductCategory.ss b/app/templates/SilverShop/Page/Layout/ProductCategory.ss new file mode 100644 index 0000000..423a073 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/ProductCategory.ss @@ -0,0 +1,24 @@ +<% include Content %> + +
+
+ <% if $Products %> +
+ <%-- include Sorter --%> +
+ <% loop $Products %> +
+ <% include SilverShop\Includes\ProductGroupItem %> +
+ <% end_loop %> +
+ + <% with $Products %> + <% include Objects\Pagination %> + <% end_with %> +
+ <% end_if %> +
+ + <%-- include SilverShop\Includes\SideBar --%> +
diff --git a/app/templates/SilverShop/Page/Layout/SteppedCheckoutPage.ss b/app/templates/SilverShop/Page/Layout/SteppedCheckoutPage.ss new file mode 100644 index 0000000..c287ef2 --- /dev/null +++ b/app/templates/SilverShop/Page/Layout/SteppedCheckoutPage.ss @@ -0,0 +1,202 @@ +
+<% if $PaymentErrorMessage %> +
+ <%t SilverShop\Page\CheckoutPage.PaymentErrorMessage 'Received error from payment gateway:' %> + $PaymentErrorMessage +
+<% end_if %> + +<% if $Cart %> +
+ +
+
+

+ Cart +

+
+
+
+ <% with $Cart %> + <% include SilverShop\Cart\Cart %> + <% end_with %> +
+
+
+ +
+
+ <% if $IsPastStep('contactdetails') %> +

Contact

+ <% else %> +

Contact

+ <% end_if %> +
+ <% if $IsFutureStep('contactdetails') %> + + <% else %> +
+
+ <% if $IsCurrentStep('contactdetails') %> +

<%t SilverShop\Checkout\Step\Address.SupplyContactInformation "Supply your contact information" %>

+ $OrderForm + <% end_if %> + <% if $IsPastStep('contactdetails') %> + <% with $Cart %> + $Name ($Email) + <% end_with %> + <% end_if %> +
+
+ <% end_if %> +
+ +
+
+ <% if $IsPastStep('shippingaddress') %> +

+ <%t SilverShop\Model\Address.SINGULARNAME "Address" %> +

+ <% else %> +

<%t SilverShop\Model\Address.SINGULARNAME "Address" %>

+ <% end_if %> +
+ <% if $IsFutureStep('shippingaddress') %> + + <% else %> +
+
+ <% if $IsCurrentStep('shippingaddress') %> +

<%t SilverShop\Checkout\Step\Address.EnterShippingAddress "Please enter your shipping address details." %>

+ $OrderForm + <% end_if %> + <% if $IsPastStep('shippingaddress') %> +
+
+ <% with $Cart %> +

<%t SilverShop\Checkout\Step\Address.ShipTo "Ship To:" %>

+ $ShippingAddress + <% end_with %> +
+
+

<%t SilverShop\Checkout\Step\Address.BillTo "Bill To:" %>

+ <% if $IsCurrentStep('billingaddress') %> + $OrderForm + <% else %> + <% with $Cart %> + $BillingAddress + <% end_with %> + <% end_if %> +
+
+ <% end_if %> +
+
+ <% end_if %> +
+ +
+
+ <% if $IsPastStep('shippingmethod') %> +

+ <%t SilverShop\Checkout\Step\CheckoutStep.Shipping "Shipping" %> +

+ <% else %> +

<%t SilverShop\Checkout\Step\CheckoutStep.Shipping "Shipping" %>

+ <% end_if %> +
+ <% if $IsFutureStep('shippingmethod') %> + + <% else %> +
+
+ <% if $IsCurrentStep('shippingmethod') %> + $OrderForm + <% end_if %> + <% if $IsPastStep('shippingmethod') %> + <% with $Cart %> +

$ShippingMethod.Title

+ <% end_with %> + <% end_if %> +
+
+ <% end_if %> +
+ +
+
+ <% if $IsPastStep('paymentmethod') %> +

+ <%t SilverShop\Forms\OrderActionsForm.PaymentMethod "Payment Method" %> +

+ <% else %> +

<%t SilverShop\Forms\OrderActionsForm.PaymentMethod "Payment Method" %>

+ <% end_if %> +
+ <% if $IsFutureStep('paymentmethod') %> + + <% else %> +
+
+ <% if $IsCurrentStep('paymentmethod') %> + $OrderForm + <% end_if %> + <% if $IsPastStep('paymentmethod') %> + $SelectedPaymentMethod + <% end_if %> +
+
+ <% end_if %> +
+ +
+
+

<%t SilverShop\Checkout\Step\CheckoutStep.Summary "Summary" %>

+
+ <% if $IsFutureStep('summary') %> + + <% else %> +
+
+ <% if $IsCurrentStep('summary') %> + <% with $Cart %> + + + <% loop $Modifiers %> + <% if $ShowInTable %> + + + + + <% end_if %> + <% end_loop %> + + + + + +
$TableTitle$TableValue.Nice
<%t SilverShop\Model\Order.GrandTotal "Grand Total" %>$Total.Nice $Currency
+ <% end_with %> + $OrderForm + <% end_if %> +
+
+ <% end_if %> +
+ +
+<% else %> + +
+

<%t SilverShop\Cart\ShoppingCart.NoItems "There are no items in your cart." %>

+
+ + <% if $ContinueLink %> + + + <%t SilverShop\Cart\ShoppingCart.ContinueShopping 'Continue Shopping' %> + + <% end_if %> + +<% end_if %> +
diff --git a/app/templates/SilverStripe/Blog/Model/Layout/BlogPost.ss b/app/templates/SilverStripe/Blog/Model/Layout/BlogPost.ss index 730f7ed..bd537f6 100644 --- a/app/templates/SilverStripe/Blog/Model/Layout/BlogPost.ss +++ b/app/templates/SilverStripe/Blog/Model/Layout/BlogPost.ss @@ -1,23 +1,22 @@
+ <% if $FeaturedImage %> + + <% end_if %> + <% include Content %>
- <% if $FeaturedImage %> -
-
- $FeaturedImage.Fill(100,100) -
-
- <% include SilverStripe\\Blog\\EntryMeta %> -
-
- <% else %> - <% include SilverStripe\\Blog\\EntryMeta %> - <% end_if %> + <% include SilverStripe\\Blog\\EntryMeta %>
diff --git a/app/templates/Layout/HomePage.ss b/app/templates/Site/Pages/Layout/HomePage.ss similarity index 100% rename from app/templates/Layout/HomePage.ss rename to app/templates/Site/Pages/Layout/HomePage.ss