mivita/resources/views/user/order/list_ot-member.blade.php
Kevin cdb121fde0 Abo: Einmalprodukte bereits bei der Abo-Anlage + es/fr-Sprachsync
Einmalprodukte (Normalsortiment, show_on 3) können jetzt schon beim
Abo-Abschluss hinzugefügt werden – im Portal-Wizard (Abschnitt im
Upgrade-Schritt) und in allen drei Sales-Center-Abo-Strecken (eigene
Produktliste). Variante A: Zeilen laufen als Cart-Option abo_addon mit
durch den Checkout, werden sofort bezahlt und mit der Erstlieferung
verschickt (Rechnung/Lieferschein gruppieren automatisch).

- Checkout persistiert is_abo_addon (CheckoutRepository, PaymentHelper)
- createAboItems/ensureUserAboItemsFromLatestOrder überspringen Addons
  (sonst würden Einmalprodukte dauerhaft wiederkehren); amount ohne
  Addon-Anteil; aboHasBaseProduct ignoriert Addon-Zeilen
- CreateAboReplacementOrder propagiert is_abo_addon in Ersatzbestellungen
- iq-shopping-cart.js: zweite Datatable + abo_addon-Flag-Weitergabe
- i18n: neue abo.onetime_create_*-Keys (de/en/es/fr); zusätzlich es/fr
  komplett synchronisiert (abo-Kartenblock, navigation, payment,
  weborder inkl. Entfernung PAYONE-Altlasten, withdrawal.php neu)
- Tests: AboCreateOneTimeItemsTest, AboCreateOneTimeCartTest,
  AboPortalCreateOneTimeTest (17 neue, 122 Tests gesamt grün)

Plan: dev/2026-07-21-abo-einmalprodukte-anlage/

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:36:40 +00:00

95 lines
No EOL
3.6 KiB
PHP

@include('user.order._list_delivery_vat_info')
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-order-list table table-striped table-bordered" id="datatables-order-list" data-url="{{route('user_order_my_perform_request')}}">
<thead>
<tr>
@if($is_abo)<th>Abo</th>@endif
<th>{{__('tables.image')}}</th>
<th>{{__('tables.product')}}</th>
<th>{{__('tables.my_price_net')}}</th>
<th>{{__('tables.my_price_gross')}}</th>
<th>{{__('tables.points')}}</th>
<th>{{__('tables.vk_price')}} {{__('tables.gross')}}</th>
<th><span class="no-line-break">{{__('tables.contents')}} (ml)</span></th>
<th>{{__('tables.article_no')}}</th>
<th>#</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
@if($is_abo)
@include('user.order._onetime_list')
@endif
{!! Form::open(['action' => route('user_order_my_payment', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!}
<input type="hidden" name="shipping_is_for" value="{{$for}}">
<input type="hidden" name="is_abo" value="{{$is_abo}}">
@include('user.order.shipping_ot')
<div class="card mt-4">
<div class="card-body">
<h4>{{ __('order.shopping_cart') }} </h4>
<div id="holder_html_view_card">
@include('user.order.yard_view_form')
</div>
</div>
</div>
<div class="mt-2">
<a href="{{ route('user_order_my_delivery', [$for, $delivery_id]) }}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
var iqShoppingCart = IqShoppingCart.init();
var oTable = $('#datatables-order-list').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_order_my_datatable') !!}',
data: function(d) {
d.shipping_is_for = $('input[name=shipping_is_for]').val();
d.is_abo = $('input[name=is_abo]').val();
}
},
"order": [[@if($is_abo) 0 @else 7 @endif, "asc" ]],
"columns": [
@if($is_abo) { data: 'abo', name: 'abo', searchable: false, width: 35 },@endif
{ data: 'picture', name: 'picture', searchable: false, width: 35 },
{ data: 'product', name: 'product' },
{ data: 'price_net', name: 'price_net', searchable: false, orderable: false },
{ data: 'price_gross', name: 'price_gross', searchable: false, orderable: false },
{ data: 'points', name: 'points', searchable: false },
{ data: 'price_vk_gross', name: 'price_vk_gross', searchable: false },
{ data: 'contents_total', name: 'contents_total', searchable: false },
{ data: 'number', name: 'number' },
{ data: 'action', name: 'action', searchable: false, orderable: false },
],
"bLengthChange": false,
"iDisplayLength": 1000,
"paging": false,
"language": {
"url": "/js/datatables-{{ \App::getLocale() }}.json"
},
drawCallback: function (settings) {
iqShoppingCart.reInit();
}
});
iqShoppingCart.setDatabase(oTable);
$('body').tooltip({
selector: '.product-tooltip'
});
});
</script>