Packages
4
Downloads
1 349
Usually answers within 24 hours
Автор дополнения
Packages
4
Downloads
1 349
Usually answers within 24 hours
Version 1.2.4-pl
Release date 06.30.2019
Downloads 463
Views 1 256
Warning! This component requires PHP version 5.5 or higher! If your site uses PHP less than required, the installation of this package could break it.
A small useful component has the following features:
  1. Adding cities to the list.
  2. Definition of a city by domain.
  3. Determination of the city by IP-address.
  4. Adding unique information for each city.
  5. Management the prices of miniShop2 products for each city.

List of cities and its management

The component has a page on which you can manage the list of cities, add, edit and delete them, and also enable and disable cities.
<cut/>


To display a list of cities with the option of switching between them, simply call the snippet:
[[!cfCities]]

Unique information for each city

On the same page the «Data» tab is for managing information for each city. To display unique information in a component, several methods are used.



First, by default the fields that have a prefix are recorded in placeholders. And for the output of information it is enough to add the necessary placeholder to your chunks or templates, but the main thing is to call it not cached. For example, this:
[[!+cf.phone]]

Secondly, placeholders are recorded when the page loads, which can slow down the system in some cases. Therefore, I added the option to disable field entry in placeholders. In this case, to output information for each city, you need to call the cfField snippet with the desired key:
[[!cfField ?&key=`phone`]]

Goods prices management

To manage prices on the product editing page, we add a new tab «City — Price». In it you will find a table where you can indicate the price of the goods depending on the city.
If the price is not specified for a certain city, then its price will be taken by default.



After you add the price for the city, and update the cache, you will see a new price, and if the output of the old prices is installed, you’ll see an old one next to it. Additionally, you do not need to fine-tune or display anything.

cityFields 1.2.4-pl

  • Fixed search cities from web for cyrillic domains
  • Fixed JS code for support old chunks
  • Updated Sypex Geo base (release 2019.06.18)

cityFields 1.2.3-pl

  • Fixed search cities from web
  • Removed logs from cfOrderHandler class

cityFields 1.2.2-pl

  • Disabled redirect for mgr context
  • Fixed opening modal window
  • Fixed closing popover message when cityindomain option disable

cityFields 1.2.1-pl

  • Updated search cities
  • Updated web javascript code

cityFields 1.2.0-pl

  • New bootstrap based chunks
  • Added system setting cityfields_frontend_css
  • Added cookie cfCity
  • Added city change via GET query
  • Set default city from extras page
  • Updated function for get chosen city ID
  • Updated installer
  • Updated Sypex Geo base
  • Fixed redirect on default host
  • Fixed find module php-intl in snippet

cityFields 1.1.7-pl

  • Chunks, snippets & plugin is no static now
  • Fix find module php-intl
  • Remove modAction

cityFields 1.1.6-pl

  • Module php-intl not required
  • Update Sypex Geo base
  • Fix redirect after detect city
  • Fix create tables via installer

cityFields 1.1.5-pl

  • Option for disable geolocation
  • Option for exclude agents
  • Fix support msOptionsPrice2
  • Fix manager lexicons

cityFields 1.1.4-pl

  • Support cyrillic domain
  • Add $limit for cfCities snippet
  • Fix init placeholders in "Page not found"

cityFields 1.1.3-beta

  • Add $where for cfCities snippet
  • Different manager's emails miniShop2 for cities
  • Support pdoTools
  • Escape html special chars for fields value in manager
  • Fields value have more text

cityFields 1.1.2-beta

  • Fix redirect to city domain

cityFields 1.1.1-beta

  • Add placeholder [[+cf.current_city.url]]

cityFields 1.1.0-beta

  • Init city from domain
  • Snippet cfField like modifier
  • Current city in placeholders
  • Filters for fields in manager
  • Combobox for placeholder's input in field's update window
  • Fix support with msOptionsPrice2
  • Fix styles on update product page
  • Fix duplicate cities and fields
  • Update snippet cfCities
  • Update chunk cfCities.row
  • Update models and tables
  • Update sxGeo database

cityFields 1.0.7-pl

  • Support msOptionsPrice2

cityFields 1.0.6-pl

  • Fix get product price

cityFields 1.0.5-pl

  • Fix get fields value

cityFields 1.0.4-pl

  • Fix for support miniShop2 2.4

cityFields 1.0.3-pl

  • Geolocation by IP

cityFields 1.0.2-pl

  • Fix miniShop2 prices processors
  • Fix show form on edit product page

cityFields 1.0.1-pl

  • Default city option
  • Frontend js file path option
  • Modify product prices for cities (required miniShop2)
  • Sort options in snippet cfCities
  • Could disable write fields to placeholders
  • New snippet cfField
  • Support AjaxManager

cityFields 1.0.0-pl

  • Release component.