From 26858c92dfd9625e3aba3b3154157a979d6d6de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 17 Nov 2021 12:34:09 +0300 Subject: [PATCH] close #2312 Enhancement: Apps page pricing re-desging --- public/img/modules/save30arrow3.png | Bin 0 -> 1355 bytes resources/lang/en-GB/modules.php | 12 ++- resources/views/modules/item/show.blade.php | 91 ++++++------------ .../views/partials/modules/item.blade.php | 37 ++++--- .../views/partials/modules/pre_sale.blade.php | 19 ++-- .../modules/show/actions_header.blade.php | 23 +++++ .../partials/modules/show/buttons.blade.php | 51 ++++++++++ .../partials/modules/show/price.blade.php | 73 ++++++++++++++ 8 files changed, 220 insertions(+), 86 deletions(-) create mode 100644 public/img/modules/save30arrow3.png create mode 100644 resources/views/partials/modules/show/actions_header.blade.php create mode 100644 resources/views/partials/modules/show/buttons.blade.php create mode 100644 resources/views/partials/modules/show/price.blade.php diff --git a/public/img/modules/save30arrow3.png b/public/img/modules/save30arrow3.png new file mode 100644 index 0000000000000000000000000000000000000000..156c72d4abd38795eb460cc4a64e8de0bf548158 GIT binary patch literal 1355 zcmV-R1+@B!P)r002G+1^@s6^xT6700009a7bBm000&x z000&x0ZCFM@Bjb+0drDELIAGL9O(c600d`2O+f$vv5yP#mT)|UG$FsKGH>;7 z=*X>VJ-Pn%w5^@IDf!RhDT-LkU}X0- zJ=J(Jahn#=rlLhsltg@!I79wHmHAM=GtPrv;zy@ksCh3nUSyw5J&(A4n%k(lR_dC) z!A%%ii*=2cHbtC$k#|+Lr*Mlw&+Rf`$C@6DY(n3OEFCV2VxMYVHr4n6Z4mcp1K}yz z6cKGu?X(al>h$ss7~YdOvO6qv%CQ8TJ4pshE6pz@C;3H*Ry7nuu{ zax#X~SnRY-6EIH!4p{hQLI(b(+J7`epCiJI-uOd&e_Ag4XPpvGEdpoQLv_A^q6fGCky@*4b zm26gR*j4$biR(lR@4K)!^#%+r*S{dbUwM8w?fDiinMpm>$Ux|qYg396;aiSE!u1`p znP~5CBfCQ1XGl)nGEiIRKBRr#p3T1`V!WrLr=);yBH-LG{bu!uwn`CJXg44-YxI>t zoZ6lrkkLBe9c}O8Gi`pGQGVsfZaek9R9TB0Qz(5TySM+F0AFFseca_rDdKAl4A zo8~zyAo(nZER2l#`zrd>U;_D36brCHe_Dwc?yL0V0){?K??fWGL-aCu>YTAwfOMgr zOLdVuBw&1wHac>81J1J)_FM~nlpjdO<#V*!_jomVJ5x4;{8;2W=iZr=0N+n}FzNJ5 z7C^vQSzgh64ZTd35B#+3Z;-{{oud`URDbG`LFbiV?6=6j7@^}l;6(l+AJAV431smU zU&Q(?T;ULx0AE?2L5PFibSsL(H_4<+!fpR27=#c)2qA N002ovPDHLkV1hqIbI$+( literal 0 HcmV?d00001 diff --git a/resources/lang/en-GB/modules.php b/resources/lang/en-GB/modules.php index 6dce6e04b..f6c10851a 100644 --- a/resources/lang/en-GB/modules.php +++ b/resources/lang/en-GB/modules.php @@ -9,13 +9,23 @@ return [ 'new' => 'New', 'top_free' => 'Top Free', 'free' => 'FREE', + 'monthly' => 'Monthly', + 'yearly' => 'Yearly', + 'yearly_pricing' => 'Yearly Pricing', + 'monthly_price' => 'from :price', + 'per_month' => 'per month', + 'billed_yearly' => 'Billed Yearly', + 'billed_monthly' => 'Billed Monthly', + 'save_year' => 'You save :price a year!', + 'if_paid_year' => 'Or :price/mo if paid yearly', + 'information_monthly' => 'This option is valid only for Cloud Service', 'install' => 'Install', 'buy_now' => 'Buy Now', 'get_api_key' => 'Click here to get your API key.', 'no_apps' => 'There are no apps in this category, yet.', 'become_developer' => 'Are you a developer? Here you can learn how to create an app and start selling today!', 'recommended_apps' => 'Recommended Apps', - 'can_not_install' => 'You can not install :app app.
Beacuse monthly subscription just support cloud', + 'can_not_install' => 'Monthly subscriptions are available only on Cloud service. Learn more.', 'about' => 'About', diff --git a/resources/views/modules/item/show.blade.php b/resources/views/modules/item/show.blade.php index 585d46b19..04b25061a 100644 --- a/resources/views/modules/item/show.blade.php +++ b/resources/views/modules/item/show.blade.php @@ -15,7 +15,7 @@
-

