Actualización
This commit is contained in:
223
plugin/buycourses/view/catalog.tpl
Normal file
223
plugin/buycourses/view/catalog.tpl
Normal file
@@ -0,0 +1,223 @@
|
||||
<div id="buy-courses-tabs">
|
||||
{% if sessions_are_included %}
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
{% if coursesExist %}
|
||||
<li id="buy-courses-tab" class="{{ showing_courses ? 'active' : '' }}" role="presentation">
|
||||
<a href="course_catalog.php" aria-controls="buy-courses" role="tab">{{ 'Courses'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if sessionExist %}
|
||||
<li id="buy-sessions-tab" class="{{ showing_sessions ? 'active' : '' }}" role="presentation">
|
||||
<a href="session_catalog.php" aria-controls="buy-sessions" role="tab">{{ 'Sessions'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="{{ showing_services ? 'active' : '' }}" role="presentation">
|
||||
<a href="service_catalog.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" aria-labelledby="buy-sessions-tab" role="tabpanel">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ search_filter_form }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row grid-courses">
|
||||
{% if showing_courses %}
|
||||
{% for course in courses %}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<article class="items-course">
|
||||
<div class="items-course-image">
|
||||
<figure class="img-responsive">
|
||||
<img alt="{{ course.title }}"
|
||||
class="img-responsive"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="items-course-info">
|
||||
{% set course_description_url = _p.web_ajax ~ 'course_home.ajax.php?' ~ {'code': course.code, 'a': 'show_course_information'}|url_encode() %}
|
||||
<h4 class="title">
|
||||
<a class="ajax" href="{{ course_description_url }}"
|
||||
data-title="{{ course.title }}">{{ course.title }}</a>
|
||||
</h4>
|
||||
<ul class="list-unstyled">
|
||||
{% for teacher in course.teachers %}
|
||||
<li><em class="fa fa-user"></em> {{ teacher }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p class="text-right">
|
||||
<span class="label label-primary">
|
||||
{{ course.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
{% if course.enrolled == "YES" %}
|
||||
<div class="alert alert-success">
|
||||
<em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
{% elseif course.enrolled == "NO" %}
|
||||
<div class="toolbar">
|
||||
<a class="ajax btn btn-info btn-block btn-sm" title=""
|
||||
href="{{ course_description_url }}"
|
||||
data-title="{{ course.title }}">
|
||||
<em class="fa fa-file-text"></em> {{ 'SeeDescription'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
<a class="btn btn-success btn-block btn-sm" title=""
|
||||
href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': course.id, 't': 1}|url_encode() }}">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% elseif course.enrolled == "TMP" %}
|
||||
<div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if showing_sessions %}
|
||||
{% for session in sessions %}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<article class="items-course">
|
||||
<div class="items-course-image">
|
||||
<figure class="img-responsive">
|
||||
<img alt="{{ session.name }}" class="img-responsive"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="items-course-info">
|
||||
<h4 class="title">
|
||||
<a href="{{ _p.web ~ 'session/' ~ session.id ~ '/about/' }}">{{ session.name }}</a>
|
||||
</h4>
|
||||
{% if 'show_session_coach'|api_get_setting == 'true' %}
|
||||
<p><em class="fa fa-user fa-fw"></em> {{ session.coach }}</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<em class="fa fa-calendar fa-fw"></em>
|
||||
{% if session.duration %}
|
||||
{{ 'SessionDurationXDaysTotal'|get_lang|format(session.duration) }}
|
||||
{% else %}
|
||||
{{ session.dates.display }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="text-right">
|
||||
<span class="label label-primary">
|
||||
{{ session.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<!--
|
||||
<ul class="list-unstyled">
|
||||
{% for course in session.courses %}
|
||||
<li>
|
||||
<em class="fa fa-book fa-fw"></em> {{ course.title }}
|
||||
{% if course.coaches|length %}
|
||||
<ul>
|
||||
{% for coach in course.coaches %}
|
||||
<li>{{ coach }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
-->
|
||||
{% if session.enrolled == "YES" %}
|
||||
<div class="alert alert-success">
|
||||
<em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheSession'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
{% elseif session.enrolled == "NO" %}
|
||||
<div class="toolbar">
|
||||
<a class="btn btn-success btn-block btn-sm"
|
||||
href="{{ _p.web_plugin ~ 'buycourses/src/process.php?' ~ {'i': session.id, 't': 2}|url_encode() }}">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% elseif session.enrolled == "TMP" %}
|
||||
<div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if showing_services %}
|
||||
{% for service in services %}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="items-course">
|
||||
<div class="items-course-image">
|
||||
<a href="{{ _p.web }}service/{{ service.id }}">
|
||||
<figure class="img-responsive">
|
||||
<img alt="{{ service.name }}"
|
||||
class="img-responsive"
|
||||
src="{{ service.image ? service.image : 'session_default.png'|icon() }}">
|
||||
</figure>
|
||||
</a>
|
||||
</div>
|
||||
<div class="items-course-info">
|
||||
<h4 class="title">
|
||||
<a title="{{ service.name }}"
|
||||
href="{{ _p.web }}service/{{ service.id }}">
|
||||
{{ service.name }}
|
||||
</a>
|
||||
</h4>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<em class="fa fa-clock-o"></em> {{ 'Duration'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
: {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
|
||||
</li>
|
||||
{% if service.applies_to == 0 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'None'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 1 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'User'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 2 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Course'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 3 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Session'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 4 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'TemplateTitleCertificate'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li><em class="fa fa-user"></em> {{ service.owner_name }}</li>
|
||||
</ul>
|
||||
<p class="text-right">
|
||||
<span class="label label-primary">
|
||||
{{ service.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<div class="toolbar">
|
||||
<a class="btn btn-info btn-block btn-sm" title=""
|
||||
href="{{ _p.web }}service/{{ service.id }}">
|
||||
<em class="fa fa-info-circle"></em> {{ 'ServiceInformation'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
<a class="btn btn-success btn-block btn-sm" title=""
|
||||
href="{{ _p.web_plugin ~ 'buycourses/src/service_process.php?' ~ {'i': service.id, 't': service.applies_to}|url_encode() }}">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ pagination }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
32
plugin/buycourses/view/configure_frequency.tpl
Normal file
32
plugin/buycourses/view/configure_frequency.tpl
Normal file
@@ -0,0 +1,32 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ items_form }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="sale-columns">
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'SubscriptionPeriodDuration'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th width="10%">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for frequency in frequencies_list %}
|
||||
<tr class="sale-row">
|
||||
<td class="text-center">{{ frequency.name }}</td>
|
||||
<td class="text-center">{{ frequency.duration }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-xs" role="group" aria-label="...">
|
||||
<a title="{{ 'DeleteFrequency'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_plugin ~ 'buycourses/src/configure_frequency.php?' ~ {'action': 'delete_frequency', 'd': frequency.duration, 'n': frequency.name}|url_encode() }}"
|
||||
class="btn btn-danger btn-default">
|
||||
<em class="fa fa-remove"></em>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
45
plugin/buycourses/view/configure_subscription.tpl
Normal file
45
plugin/buycourses/view/configure_subscription.tpl
Normal file
@@ -0,0 +1,45 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ items_form }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'FrequencyConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{{ frequency_form }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Duration'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Actions'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for subscription in subscriptions %}
|
||||
<tr>
|
||||
<td>{{ subscription.durationName }}</td>
|
||||
<td>{{ subscription.price }} {{ currencyIso }}</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_self ~ '?' ~ {'action':'delete_frequency', 'd': subscription.duration, 'id': subscription.product_id, 'type': subscription.product_type}|url_encode() }}"
|
||||
class="btn btn-danger btn-sm">
|
||||
<em class="fa fa-remove"></em>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
39
plugin/buycourses/view/coupons.tpl
Normal file
39
plugin/buycourses/view/coupons.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
<br />
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="sale-columns">
|
||||
<th>{{ 'CouponCode'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDiscountType'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDiscount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDateStart'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDateEnd'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDelivered'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th width="10%">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for coupon in coupon_list %}
|
||||
<tr class="sale-row">
|
||||
<td class="text-center">{{ coupon.code }}</td>
|
||||
<td class="text-center">{{ coupon.discount_type }}</td>
|
||||
<td class="text-center">{{ coupon.discount_value }}</td>
|
||||
<td class="text-center">{{ coupon.valid_start | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ coupon.valid_end | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ coupon.delivered }}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group btn-group-xs" role="group" aria-label="...">
|
||||
<a title="{{ 'ConfigureCoupon'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_plugin ~ 'buycourses/src/configure_coupon.php?' ~ {'id': coupon.id}|url_encode() }}"
|
||||
class="btn btn-default">
|
||||
<em class="fa fa-wrench fa-fw"></em>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
48
plugin/buycourses/view/course_panel.tpl
Normal file
48
plugin/buycourses/view/course_panel.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
<div id="buy-courses-tabs">
|
||||
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li id="buy-courses-tab" class="active" role="presentation">
|
||||
<a href="course_panel.php" aria-controls="buy-courses" role="tab">{{ 'MyCourses'| get_lang }}</a>
|
||||
</li>
|
||||
{% if sessions_are_included %}
|
||||
<li id="buy-sessions-tab" class="" role="presentation">
|
||||
<a href="session_panel.php" aria-controls="buy-sessions" role="tab">{{ 'MySessions'| get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="" role="presentation">
|
||||
<a href="service_panel.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'MyServices'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="payout_panel.php" aria-controls="buy-courses"
|
||||
role="tab">{{ 'MyPayouts'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Course'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'PaymentMethod'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sale in sale_list %}
|
||||
<tr>
|
||||
<td>{{ sale.product_name }}</td>
|
||||
<td class="text-center">{{ sale.payment_type }}</td>
|
||||
<td class="text-right">{{ sale.currency ~ ' ' ~ sale.price }}</td>
|
||||
<td class="text-center">{{ sale.date }}</td>
|
||||
<td class="text-center">{{ sale.reference }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
1
plugin/buycourses/view/export_report.tpl
Normal file
1
plugin/buycourses/view/export_report.tpl
Normal file
@@ -0,0 +1 @@
|
||||
{{ form }}
|
||||
117
plugin/buycourses/view/index.tpl
Normal file
117
plugin/buycourses/view/index.tpl
Normal file
@@ -0,0 +1,117 @@
|
||||
{% if _u.is_admin %}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<article class="jumbotron">
|
||||
<h3>{{ 'TitlePlugin'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
<p>{{ 'PluginPresentation'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
{{ 'Instructions'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
<ul>
|
||||
<li>{{ 'InstructionsStepOne'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
<li>{{ 'InstructionsStepTwo'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
<li>{{ 'InstructionsStepThree'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/course_catalog.php">
|
||||
<img src="resources/img/128/buycourses.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/course_catalog.php">{{ 'BuyCourses'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/subscription_course_catalog.php">
|
||||
<img src="resources/img/128/buysubscriptions.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/subscription_course_catalog.php">{{ 'BuySubscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if _u.is_admin %}
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/list.php">
|
||||
<img src="resources/img/128/settings.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/list.php">{{ 'ConfigurationOfCoursesAndPrices'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/subscriptions_courses.php">
|
||||
<img src="resources/img/128/subscriptionssettings.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/subscriptions_courses.php">{{ 'ConfigurationOfSubscriptionsAndPrices'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/coupons.php">
|
||||
<img src="resources/img/128/discount.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/coupons.php">{{ 'CouponsConfiguration'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/paymentsetup.php">
|
||||
<img src="resources/img/128/paymentsettings.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/paymentsetup.php">{{ 'PaymentsConfiguration'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail">
|
||||
<a href="src/sales_report.php">
|
||||
<img src="resources/img/128/backlogs.png">
|
||||
</a>
|
||||
<div class="caption">
|
||||
<p class="text-center">
|
||||
<a class="btn btn-default btn-sm"
|
||||
href="src/sales_report.php"> {{ 'SalesReport'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
231
plugin/buycourses/view/list.tpl
Normal file
231
plugin/buycourses/view/list.tpl
Normal file
@@ -0,0 +1,231 @@
|
||||
{% if sessions_are_included or services_are_included %}
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li role="presentation" class="{{ courses ? 'active' : '' }}">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/list.php' }}" >
|
||||
{{ 'Courses'|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% if sessions_are_included %}
|
||||
<li role="presentation" class="{{ sessions ? 'active' : '' }}">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/list_session.php' }}" >
|
||||
{{ 'Sessions'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<li role="presentation" class="{{ services ? 'active' : '' }}">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/list_service.php' }}">
|
||||
{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane {{ courses ? 'fade in active' : '' }} " id="courses">
|
||||
<div class="table-responsive">
|
||||
<table id="courses_table" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Title'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right" width="200">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
|
||||
<th class="text-center" width="100">{{ tax_name }}</th>
|
||||
{% endif %}
|
||||
<th class="text-right">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in courses %}
|
||||
<tr data-item="{{ item.id }}" data-type="course">
|
||||
<td>
|
||||
{% if item.visibility == 0 %}
|
||||
<img src="{{ 'bullet_red.png'|icon() }}" alt="{{ 'CourseVisibilityClosed'|get_lang }}"
|
||||
title="{{ 'CourseVisibilityClosed'|get_lang }}">
|
||||
{% elseif item.visibility == 1 %}
|
||||
<img src="{{ 'bullet_orange.png'|icon() }}" alt="{{ 'Private'|get_lang }}"
|
||||
title="{{ 'Private'|get_lang }}">
|
||||
{% elseif item.visibility == 2 %}
|
||||
<img src="{{ 'bullet_green.png'|icon() }}" alt="{{ 'OpenToThePlatform'|get_lang }}"
|
||||
title="{{ 'OpenToThePlatform'|get_lang }}">
|
||||
{% elseif item.visibility == 3 %}
|
||||
<img src="{{ 'bullet_blue.png'|icon() }}" alt="{{ 'OpenToTheWorld'|get_lang }}"
|
||||
title="{{ 'OpenToTheWorld'|get_lang }}">
|
||||
{% elseif item.visibility == 4 %}
|
||||
<img src="{{ 'bullet_grey.png'|icon() }}" alt="{{ 'CourseVisibilityHidden'|get_lang }}"
|
||||
title="{{ 'CourseVisibilityHidden'|get_lang }}">
|
||||
{% endif %}
|
||||
<a href="{{ _p.web_course ~ item.path ~ item.code~ '/index.php' }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
<span class="label label-info">{{ item.code }}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.code }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.buyCourseData %}
|
||||
<em class="fa fa-fw fa-check-square-o"></em>
|
||||
{% else %}
|
||||
<em class="fa fa-fw fa-square-o"></em>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td width="200" class="text-right">
|
||||
{{ item.buyCourseData.price_formatted }}
|
||||
</td>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
|
||||
<td class="text-center">
|
||||
{{ item.buyCourseData.tax_perc_show }} %
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/configure_course.php?' ~ {'id': item.id, 'type':product_type_course}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ course_pagination }}
|
||||
</div>
|
||||
|
||||
{% if sessions_are_included %}
|
||||
<div role="tabpanel" class="tab-pane {{ sessions ? 'fade in active' : '' }} " id="sessions">
|
||||
<div class="table-responsive">
|
||||
<table id="session_table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Title'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'StartDate'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'EndDate'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
|
||||
<th class="text-center" width="100">{{ tax_name }}</th>
|
||||
{% endif %}
|
||||
<th class="text-right">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in sessions %}
|
||||
<tr data-item="{{ item.id }}" data-type="session">
|
||||
<td>
|
||||
<a href="{{ _p.web_main ~ 'session/index.php?' ~ {'session_id': item.id}|url_encode() }}">{{ item.name }}</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.displayStartDate | api_convert_and_format_date(6)}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.displayEndDate |api_convert_and_format_date(6)}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.buyCourseData %}
|
||||
<em class="fa fa-fw fa-check-square-o"></em>
|
||||
{% else %}
|
||||
<em class="fa fa-fw fa-square-o"></em>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-right" width="200">
|
||||
{{ item.buyCourseData.price_formatted }}
|
||||
</td>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
|
||||
<td class="text-center">
|
||||
{{ item.buyCourseData.tax_perc_show }} %
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/configure_course.php?' ~ {'id': item.id, 'type': product_type_session}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em>
|
||||
{{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ session_pagination }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/services_add.php' }}" class="btn btn-primary">
|
||||
<em class="fa fa-cart-plus fa-fw"></em> {{ 'NewService'| get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
<div role="tabpanel" class="tab-pane {{ services ? 'fade in active' : '' }} " id="services">
|
||||
<div class="table-responsive">
|
||||
</br>
|
||||
</br>
|
||||
<table id="services_table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Service'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Description'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'Duration'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'VisibleInCatalog'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'Owner'|get_lang }}</th>
|
||||
<th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 4) %}
|
||||
<th class="text-center" width="100">{{ tax_name }}</th>
|
||||
{% endif %}
|
||||
<th class="text-right">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in services %}
|
||||
<tr data-item="{{ item.id }}" data-type="service">
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.description }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.duration_days == 0 %}
|
||||
{{ 'NoLimit'|get_lang }}
|
||||
{% else %}
|
||||
{{ item.duration_days }} {{ 'Days'|get_lang }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.visibility == 1 %}
|
||||
<em class="fa fa-fw fa-check-square-o"></em>
|
||||
{% else %}
|
||||
<em class="fa fa-fw fa-square-o"></em>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.owner_name }}
|
||||
</td>
|
||||
<td class="text-right" width="200">
|
||||
{{ item.price_formatted }}
|
||||
</td>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 4) %}
|
||||
<td class="text-center">
|
||||
{% if item.tax_perc is null %}
|
||||
{{ global_tax_perc }} %
|
||||
{% else %}
|
||||
{{ item.tax_perc }} %
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/services_edit.php?' ~ {'id': item.id}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Edit'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ service_pagination }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
49
plugin/buycourses/view/list_coupon.tpl
Normal file
49
plugin/buycourses/view/list_coupon.tpl
Normal file
@@ -0,0 +1,49 @@
|
||||
<br />
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="sale-columns">
|
||||
<th>{{ 'CouponCode'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDiscountType'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDiscount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDateStart'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDateEnd'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDelivered'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th width="10%">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for coupon in coupon_list %}
|
||||
<tr class="sale-row">
|
||||
<td class="text-center">{{ coupon.code }}</td>
|
||||
<td class="text-center">{{ coupon.discount_type }}</td>
|
||||
<td class="text-center">{{ coupon.discount_value }}</td>
|
||||
<td class="text-center">{{ coupon.valid_start | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ coupon.valid_end | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ coupon.delivered }}</td>
|
||||
<td class="text-center">
|
||||
{% if coupon.active == coupon_status_active %}
|
||||
<div class="btn-group btn-group-xs" role="group" aria-label="...">
|
||||
<a title="{{ 'CouponDisable'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_self ~ '?' ~ {'coupon': coupon.id, 'action': 'deactivate'}|url_encode() }}"
|
||||
class="btn btn-default">
|
||||
<img src="{{ 'user_subscribe_session.png' | icon(22) }}" width="22" height="22 alt="{{ 'CouponDisable'|get_plugin_lang('BuyCoursesPlugin') }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coupon.active == coupon_status_disable %}
|
||||
<div class="btn-group btn-group-xs" role="group" aria-label="...">
|
||||
<a title="{{ 'CouponEnable'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_self ~ '?' ~ {'coupon': coupon.id, 'action': 'activate'}|url_encode() }}"
|
||||
class="btn btn-default">
|
||||
<img src="{{ 'user_subscribe_session.png' | icon(22) }}" width="22" height="22 alt="{{ 'CouponEnable'|get_plugin_lang('BuyCoursesPlugin') }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
0
plugin/buycourses/view/list_subscription.tpl
Normal file
0
plugin/buycourses/view/list_subscription.tpl
Normal file
14
plugin/buycourses/view/message_confirm.tpl
Normal file
14
plugin/buycourses/view/message_confirm.tpl
Normal file
@@ -0,0 +1,14 @@
|
||||
<div>
|
||||
<dl>
|
||||
<dt>{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.date|api_convert_and_format_date(constant('DATE_TIME_FORMAT_LONG_24H')) }}</dd>
|
||||
<dt>{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.reference }}</dd>
|
||||
<dt>{{ 'UserName'|get_lang }}</dt>
|
||||
<dd>{{ user.complete_name }}</dd>
|
||||
<dt>{{ 'Product'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.product }}</dd>
|
||||
<dt>{{ 'SalePrice'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.currency ~ ' ' ~ sale.price }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
16
plugin/buycourses/view/message_confirm_buyer.tpl
Normal file
16
plugin/buycourses/view/message_confirm_buyer.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<p>{{ 'Dear'|get_lang }} {{ user.complete_name }},</p>
|
||||
<p>{{ 'bc_subject'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
<div>
|
||||
<dl>
|
||||
<dt>{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.date|api_convert_and_format_date(constant('DATE_TIME_FORMAT_LONG_24H')) }}</dd>
|
||||
<dt>{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.reference }}</dd>
|
||||
<dt>{{ 'Product'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.product }}</dd>
|
||||
<dt>{{ 'SalePrice'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.currency ~ ' ' ~ sale.price }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<p>{{ 'SignatureFormula'|get_lang }}</p>
|
||||
37
plugin/buycourses/view/message_transfer.tpl
Normal file
37
plugin/buycourses/view/message_transfer.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
<div>
|
||||
<p>{{ 'DearUser'|get_lang }}</p>
|
||||
<p>{{ 'PurchaseDetailsIntro'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
<dl>
|
||||
<dt>{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.date|api_convert_and_format_date(constant('DATE_TIME_FORMAT_LONG_24H')) }}</dd>
|
||||
<dt>{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.reference }}</dd>
|
||||
<dt>{{ 'UserName'|get_lang }}</dt>
|
||||
<dd>{{ user.complete_name }}</dd>
|
||||
<dt>{{ 'ProductName'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.product }}</dd>
|
||||
<dt>{{ 'SalePrice'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ sale.currency ~ ' ' ~ sale.price }}</dd>
|
||||
</dl>
|
||||
<p>{{ 'BankAccountIntro'|get_plugin_lang('BuyCoursesPlugin')|format(sale.product) }}</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'SWIFT'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in transfer_accounts %}
|
||||
<tr>
|
||||
<td>{{ account.name }}</td>
|
||||
<td>{{ account.account }}</td>
|
||||
<td>{{ account.swift }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p>{{ info_email_extra }}</p>
|
||||
<p>{{ 'PurchaseDetailsEnd'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
171
plugin/buycourses/view/paymentsetup.tpl
Normal file
171
plugin/buycourses/view/paymentsetup.tpl
Normal file
@@ -0,0 +1,171 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'GlobalConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ global_config_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="alert alert-info">
|
||||
{{ 'PluginInstruction'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
<a href="{{ _p.web_main }}admin/configure_plugin.php?name=buycourses">{{ 'ClickHere'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
|
||||
{% if paypal_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'PayPalConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<p>{{ 'InfoApiCredentials'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
<ul>
|
||||
<li>{{ 'InfoApiStepOne'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
<li>{{ 'InfoApiStepTwo'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
<li>{{ 'InfoApiStepThree'|get_plugin_lang('BuyCoursesPlugin') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ paypal_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if tpv_redsys_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'TpvRedsysConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ tpv_redsys_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if commissions_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'CommissionsConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<p>{{ 'InfoCommissions'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ commission_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if transfer_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'TransfersConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
{{ transfer_form }}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'SWIFT'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Actions'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in transfer_accounts %}
|
||||
<tr>
|
||||
<td>{{ account.name }}</td>
|
||||
<td>{{ account.account }}</td>
|
||||
<td>{{ account.swift }}</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_self ~ '?' ~ {'action':'delete_taccount', 'id': account.id}|url_encode() }}"
|
||||
class="btn btn-danger btn-sm">
|
||||
<em class="fa fa-remove"></em> {{ 'Delete'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
{{ transfer_info_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if culqi_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'CulqiConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<p>{{ 'InfoCulqiCredentials'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ culqi_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if stripe_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'StripeConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<p>{{ 'InfoStripeCredentials'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ stripe_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if cecabank_enable == "true" %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'CecabankConfig'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ cecabank_form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
50
plugin/buycourses/view/payout_panel.tpl
Normal file
50
plugin/buycourses/view/payout_panel.tpl
Normal file
@@ -0,0 +1,50 @@
|
||||
<div id="buy-courses-tabs">
|
||||
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="course_panel.php" aria-controls="buy-courses" role="tab">{{ 'MyCourses'| get_lang }}</a>
|
||||
</li>
|
||||
{% if sessions_are_included %}
|
||||
<li id="buy-sessions-tab" class="" role="presentation">
|
||||
<a href="session_panel.php" aria-controls="buy-sessions" role="tab">{{ 'MySessions'| get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-courses-tab" class="active" role="presentation">
|
||||
<a href="payout_panel.php" aria-controls="buy-courses"
|
||||
role="tab">{{ 'MyPayouts'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% if not payout_list %}
|
||||
<p class="alert alert-info">
|
||||
{{ 'WantToSellCourses'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
<a href="#">{{ 'ClickHere'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if payout_list %}
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ 'OrderReference'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'PayoutDate'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Commission'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'PayPalAccount'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payout in payout_list %}
|
||||
<tr>
|
||||
<td class="text-center" style="vertical-align:middle"><a id="{{ payout.sale_id }}" class="saleInfo"
|
||||
data-toggle="modal" data-target="#saleInfo"
|
||||
href="#">{{ payout.reference }}</a></td>
|
||||
<td class="text-center" style="vertical-align:middle">{{ payout.payout_date }}</td>
|
||||
<td class="text-right"
|
||||
style="vertical-align:middle">{{ payout.currency ~ ' ' ~ payout.commission }}</td>
|
||||
<td class="text-right" style="vertical-align:middle">{{ payout.paypal_account }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
99
plugin/buycourses/view/payout_report.tpl
Normal file
99
plugin/buycourses/view/payout_report.tpl
Normal file
@@ -0,0 +1,99 @@
|
||||
{{ form }}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ 'OrderReference'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'PayoutDate'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Commission'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Names'| get_lang }}</th>
|
||||
<th class="text-right">{{ 'PayPalAccount'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payout in payout_list %}
|
||||
<tr>
|
||||
<td class="text-center" style="vertical-align:middle"><a id="{{ payout.sale_id }}" class="saleInfo"
|
||||
data-toggle="modal" data-target="#saleInfo"
|
||||
href="#">{{ payout.reference }}</a></td>
|
||||
<td class="text-center" style="vertical-align:middle">{{ payout.payout_date }}</td>
|
||||
<td class="text-right"
|
||||
style="vertical-align:middle">{{ payout.currency ~ ' ' ~ payout.commission }}</td>
|
||||
<td class="text-right" style="vertical-align:middle">{{ payout.beneficiary }}</td>
|
||||
{% if payout.paypal_account %}
|
||||
<td class="text-right" style="vertical-align:middle">{{ payout.paypal_account }}</td>
|
||||
{% else %}
|
||||
<td class="text-right"
|
||||
style="vertical-align:middle">{{ 'NoPayPalAccountDetected'| get_plugin_lang('BuyCoursesPlugin') }}</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="saleInfo" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'SaleInfo'| get_plugin_lang('BuyCoursesPlugin') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="contentSale">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Close'|get_lang }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="reportStats" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'Stats'| get_plugin_lang('BuyCoursesPlugin') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="contentStats">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Close'|get_lang }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button id="stats" type="button" class="btn btn-primary fa fa-line-chart" data-toggle="modal"
|
||||
data-target="#reportStats"> {{ 'Stats'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$(".saleInfo").click(function () {
|
||||
var id = this.id;
|
||||
$.ajax({
|
||||
data: 'id=' + id,
|
||||
url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'saleInfo' }|url_encode() }}',
|
||||
type: 'POST',
|
||||
success: function (response) {
|
||||
$("#contentSale").html(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#stats").click(function () {
|
||||
var id = this.id;
|
||||
$.ajax({
|
||||
data: 'id=' + id,
|
||||
url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'stats' }|url_encode() }}',
|
||||
type: 'POST',
|
||||
success: function (response) {
|
||||
$("#contentStats").html(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
131
plugin/buycourses/view/paypal_payout.tpl
Normal file
131
plugin/buycourses/view/paypal_payout.tpl
Normal file
@@ -0,0 +1,131 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><input type="checkbox" id="checkAll"></th>
|
||||
<th class="text-center">{{ 'OrderReference'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderDate'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Commission'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'PayPalAccount'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Options'| get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for payout in payout_list %}
|
||||
<tr style="{{ payout.paypal_account ? '' : 'color: red;' }}">
|
||||
<td class="text-center" style="vertical-align:middle">{% if payout.paypal_account %} <input
|
||||
id="{{ payout.id }}" type="checkbox" name="data[]"
|
||||
value="{{ payout.commission }}"> {% endif %}</td>
|
||||
<td class="text-center" style="vertical-align:middle">{{ payout.reference }}</td>
|
||||
<td class="text-center" style="vertical-align:middle">{{ payout.date }}</td>
|
||||
<td class="text-right"
|
||||
style="vertical-align:middle">{{ payout.currency ~ ' ' ~ payout.commission }}</td>
|
||||
{% if payout.paypal_account %}
|
||||
<td class="text-right" style="vertical-align:middle">{{ payout.paypal_account }}</td>
|
||||
{% else %}
|
||||
<td class="text-right"
|
||||
style="vertical-align:middle">{{ 'NoPayPalAccountDetected'| get_plugin_lang('BuyCoursesPlugin') }}</td>
|
||||
{% endif %}
|
||||
<td class="text-right" style="vertical-align:middle">
|
||||
<button id="{{ payout.id }}" type="button"
|
||||
class="btn btn-danger fa fa-ban cancelPayout"> {{ 'CancelPayout'| get_plugin_lang('BuyCoursesPlugin') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="startPayout" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{ 'PaypalPayoutCommissions'|get_plugin_lang('BuyCoursesPlugin') }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="content">
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="proceedPayout" type="button"
|
||||
class="btn btn-success fa fa-paypal"> {{ 'ProceedPayout'|get_plugin_lang('BuyCoursesPlugin') }}</button>
|
||||
<button id="cancelPayout" type="button" class="btn btn-danger"
|
||||
data-dismiss="modal">{{ 'Cancel'|get_lang }}</button>
|
||||
<button id="responseButton" type="button"
|
||||
class="btn btn-primary">{{ 'Confirm'|get_lang }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button id="continuePayout" type="button" class="btn btn-primary fa fa-caret-square-o-right" data-toggle="modal"
|
||||
data-target="#startPayout" data-backdrop="static"
|
||||
data-keyboard="false"> {{ 'ContinuePayout'|get_plugin_lang('BuyCoursesPlugin') }}</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("#responseButton").hide();
|
||||
$("#checkAll").click(function () {
|
||||
$(':checkbox').prop('checked', this.checked);
|
||||
});
|
||||
|
||||
$('#continuePayout').click(function () {
|
||||
|
||||
var val = [];
|
||||
|
||||
$(':checkbox:checked').not('#checkAll').each(function (i) {
|
||||
val[i] = $(this).attr("id");
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
data: {payouts: val},
|
||||
url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'processPayout' }|url_encode() }}',
|
||||
type: 'POST',
|
||||
success: function (response) {
|
||||
$("#content").html(response);
|
||||
(jQuery.isEmptyObject(val)) ? $('#proceedPayout').prop("disabled", true) : $('#proceedPayout').prop("disabled", false);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#proceedPayout').click(function () {
|
||||
|
||||
var val = [];
|
||||
|
||||
$(':checkbox:checked').not('#checkAll').each(function (i) {
|
||||
val[i] = $(this).attr("id");
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
data: {payouts: val},
|
||||
url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'proceedPayout' }|url_encode() }}',
|
||||
type: 'POST',
|
||||
beforeSend: function () {
|
||||
$("#proceedPayout").hide();
|
||||
$("#cancelPayout").hide();
|
||||
$("#spinner").html('<br /><br /><div class="wobblebar-loader"></div><p> {{ 'ProcessingPayoutsDontCloseThisWindow'|get_plugin_lang('BuyCoursesPlugin') }} </p>');
|
||||
},
|
||||
success: function (response) {
|
||||
$("#content").html(response);
|
||||
$("#responseButton").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(".cancelPayout").click(function () {
|
||||
var id = this.id;
|
||||
$.ajax({
|
||||
data: 'id=' + id,
|
||||
url: '{{ _p.web_plugin ~ 'buycourses/src/buycourses.ajax.php?' ~ { 'a': 'cancelPayout' }|url_encode() }}',
|
||||
type: 'POST',
|
||||
success: function () {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#responseButton').click(function () {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
167
plugin/buycourses/view/process.tpl
Normal file
167
plugin/buycourses/view/process.tpl
Normal file
@@ -0,0 +1,167 @@
|
||||
<div class="actions">
|
||||
{% if item_type == 1 %}
|
||||
{% set back_url = _p.web_plugin ~ 'buycourses/src/course_catalog.php' %}
|
||||
{% elseif item_type == 2 %}
|
||||
{% set back_url = _p.web_plugin ~ 'buycourses/src/session_catalog.php' %}
|
||||
{% else %}
|
||||
{% set back_url = _p.web_plugin ~ 'buycourses/src/service_catalog.php' %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ back_url }}" title="{{ "Back"|get_lang }}">
|
||||
<img src="{{ "back.png"|icon(32) }}" width="32" height="32" alt="{{ "Back"|get_lang }}"
|
||||
title="{{ "Back"|get_lang }}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="page-header">
|
||||
<h3>{{ 'PurchaseData'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-box-buy">
|
||||
<div class="panel-body">
|
||||
<div class="buy-info">
|
||||
{% if buying_course %}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
<img alt="{{ course.title }}" class="img-rounded img-responsive"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
{% if course.tax_enable %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ course.item.price_formatted }}
|
||||
<br>
|
||||
{{ course.tax_name }} ({{ course.item.tax_perc_show }}%):
|
||||
{{ course.item.tax_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ course.item.total_price_formatted }}
|
||||
</div>
|
||||
{% if course.item.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ course.item.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="buy-item">
|
||||
<h3 class="title">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
{{ course.title }}
|
||||
</a>
|
||||
</h3>
|
||||
{% if course.description %}
|
||||
<div class="description">
|
||||
{{ course.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if course.teachers %}
|
||||
<div class="coaches">
|
||||
<p>
|
||||
{{ 'Teachers'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{% for teacher in course.teachers %}
|
||||
<em class="fa fa-user" aria-hidden="true"></em>
|
||||
<a href="{{ _p.web }}main/social/profile.php?u={{ teacher.id }}"
|
||||
class="teacher-item"> {{ teacher.name }}</a>,
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_session %}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<img alt="{{ session.name }}" class="img-rounded img-responsive"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
{% if session.tax_enable %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ session.item.price_formatted }}
|
||||
<br>
|
||||
{{ session.tax_name }} ({{ session.item.tax_perc_show }}%):
|
||||
{{ session.item.tax_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ session.item.total_price_formatted }}
|
||||
</div>
|
||||
{% if session.item.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ session.item.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="buy-item">
|
||||
<h3 class="title">{{ session.name }}</h3>
|
||||
{% if session.description %}
|
||||
<div class="description">
|
||||
{{ session.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="date">
|
||||
<em class="fa fa-calendar" aria-hidden="true"></em> {{ session.dates.display }}
|
||||
</div>
|
||||
<hr>
|
||||
<div class="coaches">
|
||||
{% for course in session.courses %}
|
||||
<p class="course">
|
||||
<em class="fa fa-book" aria-hidden="true"></em> {{ course.title }}
|
||||
</p>
|
||||
{% if course.coaches|length %}
|
||||
<p>
|
||||
{{ 'Teachers'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
|
||||
{% for coach in course.coaches %}
|
||||
<em class="fa fa-user" aria-hidden="true"></em>
|
||||
<a href="{{ _p.web }}main/social/profile.php?u={{ coach.id }}"
|
||||
class="teacher-item">{{ coach.name }}</a>,
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="buy-summary">
|
||||
<h3>{{ 'PaymentMethods'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("label").removeClass('control-label');
|
||||
$('.form_required').remove();
|
||||
$("small").remove();
|
||||
$("label[for=submit]").remove();
|
||||
});
|
||||
</script>
|
||||
283
plugin/buycourses/view/process_confirm.tpl
Normal file
283
plugin/buycourses/view/process_confirm.tpl
Normal file
@@ -0,0 +1,283 @@
|
||||
<div class="row">
|
||||
<div id="message-alert"></div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default buycourse-panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'PurchaseData'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if buying_course %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
<img alt="{{ course.title }}" class="img-responsive" style="width: 100%;"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">{{ course.title }}</a>
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for teacher in course.teachers %}
|
||||
<li><em class="fa fa-user"></em> {{ teacher.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ course.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_session %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<p>
|
||||
<img alt="{{ session.name }}" class="img-responsive" style="width: 100%;"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>{{ session.name }}</h3>
|
||||
<p><em class="fa fa-calendar fa-fw"></em> {{ session.dates.display }}</p>
|
||||
<ul class="list-unstyled">
|
||||
{% for course in session.courses %}
|
||||
<li>
|
||||
<em class="fa fa-book fa-fw"></em> {{ course.title }}
|
||||
{% if course.coaches|length %}
|
||||
<ul>
|
||||
{% for coach in course.coaches %}
|
||||
<li><em class="fa fa-user fa-fw"></em>{{ coach.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ session.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_service %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>
|
||||
<img alt="{{ service.name }}" class="img-responsive"
|
||||
src="{{ service.image ? _p.web ~ 'plugin/buycourses/uploads/services/images/' ~ service.image : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>{{ service.name }}</a>
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% if service.applies_to == 0 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'None'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 1 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'User'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 2 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Course'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 3 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Session'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 4 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'TemplateTitleCertificate'|get_lang }}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<em class="fa fa-money"></em>
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
: {{ service_item.total_price_formatted }}
|
||||
/ {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
|
||||
</li>
|
||||
<li><em class="fa fa-user"></em> {{ service.owner.name }}</li>
|
||||
{% if service.description %}
|
||||
<li><em class="fa fa-align-justify"></em> {{ service.description }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ service_item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if terms %}
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default buycourse-panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'TermsAndConditions'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="#">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" style="height: 345px;" readonly>{{ terms }}</textarea>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="confirmTermsAndConditons">
|
||||
<input class="" type="checkbox" id="confirmTermsAndConditons" name="confirmTermsAndConditons">
|
||||
{{ 'IConfirmIReadAndAcceptTermsAndCondition'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if is_bank_transfer %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3 class="page-header">{{ 'BankAccountInformation'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'SWIFT'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in transfer_accounts %}
|
||||
<tr>
|
||||
<td>{{ account.name }}</td>
|
||||
<td class="text-center">{{ account.account }}</td>
|
||||
<td class="text-center">{{ account.swift }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>{{ 'OnceItIsConfirmedYouWillReceiveAnEmailWithTheBankInformationAndAnOrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
{% if terms %}
|
||||
$("#confirm").prop("disabled", true);
|
||||
|
||||
$("#confirmTermsAndConditons").click(function () {
|
||||
if ($("#confirmTermsAndConditons").is(':checked')) {
|
||||
$("#confirm").prop("disabled", false);
|
||||
} else {
|
||||
$("#confirm").prop("disabled", true);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{% if is_culqi_payment %}
|
||||
var price = {{ price }} * 100;
|
||||
|
||||
Culqi.codigoComercio = '{{ culqi_params.commerce_code }}';
|
||||
Culqi.configurar({
|
||||
nombre: '{{ _s.institution }}',
|
||||
orden: '{{ sale.reference ? sale.reference : buying_service.reference }}',
|
||||
moneda: '{{ currency.iso_code }}',
|
||||
descripcion: '{{ title }}',
|
||||
monto: price
|
||||
});
|
||||
|
||||
$("#confirm").click(function (e) {
|
||||
Culqi.abrir();
|
||||
e.preventDefault();
|
||||
$(".culqi_checkout").watch('style', function () {
|
||||
|
||||
if (Culqi.error) {
|
||||
$("#message-alert").html('<div class="col-md-12 alert alert-danger">{{ 'ErrorOccurred'|get_plugin_lang('BuyCoursesPlugin')|format(Culqi.error.codigo, Culqi.error.mensaje) }}</div>')
|
||||
} else if (Culqi.token) {
|
||||
|
||||
{% if buying_service %}
|
||||
|
||||
var url = '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=culqi_cargo_service&token_id=' + Culqi.token.id + '&service_sale_id=' + {{ buying_service.id }};
|
||||
|
||||
{% else %}
|
||||
|
||||
var url = '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=culqi_cargo&token_id=' + Culqi.token.id + '&sale_id=' + {{ sale.id }};
|
||||
|
||||
{% endif %}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
beforeSend: function () {
|
||||
$("#confirm").html('<em class="fa fa-spinner fa-pulse fa-fw" ></em> {{ 'Loading'|get_lang }}');
|
||||
$("#confirm").prop("disabled", true);
|
||||
$("#cancel").prop("disabled", true);
|
||||
},
|
||||
success: function () {
|
||||
window.location = "{{ _p.web_plugin }}buycourses/index.php";
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(".culqi_checkout").unwatch('style');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$.fn.watch = function (property, callback) {
|
||||
return $(this).each(function () {
|
||||
|
||||
var old_property_val = this[property];
|
||||
var timer;
|
||||
|
||||
function watch() {
|
||||
var self = $(".culqi_checkout");
|
||||
self = self[0];
|
||||
|
||||
if ($(self).data(property + '-watch-abort') == true) {
|
||||
timer = clearInterval(timer);
|
||||
$(self).data(property + '-watch-abort', null);
|
||||
return;
|
||||
}
|
||||
if (self[property] != old_property_val) {
|
||||
old_property_val = self[property];
|
||||
callback.call(self);
|
||||
}
|
||||
}
|
||||
|
||||
timer = setInterval(watch, 700);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.unwatch = function (property) {
|
||||
return $(this).each(function () {
|
||||
$(this).data(property + '-watch-abort', true);
|
||||
});
|
||||
};
|
||||
{% endif %}
|
||||
})
|
||||
</script>
|
||||
55
plugin/buycourses/view/sales_report.tpl
Normal file
55
plugin/buycourses/view/sales_report.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
<ul class="nav nav-tabs buy-courses-sessions-tabs" role="tablist">
|
||||
<li id="buy-courses-sessions-tab" class="active" role="presentation">
|
||||
<a href="sales_report.php" aria-controls="buy-courses_sessions"
|
||||
role="tab">{{ 'CourseSessionBlock'|get_lang }}</a>
|
||||
</li>
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="{{ showing_services ? 'active' : '' }}" role="presentation">
|
||||
<a href="service_sales_report.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-subscriptions-tab" role="presentation">
|
||||
<a href="subscription_sales_report.php" aria-controls="buy-subscriptions"
|
||||
role="tab">{{ 'Subscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<div class=" col-md-12">
|
||||
<table class="col-md-12" id="table_report">
|
||||
</table>
|
||||
<div id="tblGridPager" style="text-align:center" > </div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('[name="filter_type"]').on('change', function () {
|
||||
var self = $(this);
|
||||
|
||||
if (self.val() === '0') {
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-status').show();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '1') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').show();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '2') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-date').show();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '3') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
108
plugin/buycourses/view/service_information.tpl
Normal file
108
plugin/buycourses/view/service_information.tpl
Normal file
@@ -0,0 +1,108 @@
|
||||
<div id="service" class="service">
|
||||
<div class="page-header">
|
||||
<h2>{{ service.name }}</h2>
|
||||
</div>
|
||||
<section id="service-info">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="service-media">
|
||||
{% if service.video_url %}
|
||||
<div class="service-video">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
{{ essence.replace(service.video_url) }}
|
||||
</div>
|
||||
</div>
|
||||
{% elseif service.image %}
|
||||
<div class="service-image">
|
||||
<a href="{{ _p.web }}service/{{ service.id }}">
|
||||
<img alt="{{ service.name }}" class="img-rounded img-responsive"
|
||||
src="{{ service.image ? service.image : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="share-social-media">
|
||||
<ul class="sharing-buttons">
|
||||
<li>
|
||||
{{ "ShareWithYourFriends"|get_lang }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?{{ {'u': pageUrl}|url_encode }}"
|
||||
target="_blank" class="btn btn-facebook btn-inverse btn-xs">
|
||||
<em class="fa fa-facebook"></em> Facebook
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/home?{{ {'status': session.getName() ~ ' ' ~ pageUrl}|url_encode }}"
|
||||
target="_blank" class="btn btn-twitter btn-inverse btn-xs">
|
||||
<em class="fa fa-twitter"></em> Twitter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': pageUrl, 'title': session.getName() }|url_encode }}"
|
||||
target="_blank" class="btn btn-linkedin btn-inverse btn-xs">
|
||||
<em class="fa fa-linkedin"></em> Linkedin
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{% if service.description %}
|
||||
<div class="description">
|
||||
{{ service.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="service-details">
|
||||
{% if service.applies_to != 0 %}
|
||||
<p><em class="fa fa-flag-o"></em> <b>{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }}</b> :
|
||||
{% if service.applies_to == 1 %}
|
||||
{{ 'User'|get_lang }}
|
||||
{% elseif service.applies_to == 2 %}
|
||||
{{ 'Course'|get_lang }}
|
||||
{% elseif service.applies_to == 3 %}
|
||||
{{ 'Session'|get_lang }}
|
||||
{% elseif service.applies_to == 4 %}
|
||||
{{ 'TemplateTitleCertificate'|get_lang }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="service-buy">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="price">
|
||||
{{ 'Total'|get_lang }}
|
||||
{{ service.total_price_formatted }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/service_process.php?t=4&i=' ~ service.id }}"
|
||||
class="btn btn-success btn-lg btn-block">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="page-header">
|
||||
<h3>{{ 'ServiceInformation'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="service-information">
|
||||
{{ service.service_information }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
36
plugin/buycourses/view/service_message_transfer.tpl
Normal file
36
plugin/buycourses/view/service_message_transfer.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
<div>
|
||||
<p>{{ 'DearUser'|get_lang }}</p>
|
||||
<p>{{ 'PurchaseDetailsIntro'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
<dl>
|
||||
<dt>{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ service_sale.buy_date|api_convert_and_format_date(constant('DATE_TIME_FORMAT_LONG_24H')) }}</dd>
|
||||
<dt>{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ service_sale.reference }}</dd>
|
||||
<dt>{{ 'UserName'|get_lang }}</dt>
|
||||
<dd>{{ service_sale.buyer }}</dd>
|
||||
<dt>{{ 'Service'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ service_sale.name }}</dd>
|
||||
<dt>{{ 'SalePrice'|get_plugin_lang('BuyCoursesPlugin') }}</dt>
|
||||
<dd>{{ service_sale.currency ~ ' ' ~ service_sale.price }}</dd>
|
||||
</dl>
|
||||
<p>{{ 'BankAccountIntro'|get_plugin_lang('BuyCoursesPlugin')|format(service_sale.name) }}</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'SWIFT'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in transfer_accounts %}
|
||||
<tr>
|
||||
<td>{{ account.name }}</td>
|
||||
<td>{{ account.account }}</td>
|
||||
<td>{{ account.swift }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p>{{ 'PurchaseDetailsEnd'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
85
plugin/buycourses/view/service_panel.tpl
Normal file
85
plugin/buycourses/view/service_panel.tpl
Normal file
@@ -0,0 +1,85 @@
|
||||
<div id="buy-courses-tabs">
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="course_panel.php" aria-controls="buy-courses" role="tab">{{ 'MyCourses'| get_lang }}</a>
|
||||
</li>
|
||||
{% if sessions_are_included %}
|
||||
<li id="buy-sessions-tab" class="" role="presentation">
|
||||
<a href="session_panel.php" aria-controls="buy-sessions" role="tab">{{ 'MySessions'| get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="active" role="presentation">
|
||||
<a href="service_panel.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'MyServices'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="payout_panel.php" aria-controls="buy-courses"
|
||||
role="tab">{{ 'MyPayouts'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Service'| get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'ServiceSaleInfo'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sale in sale_list %}
|
||||
<tr class="{{ sale.status == service_sale_statuses.status_cancelled ? 'buy-courses-cross-out' : '' }}">
|
||||
<td>{{ sale.name }}</td>
|
||||
<td class="text-center">{{ sale.service_type }}</td>
|
||||
<td class="text-center">{{ sale.currency ~ ' ' ~ sale.price }}</td>
|
||||
<td class="text-center">{{ sale.date | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ sale.reference }}</td>
|
||||
<td class="text-center">
|
||||
<a id="service_sale_info" tag="{{ sale.id }}" name="s_{{ sale.id }}"
|
||||
class="btn btn-info btn-sm">{{ 'Info'|get_lang }}</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("td a").click(function () {
|
||||
var id = $(this).attr('tag');
|
||||
var action = $(this).attr('id');
|
||||
$.ajax({
|
||||
data: 'id=' + id,
|
||||
url: '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=' + action,
|
||||
type: 'POST',
|
||||
beforeSend: function () {
|
||||
if (action == 'service_sale_info') {
|
||||
$('a[name=s_' + id + ']').html('<em class="fa fa-spinner fa-pulse"></em> {{ 'Loading'|get_lang }}');
|
||||
}
|
||||
},
|
||||
success: function (response) {
|
||||
$('a[name=s_' + id + ']').html('{{ 'Info'|get_lang }}');
|
||||
var title = "";
|
||||
if (action == 'service_sale_info') {
|
||||
title = "{{ 'ServiceSaleInfo'|get_plugin_lang('BuyCoursesPlugin') }}";
|
||||
}
|
||||
bootbox.dialog({
|
||||
message: response,
|
||||
title: title,
|
||||
buttons: {
|
||||
main: {
|
||||
label: "{{ 'Close'|get_lang }}",
|
||||
className: "btn-default"
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
120
plugin/buycourses/view/service_process.tpl
Normal file
120
plugin/buycourses/view/service_process.tpl
Normal file
@@ -0,0 +1,120 @@
|
||||
<div class="actions">
|
||||
<a href="{{ _p.web }}main/auth/courses.php" title="{{ "Back"|get_lang }}">
|
||||
<img src="{{ "back.png"|icon(32) }}" width="32" height="32" alt="{{ "Back"|get_lang }}"
|
||||
title="{{ "Back"|get_lang }}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="page-header">
|
||||
<h3>{{ 'PurchaseData'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-box-buy">
|
||||
<div class="panel-body">
|
||||
<div class="buy-info">
|
||||
{% if buying_service %}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>
|
||||
<img alt="{{ service.name }}" class="img-rounded img-responsive"
|
||||
src="{{ service.image ? service.image : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
{% if service.tax_enable %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin')}} :
|
||||
{{ service.price_formatted }}
|
||||
<br>
|
||||
{{ service.tax_name }} ({{ service.tax_perc_show }}%):
|
||||
{{ service.tax_amount_formatted }}
|
||||
</div>
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin')}} :
|
||||
{{ service.total_price_formatted }}
|
||||
</div>
|
||||
{% if service.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ service.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin')}} :
|
||||
{{ service.total_price_formatted }}
|
||||
</div>
|
||||
{% if service.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ service.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="buy-item">
|
||||
<h3 class="title">
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>{{ service.name }}</a>
|
||||
</h3>
|
||||
{% if service.description %}
|
||||
<div class="description">
|
||||
{{ service.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<ul class="fa-ul list-description">
|
||||
{% if service.applies_to %}
|
||||
<li>
|
||||
<em class="fa-li fa fa-hand-o-right" aria-hidden="true"></em>
|
||||
{% if service.applies_to == 0 %}
|
||||
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'None'|get_lang }}
|
||||
{% elseif service.applies_to == 1 %}
|
||||
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'User'|get_lang }}
|
||||
{% elseif service.applies_to == 2 %}
|
||||
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Course'|get_lang }}
|
||||
{% elseif service.applies_to == 3 %}
|
||||
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'Session'|get_lang }}
|
||||
{% elseif service.applies_to == 4 %}
|
||||
{{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') ~ ' ' ~ 'TemplateTitleCertificate'|get_lang }}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<em class="fa-li fa fa-clock-o" aria-hidden="true"></em>
|
||||
{{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
|
||||
</li>
|
||||
<li><em class="fa-li fa fa-user" aria-hidden="true"></em> {{ service.owner_name }}</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="buy-summary">
|
||||
<h3>{{ 'PaymentMethods'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("label").removeClass('control-label');
|
||||
$('.form_required').remove();
|
||||
$("small").remove();
|
||||
$("label[for=submit]").remove();
|
||||
});
|
||||
</script>
|
||||
121
plugin/buycourses/view/service_sales_report.tpl
Normal file
121
plugin/buycourses/view/service_sales_report.tpl
Normal file
@@ -0,0 +1,121 @@
|
||||
<ul class="nav nav-tabs buy-courses-sessions-tabs" role="tablist">
|
||||
<li id="buy-courses-sessions-tab" class="" role="presentation">
|
||||
<a href="sales_report.php" aria-controls="buy-courses_sessions"
|
||||
role="tab">{{ 'CourseSessionBlock'|get_lang }}</a>
|
||||
</li>
|
||||
<li id="buy-services-tab" class="active" role="presentation">
|
||||
<a href="service_sales_report.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
<li id="buy-subscriptions-tab" role="presentation">
|
||||
<a href="subscription_sales_report.php" aria-controls="buy-subscriptions"
|
||||
role="tab">{{ 'Subscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</br>
|
||||
</br>
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-12 col-xs-12">
|
||||
<h4><b>{{ 'Filter'|get_lang }}</b></h4>
|
||||
{{ form }}
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-12 col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{ 'ServiceName'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderStatus'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'CouponDiscount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-right">{{ 'Coupon'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if invoicing_enable %}
|
||||
<th class="text-right">{{ 'Invoice'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% endif %}
|
||||
<th class="text-center">{{ 'ServiceSaleInfo'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sale in sale_list %}
|
||||
<tr>
|
||||
<td class="text-center">{{ sale.name }}</td>
|
||||
<td class="text-center">{{ sale.reference }}</td>
|
||||
<td class="text-center">
|
||||
{% if sale.status == sale_status_cancelled %}
|
||||
{{ 'SaleStatusCancelled'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% elseif sale.status == sale_status_pending %}
|
||||
{{ 'SaleStatusPending'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% elseif sale.status == sale_status_completed %}
|
||||
{{ 'SaleStatusCompleted'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">{{ sale.buy_date | api_get_local_time}}</td>
|
||||
<td class="text-right">{{ sale.service.total_price }}</td>
|
||||
<td class="text-right">{{ sale.total_discount }}</td>
|
||||
<td class="text-right">{{ sale.coupon_code }}</td>
|
||||
{% if invoicing_enable %}
|
||||
<td class="text-center">
|
||||
{% if sale.invoice == 1 %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/invoice.php?' ~ {'invoice': sale.id, 'is_service': 1}|url_encode() }}" title="{{ 'InvoiceView'|get_plugin_lang('BuyCoursesPlugin') }}" >
|
||||
<img src="{{ _p.web_img }}/icons/32/default.png" alt="{{ 'InvoiceView'|get_plugin_lang('BuyCoursesPlugin') }}" />
|
||||
<br>{{ sale.num_invoice }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-center">
|
||||
<a id="service_sale_info" tag="{{ sale.id }}" name="s_{{ sale.id }}"
|
||||
class="btn btn-info btn-sm">
|
||||
{{ 'Info'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("td a").click(function () {
|
||||
var id = $(this).attr('tag');
|
||||
var action = $(this).attr('id');
|
||||
$.ajax({
|
||||
data: 'id=' + id,
|
||||
url: '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=' + action,
|
||||
type: 'POST',
|
||||
beforeSend: function () {
|
||||
if (action == 'renewable_info') {
|
||||
$('a[name=r_' + id + ']').html('<em class="fa fa-spinner fa-pulse"></em> {{ 'Loading'|get_lang }}');
|
||||
} else if (action == 'service_sale_info') {
|
||||
$('a[name=s_' + id + ']').html('<em class="fa fa-spinner fa-pulse"></em> {{ 'Loading'|get_lang }}');
|
||||
}
|
||||
},
|
||||
success: function (response) {
|
||||
$('a[name=r_' + id + ']').html('{{ 'Info'|get_lang }}');
|
||||
$('a[name=s_' + id + ']').html('{{ 'Info'|get_lang }}');
|
||||
var title = "";
|
||||
if (action == "renewable_info") {
|
||||
title = "{{ 'RecurringPaymentProfilePaypalInformation'|get_plugin_lang('BuyCoursesPlugin') }}";
|
||||
} else if (action == 'service_sale_info') {
|
||||
title = "{{ 'ServiceSaleInfo'|get_plugin_lang('BuyCoursesPlugin') }}";
|
||||
}
|
||||
bootbox.dialog({
|
||||
message: response,
|
||||
title: title,
|
||||
buttons: {
|
||||
main: {
|
||||
label: "{{ 'Close'|get_lang }}",
|
||||
className: "btn-default"
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
48
plugin/buycourses/view/session_panel.tpl
Normal file
48
plugin/buycourses/view/session_panel.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
<div id="buy-courses-tabs">
|
||||
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="course_panel.php" aria-controls="buy-courses" role="tab">{{ 'MyCourses'| get_lang }}</a>
|
||||
</li>
|
||||
{% if sessions_are_included %}
|
||||
<li id="buy-sessions-tab" class="active" role="presentation">
|
||||
<a href="session_panel.php" aria-controls="buy-sessions" role="tab">{{ 'MySessions'| get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="" role="presentation">
|
||||
<a href="service_panel.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'MyServices'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-courses-tab" class="" role="presentation">
|
||||
<a href="payout_panel.php" aria-controls="buy-courses"
|
||||
role="tab">{{ 'MyPayouts'| get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Session'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'PaymentMethod'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sale in sale_list %}
|
||||
<tr>
|
||||
<td>{{ sale.product_name }}</td>
|
||||
<td class="text-center">{{ sale.payment_type }}</td>
|
||||
<td class="text-right">{{ sale.currency ~ ' ' ~ sale.price }}</td>
|
||||
<td class="text-center">{{ sale.date }}</td>
|
||||
<td class="text-center">{{ sale.reference }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
37
plugin/buycourses/view/subscription_add.tpl
Normal file
37
plugin/buycourses/view/subscription_add.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ items_form }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("a[name='add']").click(function () {
|
||||
var selectedFrequency = $("#duration").val();
|
||||
var selectedFrequencyText = $("#duration option:selected").text();
|
||||
var selectedFrequencyPrice = $("#price").val();
|
||||
|
||||
if (selectedFrequencyPrice === "0") {
|
||||
return;
|
||||
}
|
||||
|
||||
var inputs = $("tbody tr td .frequency-days");
|
||||
|
||||
for (var i = 0; i < inputs.length; i++){
|
||||
if (inputs[i].value === selectedFrequency) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var count = $("tbody tr").length;
|
||||
var frequencyRow = '<tr><td><input class=\"frequency-days\" type="hidden" name=\"frequencies['+ (count + 1) + '][duration]\" value="'+selectedFrequency+'" />' + selectedFrequencyText + '</input></td><td><input type="hidden" name=\"frequencies['+ (count + 1) + '][price]\" value="' + selectedFrequencyPrice + '" />' + selectedFrequencyPrice + ' {{ currencyIso }} </td><td><a name=\"delete\" class=\"btn btn-danger btn-sm\"><em class=\"fa fa-remove\"></em></a></td></tr>';
|
||||
|
||||
$("tbody").append(frequencyRow);
|
||||
});
|
||||
|
||||
$("tbody").on("click", "tr td a", function(){
|
||||
var elementToDelete = $(this).closest("tr");
|
||||
elementToDelete.remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
122
plugin/buycourses/view/subscription_catalog.tpl
Normal file
122
plugin/buycourses/view/subscription_catalog.tpl
Normal file
@@ -0,0 +1,122 @@
|
||||
<div id="buy-courses-tabs">
|
||||
{% if sessions_are_included %}
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
{% if coursesExist %}
|
||||
<li id="buy-courses-tab" class="{{ showing_courses ? 'active' : '' }}" role="presentation">
|
||||
<a href="subscription_course_catalog.php" aria-controls="buy-courses" role="tab">{{ 'Courses'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if sessionExist %}
|
||||
<li id="buy-sessions-tab" class="{{ showing_sessions ? 'active' : '' }}" role="presentation">
|
||||
<a href="subscription_session_catalog.php" aria-controls="buy-sessions" role="tab">{{ 'Sessions'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" aria-labelledby="buy-sessions-tab" role="tabpanel">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ search_filter_form }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row grid-courses">
|
||||
{% if showing_courses %}
|
||||
{% for course in courses %}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<article class="items-course">
|
||||
<div class="items-course-image">
|
||||
<figure class="img-responsive">
|
||||
<img alt="{{ course.title }}"
|
||||
class="img-responsive"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="items-course-info">
|
||||
{% set course_description_url = _p.web_ajax ~ 'course_home.ajax.php?' ~ {'code': course.code, 'a': 'show_course_information'}|url_encode() %}
|
||||
<h4 class="title">
|
||||
<a class="ajax" href="{{ course_description_url }}"
|
||||
data-title="{{ course.title }}">{{ course.title }}</a>
|
||||
</h4>
|
||||
<ul class="list-unstyled">
|
||||
{% for teacher in course.teachers %}
|
||||
<li><em class="fa fa-user"></em> {{ teacher }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if course.enrolled == "YES" %}
|
||||
<div class="alert alert-success">
|
||||
<em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheCourse'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
{% elseif course.enrolled == "NO" %}
|
||||
<div class="toolbar">
|
||||
<a class="ajax btn btn-info btn-block btn-sm" title=""
|
||||
href="{{ course_description_url }}"
|
||||
data-title="{{ course.title }}">
|
||||
<em class="fa fa-file-text"></em> {{ 'SeeDescription'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
<a class="btn btn-success btn-block btn-sm" title=""
|
||||
href="{{ _p.web_plugin ~ 'buycourses/src/subscription_process.php?' ~ {'i': course.id, 't': 1}|url_encode() }}">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% elseif course.enrolled == "TMP" %}
|
||||
<div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if showing_sessions %}
|
||||
{% for session in sessions %}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<article class="items-course">
|
||||
<div class="items-course-image">
|
||||
<figure class="img-responsive">
|
||||
<img alt="{{ session.name }}" class="img-responsive"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="items-course-info">
|
||||
<h4 class="title">
|
||||
<a href="{{ _p.web ~ 'session/' ~ session.id ~ '/about/' }}">{{ session.name }}</a>
|
||||
</h4>
|
||||
{% if 'show_session_coach'|api_get_setting == 'true' %}
|
||||
<p><em class="fa fa-user fa-fw"></em> {{ session.coach }}</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<em class="fa fa-calendar fa-fw"></em>
|
||||
{% if session.duration %}
|
||||
{{ 'SessionDurationXDaysTotal'|get_lang|format(session.duration) }}
|
||||
{% else %}
|
||||
{{ session.dates.display }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if session.enrolled == "YES" %}
|
||||
<div class="alert alert-success">
|
||||
<em class="fa fa-check-square-o fa-fw"></em> {{ 'TheUserIsAlreadyRegisteredInTheSession'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
{% elseif session.enrolled == "NO" %}
|
||||
<div class="toolbar">
|
||||
<a class="btn btn-success btn-block btn-sm"
|
||||
href="{{ _p.web_plugin ~ 'buycourses/src/subscription_process.php?' ~ {'i': session.id, 't': 2}|url_encode() }}">
|
||||
<em class="fa fa-shopping-cart"></em> {{ 'Buy'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% elseif session.enrolled == "TMP" %}
|
||||
<div class="alert alert-info">{{ 'WaitingToReceiveThePayment'|get_plugin_lang('BuyCoursesPlugin') }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ pagination }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
187
plugin/buycourses/view/subscription_process.tpl
Normal file
187
plugin/buycourses/view/subscription_process.tpl
Normal file
@@ -0,0 +1,187 @@
|
||||
<div class="actions">
|
||||
{% if item_type == 1 %}
|
||||
{% set back_url = _p.web_plugin ~ 'buycourses/src/subscription_course_catalog.php' %}
|
||||
{% elseif item_type == 2 %}
|
||||
{% set back_url = _p.web_plugin ~ 'buycourses/src/subscription_session_catalog.php' %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ back_url }}" title="{{ "Back"|get_lang }}">
|
||||
<img src="{{ "back.png"|icon(32) }}" width="32" height="32" alt="{{ "Back"|get_lang }}"
|
||||
title="{{ "Back"|get_lang }}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="page-header">
|
||||
<h3>{{ 'PurchaseData'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-box-buy">
|
||||
<div class="panel-body">
|
||||
<div class="buy-info">
|
||||
{% if buying_course %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
<img alt="{{ course.title }}" class="img-rounded img-responsive"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
{% if course.tax_enable %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ subscription.price_formatted }}
|
||||
<br>
|
||||
{{ course.tax_name }} ({{ subscription.item.tax_perc_show }}%):
|
||||
{{ subscription.tax_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ subscription.total_price_formatted }}
|
||||
</div>
|
||||
{% if course.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ course.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'SelecSubscription'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="subscription">
|
||||
{{ form_subscription }}
|
||||
</div>
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="buy-item">
|
||||
<h3 class="title">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
{{ course.title }}
|
||||
</a>
|
||||
</h3>
|
||||
{% if course.description %}
|
||||
<div class="description">
|
||||
{{ course.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if course.teachers %}
|
||||
<div class="coaches">
|
||||
<p>
|
||||
{{ 'Teachers'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{% for teacher in course.teachers %}
|
||||
<em class="fa fa-user" aria-hidden="true"></em>
|
||||
<a href="{{ _p.web }}main/social/profile.php?u={{ teacher.id }}"
|
||||
class="teacher-item"> {{ teacher.name }}</a>,
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_session %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<img alt="{{ session.name }}" class="img-rounded img-responsive"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
{% if session.tax_enable %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ subscription.price_formatted }}
|
||||
<br>
|
||||
{{ session.tax_name }} ({{ subscription.item.tax_perc_show }}%):
|
||||
{{ subscription.tax_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="price">
|
||||
{{ 'Total'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
{{ subscription.total_price_formatted }}
|
||||
</div>
|
||||
{% if session.has_coupon %}
|
||||
<div class="price-details-tax">
|
||||
{{ 'DiscountAmount'|get_plugin_lang('BuyCoursesPlugin') }}:
|
||||
{{ session.discount_amount_formatted }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="coupon-question">
|
||||
{{ 'SelecSubscription'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="subscription">
|
||||
{{ form_subscription }}
|
||||
</div>
|
||||
<div class="coupon-question">
|
||||
{{ 'DoYouHaveACoupon'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="coupon">
|
||||
{{ form_coupon }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="buy-item">
|
||||
<h3 class="title">{{ session.name }}</h3>
|
||||
{% if session.description %}
|
||||
<div class="description">
|
||||
{{ session.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="date">
|
||||
<em class="fa fa-calendar" aria-hidden="true"></em> {{ session.dates.display }}
|
||||
</div>
|
||||
<hr>
|
||||
<div class="coaches">
|
||||
{% for course in session.courses %}
|
||||
<p class="course">
|
||||
<em class="fa fa-book" aria-hidden="true"></em> {{ course.title }}
|
||||
</p>
|
||||
{% if course.coaches|length %}
|
||||
<p>
|
||||
{{ 'Teachers'|get_plugin_lang('BuyCoursesPlugin') }} :
|
||||
|
||||
{% for coach in course.coaches %}
|
||||
<em class="fa fa-user" aria-hidden="true"></em>
|
||||
<a href="{{ _p.web }}main/social/profile.php?u={{ coach.id }}"
|
||||
class="teacher-item">{{ coach.name }}</a>,
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="buy-summary">
|
||||
<h3>{{ 'PaymentMethods'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
{% if message_payment %}
|
||||
{{ message_payment }}
|
||||
{% else %}
|
||||
{{ form }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$("label").removeClass('control-label');
|
||||
$('.form_required').remove();
|
||||
$("small").remove();
|
||||
$("label[for=submit]").remove();
|
||||
$('input[name=duration]').click(function(){
|
||||
var selected = $('input[name=duration]:checked').val();
|
||||
if (selected != null) {
|
||||
$('form[name=confirm_subscription]').submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
283
plugin/buycourses/view/subscription_process_confirm.tpl
Normal file
283
plugin/buycourses/view/subscription_process_confirm.tpl
Normal file
@@ -0,0 +1,283 @@
|
||||
<div class="row">
|
||||
<div id="message-alert"></div>
|
||||
<div class="col-md-5">
|
||||
<div class="panel panel-default buycourse-panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'PurchaseData'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if buying_course %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
<img alt="{{ course.title }}" class="img-responsive" style="width: 100%;"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>
|
||||
<a class="ajax" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">{{ course.title }}</a>
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for teacher in course.teachers %}
|
||||
<li><em class="fa fa-user"></em> {{ teacher.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ course.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_session %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<p>
|
||||
<img alt="{{ session.name }}" class="img-responsive" style="width: 100%;"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>{{ session.name }}</h3>
|
||||
<p><em class="fa fa-calendar fa-fw"></em> {{ session.dates.display }}</p>
|
||||
<ul class="list-unstyled">
|
||||
{% for course in session.courses %}
|
||||
<li>
|
||||
<em class="fa fa-book fa-fw"></em> {{ course.title }}
|
||||
{% if course.coaches|length %}
|
||||
<ul>
|
||||
{% for coach in course.coaches %}
|
||||
<li><em class="fa fa-user fa-fw"></em>{{ coach }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ session.item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_service %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>
|
||||
<img alt="{{ service.name }}" class="img-responsive"
|
||||
src="{{ service.image ? _p.web ~ 'plugin/buycourses/uploads/services/images/' ~ service.image : 'session_default.png'|icon() }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-xs-12">
|
||||
<h3>
|
||||
<a href='{{ _p.web }}service/{{ service.id }}'>{{ service.name }}</a>
|
||||
</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% if service.applies_to == 0 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'None'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 1 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'User'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 2 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Course'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 3 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'Session'|get_lang }}
|
||||
</li>
|
||||
{% elseif service.applies_to == 4 %}
|
||||
<li>
|
||||
<em class="fa fa-hand-o-right"></em> {{ 'AppliesTo'|get_plugin_lang('BuyCoursesPlugin') }} {{ 'TemplateTitleCertificate'|get_lang }}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<em class="fa fa-money"></em>
|
||||
{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
: {{ service_item.total_price_formatted }}
|
||||
/ {{ service.duration_days == 0 ? 'NoLimit'|get_lang : service.duration_days ~ ' ' ~ 'Days'|get_lang }}
|
||||
</li>
|
||||
<li><em class="fa fa-user"></em> {{ service.owner.name }}</li>
|
||||
{% if service.description %}
|
||||
<li><em class="fa fa-align-justify"></em> {{ service.description }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<p id="n-price" class="lead text-right" style="color: white;">
|
||||
<span class="label label-primary">
|
||||
{{ service_item.total_price_formatted }}
|
||||
</span>
|
||||
</p>
|
||||
<p id="s-price" class="lead text-right"></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if terms %}
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default buycourse-panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{ 'TermsAndConditions'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="#">
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" style="height: 345px;" readonly>{{ terms }}</textarea>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="confirmTermsAndConditons">
|
||||
<input class="" type="checkbox" id="confirmTermsAndConditons" name="confirmTermsAndConditons">
|
||||
{{ 'IConfirmIReadAndAcceptTermsAndCondition'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if is_bank_transfer %}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3 class="page-header">{{ 'BankAccountInformation'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'BankAccount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th class="text-center">{{ 'SWIFT'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for account in transfer_accounts %}
|
||||
<tr>
|
||||
<td>{{ account.name }}</td>
|
||||
<td class="text-center">{{ account.account }}</td>
|
||||
<td class="text-center">{{ account.swift }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>{{ 'OnceItIsConfirmedYouWillReceiveAnEmailWithTheBankInformationAndAnOrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
{% if terms %}
|
||||
$("#confirm").prop("disabled", true);
|
||||
|
||||
$("#confirmTermsAndConditons").click(function () {
|
||||
if ($("#confirmTermsAndConditons").is(':checked')) {
|
||||
$("#confirm").prop("disabled", false);
|
||||
} else {
|
||||
$("#confirm").prop("disabled", true);
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{% if is_culqi_payment %}
|
||||
var price = {{ price }} * 100;
|
||||
|
||||
Culqi.codigoComercio = '{{ culqi_params.commerce_code }}';
|
||||
Culqi.configurar({
|
||||
nombre: '{{ _s.institution }}',
|
||||
orden: '{{ sale.reference ? sale.reference : buying_service.reference }}',
|
||||
moneda: '{{ currency.iso_code }}',
|
||||
descripcion: '{{ title }}',
|
||||
monto: price
|
||||
});
|
||||
|
||||
$("#confirm").click(function (e) {
|
||||
Culqi.abrir();
|
||||
e.preventDefault();
|
||||
$(".culqi_checkout").watch('style', function () {
|
||||
|
||||
if (Culqi.error) {
|
||||
$("#message-alert").html('<div class="col-md-12 alert alert-danger">{{ 'ErrorOccurred'|get_plugin_lang('BuyCoursesPlugin')|format(Culqi.error.codigo, Culqi.error.mensaje) }}</div>')
|
||||
} else if (Culqi.token) {
|
||||
|
||||
{% if buying_service %}
|
||||
|
||||
var url = '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=culqi_cargo_service&token_id=' + Culqi.token.id + '&service_sale_id=' + {{ buying_service.id }};
|
||||
|
||||
{% else %}
|
||||
|
||||
var url = '{{ _p.web_plugin }}buycourses/src/buycourses.ajax.php?a=culqi_cargo&token_id=' + Culqi.token.id + '&sale_id=' + {{ sale.id }};
|
||||
|
||||
{% endif %}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
beforeSend: function () {
|
||||
$("#confirm").html('<em class="fa fa-spinner fa-pulse fa-fw" ></em> {{ 'Loading'|get_lang }}');
|
||||
$("#confirm").prop("disabled", true);
|
||||
$("#cancel").prop("disabled", true);
|
||||
},
|
||||
success: function () {
|
||||
window.location = "{{ _p.web_plugin }}buycourses/index.php";
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$(".culqi_checkout").unwatch('style');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$.fn.watch = function (property, callback) {
|
||||
return $(this).each(function () {
|
||||
|
||||
var old_property_val = this[property];
|
||||
var timer;
|
||||
|
||||
function watch() {
|
||||
var self = $(".culqi_checkout");
|
||||
self = self[0];
|
||||
|
||||
if ($(self).data(property + '-watch-abort') == true) {
|
||||
timer = clearInterval(timer);
|
||||
$(self).data(property + '-watch-abort', null);
|
||||
return;
|
||||
}
|
||||
if (self[property] != old_property_val) {
|
||||
old_property_val = self[property];
|
||||
callback.call(self);
|
||||
}
|
||||
}
|
||||
|
||||
timer = setInterval(watch, 700);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.unwatch = function (property) {
|
||||
return $(this).each(function () {
|
||||
$(this).data(property + '-watch-abort', true);
|
||||
});
|
||||
};
|
||||
{% endif %}
|
||||
})
|
||||
</script>
|
||||
122
plugin/buycourses/view/subscription_sales_report.tpl
Normal file
122
plugin/buycourses/view/subscription_sales_report.tpl
Normal file
@@ -0,0 +1,122 @@
|
||||
<ul class="nav nav-tabs buy-courses-sessions-tabs" role="tablist">
|
||||
<li id="buy-courses-sessions-tab" role="presentation">
|
||||
<a href="sales_report.php" aria-controls="buy-courses_sessions"
|
||||
role="tab">{{ 'CourseSessionBlock'|get_lang }}</a>
|
||||
</li>
|
||||
{% if services_are_included %}
|
||||
<li id="buy-services-tab" class="{{ showing_services ? 'active' : '' }}" role="presentation">
|
||||
<a href="service_sales_report.php" aria-controls="buy-services"
|
||||
role="tab">{{ 'Services'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="buy-subscriptions-tab" class="active" role="presentation">
|
||||
<a href="subscription_sales_report.php" aria-controls="buy-subscriptions"
|
||||
role="tab">{{ 'Subscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<br />
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="sale-columns">
|
||||
<th>{{ 'OrderReference'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'OrderStatus'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'OrderDate'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'PaymentMethod'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Price'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'CouponDiscount'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Coupon'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'ProductType'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'UserName'|get_lang }}</th>
|
||||
<th>{{ 'Email'|get_lang }}</th>
|
||||
{% if invoicing_enable %}
|
||||
<th>{{ 'Invoice'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% endif %}
|
||||
<th width="10%">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for sale in sale_list %}
|
||||
<tr class="sale-row {{ sale.id == selected_sale ? 'warning' : '' }}">
|
||||
<td class="text-center">{{ sale.reference }}</td>
|
||||
<td class="text-center">
|
||||
{% if sale.status == sale_status_canceled %}
|
||||
{{ 'SaleStatusCanceled'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% elseif sale.status == sale_status_pending %}
|
||||
{{ 'SaleStatusPending'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% elseif sale.status == sale_status_completed %}
|
||||
{{ 'SaleStatusCompleted'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center">{{ sale.date | api_get_local_time }}</td>
|
||||
<td class="text-center">{{ sale.payment_type }}</td>
|
||||
<td class="text-right">{{ sale.total_price }}</td>
|
||||
<td class="text-right">{{ sale.total_discount }}</td>
|
||||
<td class="text-right">{{ sale.coupon_code }}</td>
|
||||
<td class="text-center">{{ sale.product_type }}</td>
|
||||
<td>{{ sale.product_name }}</td>
|
||||
<td>{{ sale.complete_user_name }}</td>
|
||||
<td>{{ sale.email }}</td>
|
||||
{% if invoicing_enable %}
|
||||
<td class="text-center">
|
||||
{% if sale.invoice == 1 %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/invoice.php?' ~ {'invoice': sale.id, 'is_service': 0}|url_encode() }}" title="{{ 'InvoiceView'|get_plugin_lang('BuyCoursesPlugin') }}" >
|
||||
<img src="{{ _p.web_img }}/icons/32/default.png" alt="{{ 'InvoiceView'|get_plugin_lang('BuyCoursesPlugin') }}" />
|
||||
<br/>{{ sale.num_invoice }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-center">
|
||||
{% if sale.status == sale_status_pending %}
|
||||
<div class="btn-group btn-group-xs" role="group" aria-label="...">
|
||||
<a title="{{ 'SubscribeUser'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_self ~ '?' ~ {'order': sale.id, 'action': 'confirm'}|url_encode() }}"
|
||||
class="btn btn-default">
|
||||
<img src="{{ 'user_subscribe_session.png' | icon(22) }}" width="22" height="22 alt="{{ 'SubscribeUser'|get_plugin_lang('BuyCoursesPlugin') }}">
|
||||
</a>
|
||||
<a title="{{ 'DeleteOrder'|get_plugin_lang('BuyCoursesPlugin') }}" href="{{ _p.web_self ~ '?' ~ {'order': sale.id, 'action': 'cancel'}|url_encode() }}"
|
||||
class="btn btn-default">
|
||||
<img src="{{ 'delete.png' | icon(22) }}" width="22" height="22 alt="{{ 'DeleteOrder'|get_plugin_lang('BuyCoursesPlugin') }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('[name="filter_type"]').on('change', function () {
|
||||
var self = $(this);
|
||||
|
||||
if (self.val() === '0') {
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-status').show();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '1') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').show();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '2') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-date').show();
|
||||
$('#report-by-email').hide();
|
||||
} else if (self.val() === '3') {
|
||||
$('#report-by-status').hide();
|
||||
$('#report-by-user').hide();
|
||||
$('#report-by-date').hide();
|
||||
$('#report-by-email').show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
152
plugin/buycourses/view/subscriptions.tpl
Normal file
152
plugin/buycourses/view/subscriptions.tpl
Normal file
@@ -0,0 +1,152 @@
|
||||
{% if sessions_are_included %}
|
||||
<ul class="nav nav-tabs buy-courses-tabs" role="tablist">
|
||||
<li role="presentation" class="{{ courses ? 'active' : '' }}">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/subscriptions_courses.php' }}" >
|
||||
{{ 'Courses'|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
<li role="presentation" class="{{ sessions ? 'active' : '' }}">
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/subscriptions_sessions.php' }}" >
|
||||
{{ 'Sessions'|get_lang }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane {{ courses ? 'fade in active' : '' }} " id="courses">
|
||||
<div class="table-responsive">
|
||||
<table id="courses_table" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Title'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'HasSubscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
|
||||
<th class="text-center" width="100">{{ tax_name }}</th>
|
||||
{% endif %}
|
||||
<th class="text-right">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in courses %}
|
||||
<tr data-item="{{ item.id }}" data-type="course">
|
||||
<td>
|
||||
{% if item.visibility == 0 %}
|
||||
<img src="{{ 'bullet_red.png'|icon() }}" alt="{{ 'CourseVisibilityClosed'|get_lang }}"
|
||||
title="{{ 'CourseVisibilityClosed'|get_lang }}">
|
||||
{% elseif item.visibility == 1 %}
|
||||
<img src="{{ 'bullet_orange.png'|icon() }}" alt="{{ 'Private'|get_lang }}"
|
||||
title="{{ 'Private'|get_lang }}">
|
||||
{% elseif item.visibility == 2 %}
|
||||
<img src="{{ 'bullet_green.png'|icon() }}" alt="{{ 'OpenToThePlatform'|get_lang }}"
|
||||
title="{{ 'OpenToThePlatform'|get_lang }}">
|
||||
{% elseif item.visibility == 3 %}
|
||||
<img src="{{ 'bullet_blue.png'|icon() }}" alt="{{ 'OpenToTheWorld'|get_lang }}"
|
||||
title="{{ 'OpenToTheWorld'|get_lang }}">
|
||||
{% elseif item.visibility == 4 %}
|
||||
<img src="{{ 'bullet_grey.png'|icon() }}" alt="{{ 'CourseVisibilityHidden'|get_lang }}"
|
||||
title="{{ 'CourseVisibilityHidden'|get_lang }}">
|
||||
{% endif %}
|
||||
<a href="{{ _p.web_course ~ item.path ~ item.code~ '/index.php' }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
<span class="label label-info">{{ item.code }}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.code }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.buyCourseData %}
|
||||
<em class="fa fa-fw fa-check-square-o"></em>
|
||||
{% else %}
|
||||
<em class="fa fa-fw fa-square-o"></em>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 2) %}
|
||||
<td class="text-center">
|
||||
{{ item.buyCourseData.tax_perc_show }} %
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
{% if item.buyCourseData %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/configure_subscription.php?' ~ {'id': item.id, 'type':product_type_course}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/subscription_add.php?' ~ {'id': item.id, 'type':product_type_course}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ course_pagination }}
|
||||
</div>
|
||||
|
||||
{% if sessions_are_included %}
|
||||
<div role="tabpanel" class="tab-pane {{ sessions ? 'fade in active' : '' }} " id="sessions">
|
||||
<div class="table-responsive">
|
||||
<table id="session_table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Title'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'StartDate'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'EndDate'|get_lang }}</th>
|
||||
<th class="text-center">{{ 'HasSubscriptions'|get_plugin_lang('BuyCoursesPlugin') }}</th>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
|
||||
<th class="text-center" width="100">{{ tax_name }}</th>
|
||||
{% endif %}
|
||||
<th class="text-right">{{ 'Options'|get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in sessions %}
|
||||
<tr data-item="{{ item.id }}" data-type="session">
|
||||
<td>
|
||||
<a href="{{ _p.web_main ~ 'session/index.php?' ~ {'session_id': item.id}|url_encode() }}">{{ item.name }}</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.displayStartDate | api_convert_and_format_date(6)}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ item.displayEndDate |api_convert_and_format_date(6)}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{% if item.buyCourseData %}
|
||||
<em class="fa fa-fw fa-check-square-o"></em>
|
||||
{% else %}
|
||||
<em class="fa fa-fw fa-square-o"></em>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if tax_enable and (tax_applies_to == 1 or tax_applies_to == 3) %}
|
||||
<td class="text-center">
|
||||
{{ item.buyCourseData.tax_perc_show }} %
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
{% if item.buyCourseData %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/configure_subscription.php?' ~ {'id': item.id, 'type':product_type_session}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ _p.web_plugin ~ 'buycourses/src/subscription_add.php?' ~ {'id': item.id, 'type':product_type_session}|url_encode() }}"
|
||||
class="btn btn-info btn-sm">
|
||||
<em class="fa fa-wrench fa-fw"></em> {{ 'Configure'|get_lang }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{{ session_pagination }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
70
plugin/buycourses/view/success.tpl
Normal file
70
plugin/buycourses/view/success.tpl
Normal file
@@ -0,0 +1,70 @@
|
||||
<div class="alert alert-info">
|
||||
{{ 'PayPalPaymentOKPleaseConfirm'|get_plugin_lang('BuyCoursesPlugin') }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-5">
|
||||
<h3 class="page-header">{{ 'UserInformation'|get_plugin_lang('BuyCoursesPlugin') }}</h3>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ 'Name'|get_lang }}
|
||||
<dt>
|
||||
<dd>{{ user.complete_name }}</dd>
|
||||
<dt>{{ 'Username'|get_lang }}
|
||||
<dt>
|
||||
<dd>{{ user.username }}</dd>
|
||||
<dt>{{ 'EmailAddress'|get_lang }}
|
||||
<dt>
|
||||
<dd>{{ user.email }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-7">
|
||||
{% if buying_course %}
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-5">
|
||||
<p>
|
||||
<img alt="{{ course.title }}" class="img-responsive"
|
||||
src="{{ course.course_img ? course.course_img : 'session_default.png'|icon() }}">
|
||||
</p>
|
||||
<p class="lead text-right">{{ course.currency }} {{ course.price }}</p>
|
||||
</div>
|
||||
<div class="col-sm-6 col-md-7">
|
||||
<h3 class="page-header">{{ course.title }}</h3>
|
||||
<ul class="items-teacher list-unstyled">
|
||||
{% for teacher in course.teachers %}
|
||||
<li><em class="fa fa-user" aria-hidden="true"></em> {{ teacher.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p>
|
||||
<a class="ajax btn btn-primary btn-sm" data-title="{{ course.title }}"
|
||||
href="{{ _p.web_ajax ~ 'course_home.ajax.php?' ~ {'a': 'show_course_information', 'code': course.code}|url_encode() }}">
|
||||
{{ 'Description'|get_lang }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif buying_session %}
|
||||
<h3 class="page-header">{{ session.name }}</h3>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-5">
|
||||
<p>
|
||||
<img alt="{{ session.name }}" class="img-responsive"
|
||||
src="{{ session.image ? session.image : 'session_default.png'|icon() }}">
|
||||
</p>
|
||||
<p class="lead text-right">{{ session.currency }} {{ session.price }}</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-7">
|
||||
<p>{{ session.dates.display }}</p>
|
||||
<dl>
|
||||
{% for course in session.courses %}
|
||||
<dt>{{ course.title }}</dt>
|
||||
{% for coach in course.coaches %}
|
||||
<dd><em class="fa fa-user fa-fw" aria-hidden="true"></em> {{ coach.name }}</dd>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form }}
|
||||
Reference in New Issue
Block a user