PHP
- 4 ответа
- 0 вопросов
3
Вклад в тег
"packages": [
{
"count": 1,
"dimensions": {
"weight": 1000,
"length": 500,
"height": 500,
"width": 500
},
"price": 1000,
"estimatedPrice": 1000
}
]
"packages"=>[
"count"=> 1,
"dimensions"=> [
"weight"=> 1000,
"length"=> 500,
"width"=> 500,
"height"=> 500,
],
"price"=> 1000,
"estimatedPrice"=> 1000
],
"packages"=>[[
"count"=> 1,
"dimensions"=> [
"weight"=> 1000,
"length"=> 500,
"width"=> 500,
"height"=> 500,
],
"price"=> 1000,
"estimatedPrice"=> 1000]
],
$('.number-only').on('input', function(){
this.value = this.value.replace(/[^\d\.,]/g, "");
this.value = this.value.replace(/,/g, ".");
if(this.value.match(/\./g).length > 1) {
this.value = this.value.substr(0, this.value.lastIndexOf("."));
}
});
<p class="cost">
{if $p.price != 0}
{if $p.params.type_tovar == metrazh}
{shop_currency_html($p.price * 100)}
{else}
{shop_currency_html($p.price)}
{/if}
{/if}
</p>