Answer the question
In order to leave comments, you need to log in
How to add content management to html page?
There is a landing page (in html), on which, as an example, 20 products are posted.
You need to add the ability to change the status ("in stock" "out of stock").
How can this be done without full stretch on cms?
Answer the question
In order to leave comments, you need to log in
$orderapi = 7690218;
$result = json_decode('{"orders":{"7690218":{"id":"7690218","obj":"wall35173603_613","act":"vk_like","status":"works","timeout":"10","count":"5","count_good":"0","start":"16:21 06.09.2018","criterion":"no"}}}');
$status = $result->orders->$orderapi->status; // works
$count_good = $result->orders->$orderapi->count_good; // 0
$details = json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip={$ip}"));
$city = $details->{'geoplugin_city'}; // Город
$region = $details->{'geoplugin_region'}; // Регион
$country = $details->{'geoplugin_countryCode'}; // Код страны
$details = json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip={$ip}"));
echo $details;
You can add a true flag to the json_decode($json, true) function. Then you will get a set of nested arrays, respectively, you can extract data through square brackets, and not property calls from objects. You can also use the foreach loop and other array functions.
An example from Alexander Shapoval would look like this:
$orderapi = 7690218;
$result = json_decode('{"orders":{"7690218":{"id":"7690218","obj":"wall35173603_613","act":"vk_like","status":"works","timeout":"10","count":"5","count_good":"0","start":"16:21 06.09.2018","criterion":"no"}}}', true);
$status = $result['orders'][$orderapi]['status']; //works
$count_good = $result['orders'][$orderapi]['count_good']; //0
you can use php
to define a variable$var = $var ? в наличии : нет в наличии
drive all the information about the goods into the DBMS through phpmyadmin. the easiest and cheapest option. and output in a loop.
and banal CMS and presentation logic can be hung up
If in general terms:
1. file where we store the list of goods
2. Landing
3. Where we manage the status
We hook a script that checks the status of the goods in file No. 1 and displays the status in No. 2. We change the status in No. 3 and save the value in No. 1.
Storage can be google spreadsheets, html, mysql, crm, etc. depending on skills.
Most often, small php/js scripts are written on landing pages that check the statuses in crm. and send requests.
And so try (tilda.cc) or the like out of the box like that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question