Current Version of Codefight CMS Available for Download:

« Version 1.7.0 »

NOTE: The code available is same as the code used for newer than this site at the time of release. Check cmsigniter.com for latest demo.

Codefight CMS is based on CodeIgniter - Open source PHP web application framework which is very easy to learn.

It would be nice to hear back some feedback. Also you can contribute with code and helping translating language files in your language.

You can use this CMS in anyway you want. You can modify as you like and use commercially for free.

 

 

Select Language.[TESTING For Next Release.]

English | नेपाली | French | German | Korean

Login | Select Language | Wed, 08 Sep 10 02:10:51 -0600

how to use var_dump and print_r in magento

2009-04-23 04:28:46Damodar Bashyal

 

This one is crazy with magento because sometimes it works and sometimes it just shows blank page. Once it gave me a real hard time. Finally found solution somewhere. I just had to do was add

CODE:

1-->debug()
on the object that i wanted to print as
CODE:

1-$obj->debug(); //e.g. if i have $_cart = Mage::getModel('checkout/cart'); //to use print_r or var_dump, i need to do print_r($_cart->debug());

These are methods available for a product:

CODE:

1-<?php
2-Array
3-(
4- [0] => getResourceCollection
5- [1] => getUrlModel
6- [2] => validate
7- [3] => getName
8- [4] => getPrice
9- [5] => getTypeId
10- [6] => getStatus
11- [7] => getTypeInstance
12- [8] => setTypeInstance
13- [9] => getLinkInstance
14- [10] => getIdBySku
15- [11] => getCategoryId
16- [12] => getCategory
17- [13] => setCategoryIds
18- [14] => getCategoryIds
19- [15] => getCategoryCollection
20- [16] => getWebsiteIds
21- [17] => getStoreIds
22- [18] => getAttributes
23- [19] => canAffectOptions
24- [20] => cleanCache
25- [21] => getPriceModel
26- [22] => getTierPrice
27- [23] => getTierPriceCount
28- [24] => getFormatedTierPrice
29- [25] => getFormatedPrice
30- [26] => getFinalPrice
31- [27] => getCalculatedFinalPrice
32- [28] => getMinimalPrice
33- [29] => getSpecialPrice
34- [30] => getSpecialFromDate
35- [31] => getSpecialToDate
36- [32] => getRelatedProducts
37- [33] => getRelatedProductIds
38- [34] => getRelatedProductCollection
39- [35] => getRelatedLinkCollection
40- [36] => getUpSellProducts
41- [37] => getUpSellProductIds
42- [38] => getUpSellProductCollection
43- [39] => getUpSellLinkCollection
44- [40] => getCrossSellProducts
45- [41] => getCrossSellProductIds
46- [42] => getCrossSellProductCollection
47- [43] => getCrossSellLinkCollection
48- [44] => getGroupedLinkCollection
49- [45] => getMediaAttributes
50- [46] => getMediaGalleryImages
51- [47] => addImageToMediaGallery
52- [48] => getMediaConfig
53- [49] => duplicate
54- [50] => isSuperGroup
55- [51] => isSuperConfig
56- [52] => isGrouped
57- [53] => isConfigurable
58- [54] => isSuper
59- [55] => getVisibleInCatalogStatuses
60- [56] => isVisibleInCatalog
61- [57] => getVisibleInSiteVisibilities
62- [58] => isVisibleInSiteVisibility
63- [59] => isSalable
64- [60] => isVirtual
65- [61] => isSaleable
66- [62] => isInStock
67- [63] => getAttributeText
68- [64] => getCustomDesignDate
69- [65] => getProductUrl
70- [66] => formatUrlKey
71- [67] => getUrlPath
72- [68] => addAttributeUpdate
73- [69] => toArray
74- [70] => fromArray
75- [71] => loadParentProductIds
76- [72] => delete
77- [73] => getRequestPath
78- [74] => getGiftMessageAvailable
79- [75] => getRatingSummary
80- [76] => isComposite
81- [77] => getSku
82- [78] => getWeight
83- [79] => getOptionInstance
84- [80] => getProductOptionsCollection
85- [81] => addOption
86- [82] => getOptionById
87- [83] => getOptions
88- [84] => getIsVirtual
89- [85] => addCustomOption
90- [86] => setCustomOptions
91- [87] => getCustomOptions
92- [88] => getCustomOption
93- [89] => hasCustomOptions
94- [90] => canBeShowInCategory
95- [91] => getAvailableInCategories
96- [92] => getDefaultAttributeSetId
97- [93] => getImageUrl
98- [94] => getSmallImageUrl
99- [95] => getThumbnailUrl
100- [96] => getReservedAttributes
101- [97] => isReservedAttribute
102- [98] => setOrigData
103- [99] => loadByAttribute
104- [100] => getStore
105- [101] => getWebsiteStoreIds
106- [102] => setAttributeDefaultValue
107- [103] => getAttributeDefaultValue
108- [104] => getIdFieldName
109- [105] => getId
110- [106] => setId
111- [107] => getResourceName
112- [108] => getCollection
113- [109] => load
114- [110] => afterLoad
115- [111] => save
116- [112] => getResource
117- [113] => getEntityId
118- [114] => __construct
119- [115] => isDeleted
120- [116] => setIdFieldName
121- [117] => addData
122- [118] => setData
123- [119] => unsetData
124- [120] => getData
125- [121] => _getData
126- [122] => setDataUsingMethod
127- [123] => getDataUsingMethod
128- [124] => getDataSetDefault
129- [125] => hasData
130- [126] => __toArray
131- [127] => _prepareArray
132- [128] => __toXml
133- [129] => toXml
134- [130] => __toJson
135- [131] => toJson
136- [132] => __toString
137- [133] => toString
138- [134] => __call
139- [135] => __get
140- [136] => __set
141- [137] => isEmpty
142- [138] => _underscore
143- [139] => _camelize
144- [140] => serialize
145- [141] => getOrigData
146- [142] => dataHasChangedFor
147- [143] => isDirty
148- [144] => flagDirty
149- [145] => debug
150- [146] => offsetSet
151- [147] => offsetExists
152- [148] => offsetUnset
153- [149] => offsetGet
154- [150] => offsetUnset
155- [151] => offsetSet
156- [152] => offsetGet
157- [153] => offsetExists
158-)
159-?>

I need to check this link when i have time later: http://activecodeline.com/utilize-firebug-and-firephp-to-speed-up-magento-development/


Bookmark and Share

Thanks, most useful!!!!!

04/11/09 04:05:29|Kat

 

 





Javascript must be enabled to post comments!