{{ $module->name }}

+

{!! $module->name !!}

@@ -39,6 +39,7 @@ {{ trans('general.description') }} + @if ($module->installation) @endif + @if ($module->faq) @endif + @if ($module->changelog) @endif + @@ -75,7 +79,7 @@ {!! $module->description !!} @if($module->screenshots || $module->video) - video) @php if (strpos($module->video->link, '=') !== false) { @@ -259,71 +263,15 @@

{{ trans_choice('general.actions', 1) }}

+ @include('partials.modules.show.actions_header') +
-
- -
- @if ($module->price == '0.0000') - {{ trans('modules.free') }} - @else - {!! $module->price_prefix !!} - - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} - @endif -
-
-
+ @include('partials.modules.show.price')
@@ -338,24 +286,28 @@ {{ $module->vendor_name }} @endif + @if ($module->version) {{ trans('footer.version') }} {{ $module->version }} @endif + @if ($module->created_at) {{ trans('modules.added') }} @date($module->created_at) @endif + @if ($module->updated_at) {{ trans('modules.updated') }} {{ Date::parse($module->updated_at)->diffForHumans() }} @endif + @if ($module->categories) {{ trans_choice('general.categories', (count($module->categories) > 1) ? 2 : 1) }} @@ -366,6 +318,7 @@ @endif + {{ trans('modules.documentation') }} @if ($module->documentation) @@ -373,7 +326,7 @@ {{ trans('modules.view') }} @else - {{ trans('general.na') }} + {{ trans('general.na') }} @endif @@ -411,6 +364,16 @@ @push('scripts_start') diff --git a/resources/views/partials/modules/item.blade.php b/resources/views/partials/modules/item.blade.php index 4a4d53910..e4481c38e 100644 --- a/resources/views/partials/modules/item.blade.php +++ b/resources/views/partials/modules/item.blade.php @@ -2,9 +2,27 @@

- {{ $module->name }} + {!! $module->name !!}

+ @if (!empty($module->subscription_type)) + + @php $subscription_color = 'bg-info'; @endphp + + @if ($module->subscription_type == 'monthly') + @php $subscription_color = 'bg-warning'; @endphp + @endif + + + @if ($module->subscription_type == 'yearly') + {{ trans('modules.yearly') }} + @else + {{ trans('modules.monthly') }} + @endif + + + @endif + @if (isset($installed[$module->slug])) @php $color = 'bg-green'; @endphp @@ -12,8 +30,10 @@ @php $color = 'bg-warning'; @endphp @endif - - {{ trans('modules.badge.installed') }} + + + {{ trans('modules.badge.installed') }} + @endif
@@ -38,7 +58,7 @@ @if ($module->total_review) - ({{ $module->total_review }}) + ({{ $module->total_review }}) @endif
@@ -49,14 +69,7 @@ @if ($module->price == '0.0000') {{ trans('modules.free') }} @else - {!! $module->price_prefix !!} - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} + {{ trans('modules.monthly_price', ['price' => $module->yearly_per_monthly_price]) }} @endif diff --git a/resources/views/partials/modules/pre_sale.blade.php b/resources/views/partials/modules/pre_sale.blade.php index ae36c26a1..1e8d3b01e 100644 --- a/resources/views/partials/modules/pre_sale.blade.php +++ b/resources/views/partials/modules/pre_sale.blade.php @@ -2,7 +2,7 @@

