mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge pull request #1015 from openclassify/vedatakd
fixed simple options for cart && optional detailed product option
This commit is contained in:
commit
ee5ccc67c1
@ -23,6 +23,7 @@ return [
|
|||||||
'ads' => [
|
'ads' => [
|
||||||
'title' => 'visiosoft.module.advs::section.ads',
|
'title' => 'visiosoft.module.advs::section.ads',
|
||||||
'fields' => [
|
'fields' => [
|
||||||
|
'detailed_product_options',
|
||||||
'latest-limit',
|
'latest-limit',
|
||||||
'popular_ads_limit',
|
'popular_ads_limit',
|
||||||
'ads_image_limit',
|
'ads_image_limit',
|
||||||
|
|||||||
@ -431,4 +431,10 @@ return [
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'disable_sentry' => 'anomaly.field_type.boolean',
|
'disable_sentry' => 'anomaly.field_type.boolean',
|
||||||
|
'detailed_product_options' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => true,
|
||||||
|
]
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -31,4 +31,5 @@ return [
|
|||||||
'passive_status_change' => "Your Ad's Status Has Been Set to Passive!",
|
'passive_status_change' => "Your Ad's Status Has Been Set to Passive!",
|
||||||
'sold_status_change' => "Your Ad's Status Has Been Set to Sold!",
|
'sold_status_change' => "Your Ad's Status Has Been Set to Sold!",
|
||||||
'status_change' => "Your Ad's Status Has Been Set to :status!",
|
'status_change' => "Your Ad's Status Has Been Set to :status!",
|
||||||
|
'disabled_detailed_options_for_admin_role' => "Detailed product options are disabled.",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -258,4 +258,8 @@ return [
|
|||||||
'name' => 'Watermark',
|
'name' => 'Watermark',
|
||||||
'instructions' => 'Is watermark active?'
|
'instructions' => 'Is watermark active?'
|
||||||
],
|
],
|
||||||
|
'detailed_product_options' => [
|
||||||
|
'name' => 'Detailed Product Options',
|
||||||
|
'instructions' => 'Allows you to enter stock and price information for the product'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -134,32 +134,42 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
|
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
|
||||||
<div class="row form-group select-options">
|
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
|
||||||
<label for="selectOptions" class="col-sm-2">
|
<div class="row form-group select-options">
|
||||||
{{ trans('visiosoft.module.advs::field.options') }}
|
<label for="selectOptions" class="col-sm-2">
|
||||||
</label>
|
{{ trans('visiosoft.module.advs::field.options') }}
|
||||||
<div class="col-sm-10">
|
</label>
|
||||||
<select id="selectOptions" class="form-control options-tags"
|
<div class="col-sm-10">
|
||||||
multiple="multiple"
|
<select id="selectOptions" class="form-control options-tags"
|
||||||
name="options[]">
|
multiple="multiple"
|
||||||
{% if count(options) %}
|
name="options[]">
|
||||||
{% for option in options %}
|
{% if count(options) %}
|
||||||
<option id="advOption{{ option.id }}"
|
{% for option in options %}
|
||||||
selected="selected">{{ option.name }}</option>
|
<option id="advOption{{ option.id }}"
|
||||||
{% endfor %}
|
selected="selected">{{ option.name }}</option>
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
</select>
|
{% endif %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
{% if auth_check() and auth_user().hasRole('admin') %}
|
||||||
|
<div class="col-12 text-right py-2">
|
||||||
|
<p class="text-muted">
|
||||||
|
<i class="fa fa-exclamation-triangle"></i>
|
||||||
|
{{ trans('visiosoft.module.advs::message.disabled_detailed_options_for_admin_role') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% else %}
|
||||||
|
<div class="row form-group product-options">
|
||||||
<div class="row form-group product-options">
|
<label for="productOptions" class="col-sm-2">
|
||||||
<label for="productOptions" class="col-sm-2">
|
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
</label>
|
||||||
</label>
|
<div class="col-sm-10">
|
||||||
<div class="col-sm-10">
|
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
|
||||||
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,12 @@
|
|||||||
<br>
|
<br>
|
||||||
{{ trans('visiosoft.module.advs::field.preview_text.part_2') }}
|
{{ trans('visiosoft.module.advs::field.preview_text.part_2') }}
|
||||||
</p>
|
</p>
|
||||||
|
{% if auth_check() and auth_user().hasRole('admin') %}
|
||||||
|
<p class="text-muted text-center mb-0">
|
||||||
|
<i class="fa fa-exclamation-triangle"></i>
|
||||||
|
{{ trans('visiosoft.module.advs::message.disabled_detailed_options_for_admin_role') }}
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-actions text-center">
|
<div class="preview-actions text-center">
|
||||||
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') and (auth_user().isAdmin or not auth_user().hasPermission('visiosoft.module.packages::packages.no_read')) %}
|
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') and (auth_user().isAdmin or not auth_user().hasPermission('visiosoft.module.packages::packages.no_read')) %}
|
||||||
@ -19,10 +25,12 @@
|
|||||||
{% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %}
|
{% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
||||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
{% if setting_value('visiosoft.module.advs::detailed_product_options') %}
|
||||||
class="btn btn-warning shadow-sm mr-4 text-white">
|
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||||
{{trans('visiosoft.module.advs::button.create_configurations')}}
|
class="btn btn-warning shadow-sm mr-4 text-white">
|
||||||
</a>
|
{{ trans('visiosoft.module.advs::button.create_configurations') }}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
|
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
|
||||||
class="btn preview-edit shadow-sm border">
|
class="btn preview-edit shadow-sm border">
|
||||||
@ -33,17 +41,18 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-wrapper position-relative">
|
<div class="preview-wrapper position-relative">
|
||||||
{% include "visiosoft.module.advs::new-ad/preview/partials/preview-window" %}
|
{% include "visiosoft.module.advs::new-ad/preview/partials/preview-window" %}
|
||||||
<div class="preview-overlay position-absolute"></div>
|
<div class="preview-overlay position-absolute"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-actions text-center">
|
<div class="preview-actions text-center">
|
||||||
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
||||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||||
class="btn btn-warning shadow-sm mr-4 text-white">
|
class="btn btn-warning shadow-sm mr-4 text-white">
|
||||||
{{trans('visiosoft.module.advs::button.create_configurations')}}
|
{{ trans('visiosoft.module.advs::button.create_configurations') }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}" class="btn preview-edit shadow-sm border">
|
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
|
||||||
|
class="btn preview-edit shadow-sm border">
|
||||||
{{ trans('visiosoft.module.advs::field.edit') }}
|
{{ trans('visiosoft.module.advs::field.edit') }}
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ continueLink }}" class="btn preview-continue shadow-sm ml-4">
|
<a href="{{ continueLink }}" class="btn preview-continue shadow-sm ml-4">
|
||||||
|
|||||||
@ -87,12 +87,12 @@ class ExceptionHandler extends Handler
|
|||||||
public function report(Exception $e)
|
public function report(Exception $e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!setting_value('visiosoft.module.advs::disable_sentry')
|
if (app()->bound('sentry')
|
||||||
&& app()->bound('sentry')
|
&& $this->shouldReport($e)
|
||||||
&& $this->shouldReport($e)
|
&& env('SENTRY_LARAVEL_DSN')) {
|
||||||
&& env('SENTRY_LARAVEL_DSN')) {
|
if (!setting_value('visiosoft.module.advs::disable_sentry')) {
|
||||||
|
app('sentry')->captureException($e);
|
||||||
app('sentry')->captureException($e);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::report($e);
|
parent::report($e);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user