Translations added for cart item attribute labels
This commit is contained in:
parent
131e3f1e18
commit
0b2d8a89c1
|
|
@ -399,15 +399,15 @@ class Booking
|
|||
|
||||
$data['attributes'] = [
|
||||
[
|
||||
'attribute_name' => 'Event Ticket',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.event-ticket'),
|
||||
'option_id' => 0,
|
||||
'option_label' => $ticket->name,
|
||||
], [
|
||||
'attribute_name' => 'Rent From',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.event-from'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimeString($bookingProduct->available_from)->format('d F, Y'),
|
||||
], [
|
||||
'attribute_name' => 'Rent Till',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.event-till'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimeString($bookingProduct->available_to)->format('d F, Y'),
|
||||
]
|
||||
|
|
@ -430,15 +430,15 @@ class Booking
|
|||
|
||||
$data['attributes'] = [
|
||||
[
|
||||
'attribute_name' => 'Rent Type',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.rent-type'),
|
||||
'option_id' => 0,
|
||||
'option_label' => trans('bookingproduct::app.shop.cart.' . $rentingType),
|
||||
], [
|
||||
'attribute_name' => 'Rent From',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.rent-from'),
|
||||
'option_id' => 0,
|
||||
'option_label' => $from,
|
||||
], [
|
||||
'attribute_name' => 'Rent Till',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.rent-till'),
|
||||
'option_id' => 0,
|
||||
'option_label' => $to,
|
||||
]
|
||||
|
|
@ -446,16 +446,41 @@ class Booking
|
|||
|
||||
break;
|
||||
|
||||
case 'table':
|
||||
$timestamps = explode('-', $data['booking']['slot']);
|
||||
|
||||
$data['attributes'] = [
|
||||
[
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.booking-from'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimestamp($timestamps[0])->format('d F, Y h:i A'),
|
||||
], [
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.booking-till'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimestamp($timestamps[1])->format('d F, Y h:i A'),
|
||||
]
|
||||
];
|
||||
|
||||
if ($data['booking']['note'] != '') {
|
||||
$data['attributes'][2] = [
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.special-note'),
|
||||
'option_id' => 0,
|
||||
'option_label' => $data['booking']['note'],
|
||||
];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$timestamps = explode('-', $data['booking']['slot']);
|
||||
|
||||
$data['attributes'] = [
|
||||
[
|
||||
'attribute_name' => 'Booking From',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.booking-from'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimestamp($timestamps[0])->format('d F, Y h:i A'),
|
||||
], [
|
||||
'attribute_name' => 'Booking Till',
|
||||
'attribute_name' => trans('bookingproduct::app.shop.cart.booking-till'),
|
||||
'option_id' => 0,
|
||||
'option_label' => Carbon::createFromTimestamp($timestamps[1])->format('d F, Y h:i A'),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -110,6 +110,15 @@ return [
|
|||
'renting_type' => 'Rent Type',
|
||||
'daily' => 'Daily',
|
||||
'hourly' => 'Hourly',
|
||||
'event-ticket' => 'Event Ticket',
|
||||
'event-from' => 'Event From',
|
||||
'event-till' => 'Event Till',
|
||||
'rent-type' => 'Rent Type',
|
||||
'rent-from' => 'Rent From',
|
||||
'rent-till' => 'Rent Till',
|
||||
'booking-from' => 'Booking From',
|
||||
'booking-till' => 'Booking Till',
|
||||
'special-note' => 'Special Request/Notes',
|
||||
]
|
||||
]
|
||||
];
|
||||
Loading…
Reference in New Issue