V
V
viktorulyushev2017-04-17 10:59:23
PHP
viktorulyushev, 2017-04-17 10:59:23

Changing the inscription depending on the selected city?

It is necessary to make a substitution of the inscription if the city of St. Petersburg is selected.
This is what the button looks like

<a class="link-dotted-invert" href="" data-zone-dialog-trigger="">
    <span data-zone-current="" data-ng-bind="zone.City" data-start-val="{City: 'Санкт-Петербург'}">Санкт-Петербург</span>
</a>

In the browser cookies in ipzone there is the selected city in krakozyabra, if you decrypt it, it turns out 171; 58; 781; St. Petersburg; St. Petersburg in the project files found 2 files: zones.json and cities.json, they contain all the cities. Here for St. Petersburg
{ "CityId": 781, "Name": "Санкт-Петербург", "RegionId": 58 },

You need to make sure that when you select SPB, the inscription changes.
How will the condition approximately look like that, if CityId is 781, then we display our own inscription, if not, then the standard one?
Or at least where you can read about it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question