mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #1056 from openclassify/muammertop
need to items in cart for new oc-theme
This commit is contained in:
commit
728ce68aba
@ -28,6 +28,7 @@ return [
|
||||
'popular_ads_limit',
|
||||
'ads_image_limit',
|
||||
'default_view_type',
|
||||
'show_price_to_members_only',
|
||||
'price_area_hidden',
|
||||
'hide_listing_standard_price',
|
||||
'hide_zero_price',
|
||||
|
||||
@ -443,4 +443,10 @@ return [
|
||||
'default_value' => false,
|
||||
]
|
||||
],
|
||||
'show_price_to_members_only' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
'default_value' => false,
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
@ -264,5 +264,8 @@ return [
|
||||
],
|
||||
'show_subcats_mobile' => [
|
||||
'name' => 'Show subcategories on mobile view',
|
||||
]
|
||||
],
|
||||
'show_price_to_members_only' => [
|
||||
'name' => 'Show Price To Members Only',
|
||||
],
|
||||
];
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<div class="slider-text">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row
|
||||
{{ setting_value('visiosoft.module.advs::show_price_to_members_only') ? (not auth_check() ? 'd-none') }}">
|
||||
{% set standardPrice = adv.standard_price.value %}
|
||||
{% if standardPrice and standardPrice > 0 %}
|
||||
<div class="d-flex flex-wrap align-items-center">
|
||||
|
||||
@ -1108,6 +1108,16 @@ class AdvsController extends PublicController
|
||||
$response['status'] = "success";
|
||||
$count = $cart->getItems()->count;
|
||||
$response['count'] = $count;
|
||||
$response['item'] = [
|
||||
'id' => $cart->getItems()->last->id,
|
||||
'adv_id' => $cart->getItems()->last->entry_id,
|
||||
'photo' => url($cart->getItems()->last->entry->cover_photo),
|
||||
'url' => $thisModel->getAdvDetailLinkByAdId($adv->id),
|
||||
'name' => $adv->name,
|
||||
'quantity' => $cart->getItems()->last->quantity,
|
||||
'price' => app(Currency::class)->format($cart->getItems()->last->price, $cart->getItems()->last->currency),
|
||||
'subtotal' => app(Currency::class)->format($cart->subtotal, setting_value('streams::currency'))
|
||||
];
|
||||
} else {
|
||||
$response['status'] = "error";
|
||||
$response['msg'] = trans('visiosoft.module.advs::message.error_added_cart');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user