mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -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' => [
|
||||
'title' => 'visiosoft.module.advs::section.ads',
|
||||
'fields' => [
|
||||
'detailed_product_options',
|
||||
'latest-limit',
|
||||
'popular_ads_limit',
|
||||
'ads_image_limit',
|
||||
|
||||
@ -431,4 +431,10 @@ return [
|
||||
]
|
||||
],
|
||||
'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!",
|
||||
'sold_status_change' => "Your Ad's Status Has Been Set to Sold!",
|
||||
'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',
|
||||
'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>
|
||||
|
||||
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
|
||||
<div class="row form-group select-options">
|
||||
<label for="selectOptions" class="col-sm-2">
|
||||
{{ trans('visiosoft.module.advs::field.options') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="selectOptions" class="form-control options-tags"
|
||||
multiple="multiple"
|
||||
name="options[]">
|
||||
{% if count(options) %}
|
||||
{% for option in options %}
|
||||
<option id="advOption{{ option.id }}"
|
||||
selected="selected">{{ option.name }}</option>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</select>
|
||||
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
|
||||
<div class="row form-group select-options">
|
||||
<label for="selectOptions" class="col-sm-2">
|
||||
{{ trans('visiosoft.module.advs::field.options') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="selectOptions" class="form-control options-tags"
|
||||
multiple="multiple"
|
||||
name="options[]">
|
||||
{% if count(options) %}
|
||||
{% for option in options %}
|
||||
<option id="advOption{{ option.id }}"
|
||||
selected="selected">{{ option.name }}</option>
|
||||
{% endfor %}
|
||||
{% 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 class="row form-group product-options">
|
||||
<label for="productOptions" class="col-sm-2">
|
||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
|
||||
{% else %}
|
||||
<div class="row form-group product-options">
|
||||
<label for="productOptions" class="col-sm-2">
|
||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
@ -9,6 +9,12 @@
|
||||
<br>
|
||||
{{ trans('visiosoft.module.advs::field.preview_text.part_2') }}
|
||||
</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 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')) %}
|
||||
@ -19,10 +25,12 @@
|
||||
{% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %}
|
||||
{% endif %}
|
||||
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||
class="btn btn-warning shadow-sm mr-4 text-white">
|
||||
{{trans('visiosoft.module.advs::button.create_configurations')}}
|
||||
</a>
|
||||
{% if setting_value('visiosoft.module.advs::detailed_product_options') %}
|
||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||
class="btn btn-warning shadow-sm mr-4 text-white">
|
||||
{{ trans('visiosoft.module.advs::button.create_configurations') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="{{ url_route('visiosoft.module.advs::edit_adv', [adv.id]) }}"
|
||||
class="btn preview-edit shadow-sm border">
|
||||
@ -33,17 +41,18 @@
|
||||
</a>
|
||||
</div>
|
||||
<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>
|
||||
<div class="preview-actions text-center">
|
||||
{% if not setting_value('visiosoft.module.advs::hide_configurations') %}
|
||||
<a href="{{ route('visiosoft.module.advs::user.configrations.create') }}?ad={{ adv.id }}"
|
||||
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>
|
||||
{% 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') }}
|
||||
</a>
|
||||
<a href="{{ continueLink }}" class="btn preview-continue shadow-sm ml-4">
|
||||
|
||||
@ -87,12 +87,12 @@ class ExceptionHandler extends Handler
|
||||
public function report(Exception $e)
|
||||
{
|
||||
|
||||
if (!setting_value('visiosoft.module.advs::disable_sentry')
|
||||
&& app()->bound('sentry')
|
||||
&& $this->shouldReport($e)
|
||||
&& env('SENTRY_LARAVEL_DSN')) {
|
||||
|
||||
app('sentry')->captureException($e);
|
||||
if (app()->bound('sentry')
|
||||
&& $this->shouldReport($e)
|
||||
&& env('SENTRY_LARAVEL_DSN')) {
|
||||
if (!setting_value('visiosoft.module.advs::disable_sentry')) {
|
||||
app('sentry')->captureException($e);
|
||||
}
|
||||
}
|
||||
|
||||
parent::report($e);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user