所需逻辑
我希望我的模板每次用户点击时都会发送一个事件 打开和关闭按钮。 我的view.phtml文件看起来像这样...
/*Some Html*/
<?php
/*=== Variables ===========*/
$customer = Mage::getModel('customer/session')->getCustomer();
/*$groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();*/
$groupId = $customer->getGroupId();
$group = Mage::getModel('customer/group')->load($groupId);
$groupCode = $group->getCode();
$OnArray = array(
"value" => "on",
"customer" => $customer
);
$OffArray = array(
"value" => "off",
"customer" => $customer
);
?>
/* More HTML * /
<form action="">
<input type="radio" name="auto-refill" value="On" onClick = "<?php Mage: dispatchEvent('autoFill_Update', $OnArray ?>" />On<br>
<input type="radio" name="auto-refill" value="Off" onClick = "<?php Mage: dispatchEvent('autoFill_Update', $OffArray ?>" />Off
</form>
问题
我是否正确实现了所需的逻辑?
由于php脚本是分开的,我的html代码确实丢失了 当我尝试在onClick中传递它们时引用ON和OFF数组?
真诚感谢任何指导