草庐IT

magento-connect

全部标签

php - Magento - 扩展开发,处理卸载

我真的是magento扩展开发的新手。我向其他人学习并为magento1.7.0扩展创建了一个简单的演示。它运行良好,在其安装脚本中,我向“catalog_product”添加了一个属性,它也运行良好。现在我想知道,当这个扩展从系统中删除,或者从系统中卸载时,我该如何删除这个属性,如何编写代码来处理卸载?谢谢。 最佳答案 嗯...你不能。Magento有一些未完成的任务。有一种方法可能是为这个Mage_Core_Model_Resource_Setup::_uninstallResourceDb($version)而设计的,但它并没

php - 如何从 Observer 获取 Magento Order 数据

好的,我已经在网上搜索了所有内容,但没有任何效果。结果非常不一致。让我先告诉你我在这里有什么。最后会创建导出文件,但无法获取订单数据和对象。classPackagename_Modulename_Model_Observer{publicfunctionexportFeed(Varien_Event_Observer$observer){$order=$observer->getEvent()->getOrder();$ordered_items=$order->getAllItems();并在config.xml中Packagename_Modulename_Model_Observ

php - Magento CE18 : Cannot save new password nor place order using credit card

每当我尝试更改密码或在我们的站点下测试订单时,我一直收到“未从基名‘NotEmpty’找到验证类”错误。当我检查error_log时,我看到以下错误,但我不知道这意味着什么......PHPFatalerror:CalltoundefinedmethodMage_Catalog_Model_Resource_Category_Flat_Collection::getAllIdsSql()in/public_html/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.phponline295有人知道吗?

php - Magento FedEx express 错误 :Commodity country of manufacture is required

生成订单包时出现以下错误"Magentofedexerror:Commoditycountryofmanufactureisrequired"虽然我在General>DefaultCountry中添加了国家/地区如何解决该错误? 最佳答案 magento产品描述为每个产品添加制造国家 关于php-MagentoFedExexpress错误:Commoditycountryofmanufactureisrequired,我们在StackOverflow上找到一个类似的问题:

php - Magento translate.csv 文件未加载

我在Magento1.9.1中从头开始创建了一个新的包/主题/皮肤。主题和皮肤加载正常。我尝试添加翻译,但无法加载它们。所有缓存设置均已禁用。我在此处添加了CSV文件:/app/design/frontend/{my_package}/{my_theme}/locale/en_US/translate.csv翻译.csv:"testing123","TranslationWorked"标题.phtml__('testing123')?>我添加了{my_theme},对我来说,它被命名为对管理员的“响应式”:结果是标题显示“testing123”而不是翻译后的“TranslationWo

php - 通过 sqlsrv_connect() 连接到 mssql 数据库 - PHP

我正在尝试使用sqlsrv_connect()函数使用PHP连接到2005Microsoftsql数据库。唉,函数返回false,我不确定为什么。$myDB,"UID"=>$myUser,"PWD"=>$myPass);$conn=sqlsrv_connect($myServer,$connectionInfo);//returnsfalseif($conn===false){echo"failedconnection";}$sql="SELECTnameFROMusersWHEREname='admin'";$stmt=sqlsrv_query($conn,$sql);if(sqls

PHP Mailer 错误 : Message could not be sent. Mailer Error: SMTP connect() failed

这是我的代码:require'phpmailertesting/PHPMailerAutoload.php';$mail=newPHPMailer;//$mail->SMTPDebug=3;//Enableverbosedebugoutput$mail->isSMTP();//SetmailertouseSMTP$mail->Host='send.one.com';//SpecifymainandbackupSMTPservers$mail->SMTPAuth=true;//EnableSMTPauthentication$mail->Username='myemailhidden';

php - Windows 7 上的 Netbeans Xdebug "waiting for connection"WAMP

针对这个常见的Xdebug错误,我阅读了很多解决方案,但似乎并没有解决我的问题:netbeansshows“WaitingForConnection(netbeans-xdebug)”NetbeansnotconnectingwithxdebugonWamp:“showingwaitingforconnection”在phpinfo()中Xdebug似乎配置正确:下面是我的php.ini:zend_extension="c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll";[xdebug]xde

php - Magento 1.14 中的 Paypal GetExpressCheckoutDetails 响应中缺少 SHIPTONAME 数组元素

我们遇到了一个不一致但频繁(大约每天一个)的问题,即GetExpressCheckoutDetails调用的响应缺少SHIPTONAME和PAYMENTREQUEST_0_SHIPTONAME数组元素。所有其他SHIP...和PAYMENTREQUEST_0_SHIP...值都存在。以下是示例响应的片段:[FIRSTNAME]=>Redacted[LASTNAME]=>Redacted[COUNTRYCODE]=>AU[SHIPTOSTREET]=>29RedactedRoad[SHIPTOCITY]=>RedactedTown[SHIPTOSTATE]=>NewSouthWales[

php - 即使 PayPal 付款失败,Magento 订单状态也会更新为 "Processing"

我对Magento1.9和PayPal支付方式有疑问。当客户使用PayPal付款并进行付款审核时,订单状态将设置为正确的“付款审核”。但是,问题是,在付款实际失败的情况下(即客户账户中的资金不足),Magento会将订单状态更新为“处理中”并且客户最终会获得免费商品。我需要做的是,当调用此类“失败”IPN时,我需要为该特定订单设置“已关闭”状态。我花了4个多小时来找到解决方案,但没有找到任何合适的解决方案。如果有人对此有任何修复,请与我分享。PayPalIPN响应变量:[payer_email]=>xxx@xxx.com[payer_id]=>xxxxxxxxxxxx[payer_st