- {{ $module->name }} + {!! $module->name !!}

@@ -31,14 +31,15 @@ @if ($module->price == '0.0000') {{ trans('modules.free') }} @else - {!! $module->price_prefix !!} - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} + @if ($module->is_discount) + + {!! $module->yearly_price !!} + + + {!! $module->yearly_special_price !!} + @else + {!! $module->yearly_price !!} + @endif @endif diff --git a/resources/views/partials/modules/show/actions_header.blade.php b/resources/views/partials/modules/show/actions_header.blade.php new file mode 100644 index 000000000..0107e8a5a --- /dev/null +++ b/resources/views/partials/modules/show/actions_header.blade.php @@ -0,0 +1,23 @@ +@if ($module->price != '0.0000') + + {{ trans('modules.yearly_pricing') }} + +@endif + +@if ($module->price != '0.0000') + +@endif diff --git a/resources/views/partials/modules/show/buttons.blade.php b/resources/views/partials/modules/show/buttons.blade.php new file mode 100644 index 000000000..5e3128876 --- /dev/null +++ b/resources/views/partials/modules/show/buttons.blade.php @@ -0,0 +1,51 @@ +@if ($installed) + @can('delete-modules-item') + + {{ trans('modules.button.uninstall') }} + + @endcan + + @can('update-modules-item') + @if ($enable) + + {{ trans('modules.button.disable') }} + + @else + + {{ trans('modules.button.enable') }} + + @endif + @endcan +@else + @can('create-modules-item') + @if ($module->install) + @if (!empty($module->isPurchase) && (!empty($module->purchase_type) && $module->purchase_type == 'monthly')) + +
{!! trans('modules.can_not_install') !!}
+ + +
+ @else + + @endif + @else + + {{ trans('modules.buy_now') }} + + @endif + @endcan +@endif + +@if (!empty($module->purchase_desc)) +
+ {!! $module->purchase_desc !!} +
+@endif diff --git a/resources/views/partials/modules/show/price.blade.php b/resources/views/partials/modules/show/price.blade.php new file mode 100644 index 000000000..5b0f329b4 --- /dev/null +++ b/resources/views/partials/modules/show/price.blade.php @@ -0,0 +1,73 @@ +@if ($module->price != '0.0000') +
+
+
+ +
+ @if ($module->price == '0.0000') + {{ trans('modules.free') }} + @else + {!! $module->yearly_per_monthly_price !!} {{ trans('modules.per_month') }} + @endif +
+
+
+ +
+ + {{ trans('modules.billed_yearly') }} + +
+ +
+ + {!! trans('modules.save_year', ['price' => '$' . $module->raw_monthly_price * 4]) !!} + +
+ +
+ +
+
+ +
+
+ +
+ @if ($module->price == '0.0000') + {{ trans('modules.free') }} + @else + {!! $module->monthly_price !!} {{ trans('modules.per_month') }} + @endif +
+
+
+ +
+ + {{ trans('modules.billed_monthly') }} + +
+ +
+ + {!! trans('modules.if_paid_year', ['price' => $module->yearly_per_monthly_price]) !!} + +
+ +
+ + * {!! trans('modules.information_monthly') !!} + +
+
+
+@else +
+ +
+ {{ trans('modules.free') }} +
+
+
+@endif