Skip to content

Commit

Permalink
docs: Скриншоты заменены на код
Browse files Browse the repository at this point in the history
  • Loading branch information
GulomovCreative committed Nov 5, 2023
1 parent 5c4710a commit 3a1d2fd
Show file tree
Hide file tree
Showing 3 changed files with 592 additions and 3 deletions.
187 changes: 186 additions & 1 deletion docs/components/minishop2/snippets/mscart.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,192 @@
<pre>[[!msCart?tpl=``]]</pre>
```

[![](https://file.modx.pro/files/6/1/f/61f8ee92a1949258329e86d793896b96s.jpg)](https://file.modx.pro/files/6/1/f/61f8ee92a1949258329e86d793896b96.png)
::: details Пример

```php
Array
(
[total] => Array
(
[count] => 4
[weight] => 0
[cost] => 2 100
[discount] => 0
)

[products] => Array
(
[0] => Array
(
[id] => 4
[type] => document
[contentType] => text/html
[pagetitle] => Товар 1
[longtitle] =>
[description] =>
[alias] => товар-1
[alias_visible] => 1
[link_attributes] =>
[published] => 1
[pub_date] => 0
[unpub_date] => 0
[parent] => 3
[isfolder] => 0
[introtext] =>
[richtext] => 1
[template] => 1
[menuindex] => 0
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 1699161918
[editedby] => 0
[editedon] => 0
[deleted] => 0
[deletedon] => 0
[deletedby] => 0
[publishedon] => 1699161918
[publishedby] => 1
[menutitle] =>
[donthit] => 0
[privateweb] => 0
[privatemgr] => 0
[content_dispo] => 0
[hidemenu] => 0
[class_key] => msProduct
[context_key] => web
[content_type] => 1
[uri] =>
[uri_override] => 0
[hide_children_in_tree] => 0
[show_in_tree] => 0
[properties] =>
[article] =>
[price] => 500
[old_price] => 0
[weight] => 0
[image] =>
[thumb] =>
[vendor] => 0
[made_in] =>
[new] => 0
[popular] => 0
[favorite] => 0
[tags] =>
[color] =>
[size] =>
[source] => 2
[vendor.name] =>
[vendor.resource] =>
[vendor.country] =>
[vendor.logo] =>
[vendor.address] =>
[vendor.phone] =>
[vendor.fax] =>
[vendor.email] =>
[vendor.description] =>
[vendor.properties] =>
[vendor.rank] =>
[key] => ms71f884312767d1249c9093a3aad9b168
[count] => 3
[cost] => 1 500
[discount_price] => 0
[discount_cost] => 0
)

[1] => Array
(
[id] => 5
[type] => document
[contentType] => text/html
[pagetitle] => Товар 2
[longtitle] =>
[description] =>
[alias] => товар-1
[alias_visible] => 1
[link_attributes] =>
[published] => 1
[pub_date] => 0
[unpub_date] => 0
[parent] => 3
[isfolder] => 0
[introtext] =>
[richtext] => 1
[template] => 1
[menuindex] => 0
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 1699161930
[editedby] => 1
[editedon] => 1699161941
[deleted] => 0
[deletedon] => 0
[deletedby] => 0
[publishedon] => 1699161900
[publishedby] => 1
[menutitle] =>
[donthit] => 0
[privateweb] => 0
[privatemgr] => 0
[content_dispo] => 0
[hidemenu] => 0
[class_key] => msProduct
[context_key] => web
[content_type] => 1
[uri] =>
[uri_override] => 0
[hide_children_in_tree] => 0
[show_in_tree] => 0
[properties] =>
[article] =>
[price] => 600
[old_price] => 0
[weight] => 0
[image] =>
[thumb] =>
[vendor] => 0
[made_in] =>
[new] => 0
[popular] => 1
[favorite] => 0
[tags] =>
[color] =>
[size] =>
[source] => 2
[vendor.name] =>
[vendor.resource] =>
[vendor.country] =>
[vendor.logo] =>
[vendor.address] =>
[vendor.phone] =>
[vendor.fax] =>
[vendor.email] =>
[vendor.description] =>
[vendor.properties] =>
[vendor.rank] =>
[key] => msb2f01124a10b7f46a6b4e58e999a69bc
[count] => 1
[cost] => 600
[discount_price] => 0
[discount_cost] => 0
)

)

[scriptProperties] => Array
(
[tpl] =>
[includeTVs] =>
[includeThumbs] =>
[toPlaceholder] =>
[showLog] =>
)

)
```

:::

Также для отладки можно использовать [модификатор print][2]. Просто создайте чанк `TestCart` и укажите в нём:

Expand Down
Loading

0 comments on commit 3a1d2fd

Please sign in to comment.