mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -06:00
price format
This commit is contained in:
parent
9110db48e5
commit
2a7034016a
@ -112,7 +112,9 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
'order' => 'anomaly.field_type.integer',
|
'order' => 'anomaly.field_type.integer',
|
||||||
'price' => 'anomaly.field_type.decimal',
|
'price' => [
|
||||||
|
'type' => 'visiosoft.field_type.decimal',
|
||||||
|
],
|
||||||
'currency' => [
|
'currency' => [
|
||||||
'type' => 'anomaly.field_type.select',
|
'type' => 'anomaly.field_type.select',
|
||||||
'config' => [
|
'config' => [
|
||||||
|
|||||||
@ -151,15 +151,6 @@ return [
|
|||||||
'mode' => 'upload',
|
'mode' => 'upload',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'currencies' => [
|
|
||||||
"type" => "anomaly.field_type.checkboxes",
|
|
||||||
'bind' => 'adv.currencies',
|
|
||||||
'env' => 'ADV_CURRENCIES',
|
|
||||||
'config' => [
|
|
||||||
"default_value" => 'a:1:{i:0;s:1:"0";}',
|
|
||||||
'options' => Config::get('streams::currencies.enabled')
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'free_currencyconverterapi_key' => [
|
'free_currencyconverterapi_key' => [
|
||||||
"type" => "anomaly.field_type.text",
|
"type" => "anomaly.field_type.text",
|
||||||
'bind' => 'adv.free_currencyconverterapi_key',
|
'bind' => 'adv.free_currencyconverterapi_key',
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
{% if blocks('ad-item-details-block-area') is null %}
|
{% if blocks('ad-item-details-block-area') is null %}
|
||||||
<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">
|
||||||
<h3 class="ad-price">
|
<h3 class="ad-price">
|
||||||
<b>{{ currency_symbol(adv.currency) }}{{ adv.price.format() }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
|
|
||||||
<!-- priceField with Block -->
|
<!-- priceField with Block -->
|
||||||
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
|
{{ addBlock('ad-detail/priceField',{'adv':adv})|raw }}
|
||||||
<!-- priceField with Block -->
|
<!-- priceField with Block -->
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<div class="col-md-3 text-left justify-content-center align-self-center">
|
<div class="col-md-3 text-left justify-content-center align-self-center">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<b>{{ adv.price.currency }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
</div>
|
</div>
|
||||||
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
{% if setting_value('visiosoft.module.location::list_page_location') %}
|
||||||
<div class="col-md-12 justify-content-center align-self-center text-truncate">
|
<div class="col-md-12 justify-content-center align-self-center text-truncate">
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="justify-content-center align-middle">
|
<td class="justify-content-center align-middle">
|
||||||
<b>{{ adv.price.currency }}</b>
|
<b>{{ adv.price.currency(null,'currency',false) }}</b>
|
||||||
</td>
|
</td>
|
||||||
<td class="justify-content-center align-middle">
|
<td class="justify-content-center align-middle">
|
||||||
<small>{{ adv.created_at|date("d/m/Y") }}</small>
|
<small>{{ adv.created_at|date("d/m/Y") }}</small>
|
||||||
|
|||||||
@ -163,6 +163,7 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
foreach ($featured_advs as $index => $ad) {
|
foreach ($featured_advs as $index => $ad) {
|
||||||
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
$featured_advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
||||||
|
$featured_advs[$index]->price = number_format($ad->price);
|
||||||
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
$featured_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,8 @@
|
|||||||
"anomaly/html_block-extension": "~1.0.0",
|
"anomaly/html_block-extension": "~1.0.0",
|
||||||
"anomaly/wysiwyg_block-extension": "~1.0.0",
|
"anomaly/wysiwyg_block-extension": "~1.0.0",
|
||||||
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
"ammadeuss/laravel-html-dom-parser": "^1.1",
|
||||||
|
"visiosoft/decimal-field_type": "~2.1.0",
|
||||||
|
"visiosoft/integer-field_type": "~2.1.0",
|
||||||
"guzzlehttp/guzzle": "~6.3.3"
|
"guzzlehttp/guzzle": "~6.3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user