A
A
alokey2015-06-15 02:00:39
MODX
alokey, 2015-06-15 02:00:39

How to display GET variable in tvFilters?

It is necessary that the catalog is filtered by a get-request in the getproducts snippet. It is necessary that a list of certain categories of goods be formed using pre-created links.
Here is the getproducts call:


The tagGet snippet gets a variable from get
<?php
return $_GET["tags"];

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
ChernovGV, 2015-08-24
@ChernovGV

Try handwriting the tag first:
Also see what your snippet returns.
You can also try to generate the entire request with a snippet as I did:


+ get_filters snippet:
<?php
if(isset($_GET['filter_name']) && isset($_GET['filter_value'])){
    return '{"'.$_GET['filter_name'].'":"'.$_GET['filter_value'].'"}';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question