From 43699be5242788b8e3c65a87bb4f87bffc4b6e41 Mon Sep 17 00:00:00 2001 From: Aimeos Date: Mon, 17 Jan 2022 12:08:36 +0100 Subject: [PATCH] Rewritten account subscription --- .../Account/Subscription/Detail/Standard.php | 2 +- .../subscription/detail-body-standard.php | 18 +++++-- .../subscription/lists-body-standard.php | 11 ++-- .../Subscription/Lists/StandardTest.php | 2 +- .../themes/default/account-subscription.css | 12 +---- .../themes/default/account-subscription.js | 50 +++++++------------ client/html/themes/default/aimeos.css | 6 ++- 7 files changed, 46 insertions(+), 55 deletions(-) diff --git a/client/html/src/Client/Html/Account/Subscription/Detail/Standard.php b/client/html/src/Client/Html/Account/Subscription/Detail/Standard.php index c22a9338b..2b58f7302 100644 --- a/client/html/src/Client/Html/Account/Subscription/Detail/Standard.php +++ b/client/html/src/Client/Html/Account/Subscription/Detail/Standard.php @@ -228,7 +228,7 @@ public function data( \Aimeos\MW\View\Iface $view, array &$tags = [], string &$e } } - $view->detailItem = $item; + $view->subscriptionItem = $item; $view->summaryBasket = $basket; $view->summaryTaxRates = $this->getTaxRates( $basket ); $view->summaryNamedTaxes = $this->getNamedTaxes( $basket ); diff --git a/client/html/templates/account/subscription/detail-body-standard.php b/client/html/templates/account/subscription/detail-body-standard.php index 39521da28..5b8036ea8 100644 --- a/client/html/templates/account/subscription/detail-body-standard.php +++ b/client/html/templates/account/subscription/detail-body-standard.php @@ -5,6 +5,16 @@ * @copyright Aimeos (aimeos.org), 2018-2022 */ +/* Available data: + * - subscriptionItem : Subscription item + * - summaryBasket : Basket + * - summaryTaxRates : Prices by tax rates + * - summaryNamedTaxes : Prices by tax names + * - summaryCostsDelivery : Delivery costs + * - summaryCostsPayment : Payment costs + */ + + $enc = $this->encoder(); @@ -97,12 +107,12 @@
- + html( $this->translate( 'client', 'Close' ), $enc::TRUST ) ?> - detailItem->getDateEnd() == null ) : ?> - 'cancel', 'sub_id' => $this->detailItem->getId()] ?> - + subscriptionItem->getDateEnd() == null ) : ?> + 'cancel', 'sub_id' => $this->subscriptionItem->getId()] ?> + html( $this->translate( 'client', 'Cancel' ), $enc::TRUST ) ?> diff --git a/client/html/templates/account/subscription/lists-body-standard.php b/client/html/templates/account/subscription/lists-body-standard.php index 000c24766..5e91ab51e 100644 --- a/client/html/templates/account/subscription/lists-body-standard.php +++ b/client/html/templates/account/subscription/lists-body-standard.php @@ -85,14 +85,15 @@ get( 'listsItems', map() )->isEmpty() ) : ?> -