Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

PHP in CMS Module Help
 
collinssolutions
Sr. Member
 
Total Posts:  79
Joined:  2008-07-09
USA Arkansas
 

Ok i went though the tutorial in a thread to create a custom block and use that in CMS to run PHP but its not working. I have some code that gets auction information from the eBay API. It works great. I also have the code set up to add that completed auction to cart. But i need a page for the eBay customer to enter in the auction number and some ID verification. I need to have PHP on a page. I understand that CMS blocks PHP for security purposes but i cant find a good tutorial to create my own custom class or whatever. I could use some suggestions on how to integrate this into magento.

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

mmmm this brings up the “problem” of form submission in Magento. Is it handled the same way as Zend? Or is there a slightly different function name to retrieve get/post variables?

In any case, can you give more details on how you are accomplishing this? For instance, are you using Update XML in the CMS page? Are you editing directly into the cms.xml? What methods/functions are you using (following the tutorial to create a custom block in the CMS)?

edit:I just read your thread better to and I have answers inappropriately I think...let me find you a link to a thread that will help…

 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

Check out Moshe’s post, 2nd page of this thread:

http://www.magentocommerce.com/boards/viewthread/3698/P15/

Note that this method effectively skips a .phtml file template because it uses the “_toHtml()” function - You can still use a .phtml template file with a block by naming a template and avoiding using the _toHtml() function (you might run into some problems of custom parameters if you do all your code within the __constructor function as well!)

 
Magento Community Magento Community
Magento Community
Magento Community
 
collinssolutions
Sr. Member
 
Total Posts:  79
Joined:  2008-07-09
USA Arkansas
 

ya i just tried all that and it dosent work. not only that but i refreshed my cache and my whole site is down

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 4: parser error : StartTag: invalid element name in /chroot/home/vgration/vgration.com/html/lib/Varien/Simplexml/Config.php on line 494

#0 [internal function]: mageCoreErrorHandler(2, ‘simplexml_load_...’, ‘/chroot/home/vg...’, 494, Array)
#1 /chroot/home/vgration/vgration.com/html/lib/Varien/Simplexml/Config.php(494): simplexml_load_string(’loadString(’loadFile(’/chroot/home/vg...’)
#4 /chroot/home/vgration/vgration.com/html/app/code/core/Mage/Core/Model/Config.php(165): Mage_Core_Model_Config->_loadDeclaredModules(Object(Mage_Core_Model_Config_Base))
#5 /chroot/home/vgration/vgration.com/html/app/code/core/Mage/Core/Model/App.php(230): Mage_Core_Model_Config->init(Array)
#6 /chroot/home/vgration/vgration.com/html/app/Mage.php(397): Mage_Core_Model_App->init(’’, ‘store’, Array)
#7 /chroot/home/vgration/vgration.com/html/app/Mage.php(416): Mage::app(’’, ‘store’, Array)
#8 /chroot/home/vgration/vgration.com/html/index.php(46): Mage::run()
#9 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
collinssolutions
Sr. Member
 
Total Posts:  79
Joined:  2008-07-09
USA Arkansas
 

i got the above to go away when i deleted my files i made following his tutorial

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top