我正在保存customer_address_entity表中的客户地址.一切都好,但我想得到最后一次生成entity_id.有人能帮助我吗?
我有以下代码;
$customAddress = Mage::getModel('customer/address');
$customAddress->setData($_custom_address)
->setCustomerId($customer->getId())
->setIsDefaultBilling('0')
->setIsDefaultShipping('1')
->setSaveInAddressBook('1');
try {
$customAddress->save();
} catch (Exception $ex) {
Mage::log("\n Address save Error:: \n" . $ex->getMessage(), null, $this->log_entry_file);
}
Run Code Online (Sandbox Code Playgroud) 我想更改div内的按钮onclick功能.HTML代码如下所示
<div class="buttons-set" id="payment-buttons-container">
<button type="button" class="button" onclick="payment.save()" id="payment_button"></button>
</div>
Run Code Online (Sandbox Code Playgroud)
我正在使用以下原型将onlick函数payment.save()更改为其他内容.
if(payment_method=='gate') {
var e = $$('div#payment-buttons-container button.button');
e.setAttribute('onclick','return false;'); // not working
} else {
var e = $$('div#payment-buttons-container button.button');
e.setAttribute('onclick','payment.save();'); // not working
}
Run Code Online (Sandbox Code Playgroud)
哪个不起作用并且说"Uncaught TypeError:Object [object HTMLButtonElement]没有方法'setAttribute'"但是当我通过静态获取按钮的id来使用此代码时
if(payment_method=='gate') {
$('payment_button').setAttribute('onclick','return false;');// Works
}
else {
$('payment_button').setAttribute('onclick','payment.save();');// Works
}
Run Code Online (Sandbox Code Playgroud)
其中"payment_button"是我拍摄的按钮的ID.
我创建了Magento扩展.我已经安装并卸载了它.在卸载过程中,我发现,相关的数据库表没有被删除,而从设置core_config_data和core_resource.有人能帮助我吗?
如何从Magento中的控制器调用块功能.
我有波纹管控制器:
法/结帐/控制器/ CartController.php
我想在这个CartController中调用波纹管块功能
法师/结算/块/车/ Shipping.php
我怎样才能做到这一点?
谢谢
如何手动更改Magento管理面板中的订单状态.有没有办法改变订单状态?我在1.7.0.2版本中找不到这个.谁能告诉我怎么做?