Форуми / Cotonti / Support / Ajax part question

tensh
#1 30.04.2009 18:22
I must say that thinking up plugins for Cotonti is not fun. It's like being blind without any documentation.

Now I'm trying to create an ajax part according to Trustmaster's tutorial. I want this to be a part of shopsystem plugin. I named it shopsystem.ajax.php. Here's the code:

<?PHP
/* ====================
Cotonti - Website engine
[BEGIN_SED]
File=plugins/shopsystem/shopsystem.ajax.php
Version=3.5
Updated=05.03.2009
Type=standalone
Author=timi11 - cotonti.de
Description=Shopsystem for cotonti
[END_SED]

[BEGIN_SED_EXTPLUGIN]
Code=shopsystem
Part=ajax
File=shopsystem
Hooks=ajax
Tags=
Minlevel=0
Order=10
[END_SED_EXTPLUGIN]

==================== */
if (!defined('SED_CODE') || !defined('SED_PLUG')) { die('Wrong URL.'); }

$plugin_body = "This is something.<br />";
$plugin_body .= "This is the second line...<br />";
$plugin_body .= "And this is the third.";

?>

As you can see, it's freaking simple test, based also on neocrome's tutorial. I want to view it by the url:
www.mysite.com/plug.php?r=shopsystem

My question is: why am I getting blank page? Shouldn't it load properly without header nad footer?
Trustmaster
#2 30.04.2009 21:11
Use echo directly, $plugin_body is useless in AJAX parts.
May the Source be with you!
tensh
#3 30.04.2009 21:49
Thanks, I'll check that out.