forked from cxbig/my-dash-cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagento.rb
75 lines (62 loc) · 1.12 KB
/
magento.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
cheatsheet do
title 'Magento'
docset_file_name 'magento'
keyword 'mage'
introduction <<-'NOTE'
This is collection of Magento, list all shortcuts
NOTE
category do
id 'MySQL snapshot'
entry do
name '### Base URL'
notes <<-'NOTE'
```
UPDATE `core_config_data`
SET `value` = '{{base_url}}'
WHERE `scope` = 'default'
AND `path` in ('web/unsecure/base_url', 'web/secure/base_url');
```
NOTE
end
end
category do
id 'Session'
entry do
name '### Get quote session'
notes <<-'NOTE'
#### Front-end
```
Mage::getSingleton('checkout/session')->getQuote();
```
#### Admin
```
Mage::getSingleton('adminhtml/session_quote')->getQuote();
```
NOTE
end
end
category do
id 'System'
entry do
name '### Config validation'
notes <<-'NOTE'
#### Validation
For each field, you can add a Validation definition
```
<validate>...</validate>
```
NOTE
end
entry do
name '### Config validation list'
notes <<-'NOTE'
#### Validation list
```
validate-number
validate-zero-or-greater
```
_to be continue..._
NOTE
end
end
end