MODX Meetup Moscow '18

Moscow! It has been on our Meetup-location wish-list for years now. The Russian MODX community is huge and now is finally the time for a meetup in the Russian capital: Moscow!

The people behind the well-known and websites organised the meetup: a wonderful location, speakers and live-translation. This was the second time we got live-translation during a meetup (Minsk 2017) was the first time and it works perfect! Russian and English speaking people in one audience.

Gauke Pieter Sietzema
10 october 2018, 14:56

Minishop2: german umlauts (ä, ö, ü)

When saving a new contact/customer german umlauts (ä, ü, ö) are filtered out.
Can I change this?
Is it in the class
, function
validate($key, $value)

case 'receiver':
                // Transforms string from "nikolaj -  coster--Waldau jr." to "Nikolaj Coster-Waldau Jr."
                $tmp = preg_replace(
                    array('/[^-a-zа-яёЁ\s\.]/iu', '/\s+/', '/\-+/', '/\.+/'),
                    array('', ' ', '-', '.'),
                $tmp = preg_split('/\s/', $tmp, -1, PREG_SPLIT_NO_EMPTY);
                $tmp = array_map(array($this, 'ucfirst'), $tmp);
                $value = preg_replace('/\s+/', ' ', implode(' ', $tmp));
                if (empty($value)) {
                    $value = false;
Thank you for your help.
Fabian Christen
29 june 2018, 13:18

[jwtSession] Moving session cookies to your browser

Hello friends!

Did you wonder how sessions work in MODX? Every time someone visits the site, PHP generates a unique id for it and stores it in a PHPSESSID cookie. At the same time, an modSession record is created in the database with this id and the contents of the current session.

Each time a request is submitted, a cookie with id is sent to the site, and MODX makes a request to the database, loads the session, and then saves the changes to it. At least 2 queries to the database every time.

What does JWT offer us? Abandon all these actions on the server, and give everything you need right away in one token. It can be stored in cookies or in the browser’s local storage. And then, upon request, a user session will be created from it. Accordingly, we throw out work with the database and do not store user sessions on the server at all.

Of course, the question immediately arises — what will happen if the user fakes such a session? JWT standard will not allow it. Tokens can be read, but not changed, because they are all signed by a reliable algorithm with a key on a server that the user does not know. This is a theory, and now we proceed to practice in MODX.
Василий Наумкин
24 march 2019, 18:56

pdoResources - using "where" to select a child

Please help me, if possible, to select with pdoResources the resources existent in a specified child of a container.
For example, I have the top level container, named Books and two children Technical and Belletristic. Each of them contain specific books.

I want to display them in two different sections of a page. I think I need something like `where parrent is "%Technical"` but I did not find examples and I need to solve this fast.

Thank you for support!
Claudiu Ro
16 january 2019, 11:35

minishop2 - Minimum order amount: possible?

Is there a way to set a minimum order amount in minishop2?
I want that customers must reach a minimum amount before they can send a order.

Thank you for your help.
Fabian Christen
21 january 2019, 16:19

Thanks to the author

Hello, my friends!

Yesterday, the Habr announced thanks to Habr's authors, and I thought — why are we worse?

From today, you can specify details for payment services in your settings, and immediately after that you will have a button in your profile and in topics, next to the name. So far, I added these services:
  • Paypal
  • Donation Alerts
  • WebMoney
  • Yandex.Money
  • Qiwi
Василий Наумкин
28 february 2019, 16:11

MODX Digest #1 (February 25 - March 11, 2019)

Fresh news about MODX.

In the release: icons for content types, refactoring of the 3.x branch from Jason, work on new documentation, thanks to the author on and video presentations from all MODX-events hosted in Minsk, Belarus. Enjoy reading!

Иван Климчук
18 march 2019, 12:11

Using pdoPage pagination placeholders


Is it possible to show «Showing 1 to 5 of 15 (3 Pages)», «Showing 6 to 10 of 15 (3 Pages)», «Showing 11 to 15 of 15 (3 Pages)»,...etc with pdoPage? is there a placeholder for firstItem and lastitem? I have been searching online but I cannot find any solution to my question.
Jevon Boyce
26 may 2019, 01:13

Minishop2 and Office: additional fields (gender, building, fullname)

Dear MODX Community,

I some questions about using fields in minishop2 with the Extra «Office».

1. user field «gender»
I added a select field for the gender of a customer. I want to use it for the salutation (Mr. / Ms.).
It works within the Office form chunk (tpl.Office.Profile.form)
<!-- gender: {$gender} -->
    <div class="form-group">
        <label class="col-md-2 control-label" for="gender">Anrede</label>
        <div class="col-md-2">
            <select class="form-control" name="gender" id="gender">
              <option value="0">-- Anrede --</option>
              <option value="2" {if $gender == "2" }selected{/if}>Frau</option>
              <option value="1"{if $gender == "1" }selected{/if}>Herr</option>
    <!-- end gender -->
But on registration (in the chunk «tpl.Office.auth.login» it does not save the gender. How do I activate it?

2. Gender in a order of minishop2
How can I add the field «gender» (see above) in the address fields in a order? Chunk «tpl.msOrder».

3. Email addresses with errors
Sometimes new customers do write their email address with errors. Is there a way to add a second field for the email address where they have to enter the email address again to verify it?

thank you for your help.
Fabian Christen
03 june 2019, 13:23

Using a migx tv to filter with msproducts


I am currently developing an e-commerce multi site. I need to filter out products base on its territory. To filter out products, I have created a migx tv named product_prices which has a listbox tv that contain all of the territories where the product maybe available e.g country 1==c1||country 2 ==c2||country 3 ==c3, etc. Also I have 2 date tvs, Deal start date & Deal end date (with date and time options) within this migx, so I can filter out special deal products when a territory has a promotion. I've tried using the code below but nothing happens
Jevon Boyce
03 june 2019, 23:22