magento-1.9

How to connect multiple external databases in Magento? [closed]

会有一股神秘感。 提交于 2019-11-30 04:09:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I need to connect to some external databases from Magento. I found one tutorial to Create an external database connection in Magento. This tutorial was helpful and it worked for connecting to one external database. But, I have to connect more than one external databases. How can I connect to more than one

Override Magento Contacts Controller

五迷三道 提交于 2019-11-29 16:23:35
I'm trying to override Mage/Contacts/IndexController.php I created a folder in local and created Mynamespace/CustomContacts/controllers/IndexController.php <?php require_once 'Mage/Contacts/controllers/IndexController.php'; class Mynamespace_CustomContacts_IndexController extends Mage_Contacts_IndexController { protected function indexAction () { die; } } I also put this code in Mynamespace/CustomContacts/etc/config.xml <config> <frontend> <routers> <contacts> <args> <modules> <Mynamespace_CustomContacts before="Mage_Contacts">Mynamespace_CustomContacts</Mynamespace_CustomContacts> </modules>

Please enter a valid URL. Protocol is required (http://, https:// or ftp://) in Magento 1.9.2 installing?

ε祈祈猫儿з 提交于 2019-11-28 20:38:36
问题 Please enter a valid URL. Protocol is required (http://, https:// or ftp://) in Magento 1.9.2 installing? While installing Magento, I am facing error for web validation in Magento 1.9.2 回答1: Resolve this issue by the following methods (from good to worse): 1) Inspect the url field and delete the class 'validate-url' to stop validation from the field and proceed the process. have a good Luck guys. 2) just mark the "Skip Base URL Validation Before the Next Step" checkbox. 3) use 127.0.0.1

Magento addFieldToFilter: Two fields, match as OR, not AND

孤人 提交于 2019-11-27 17:20:24
I've been stuck on this for the last few hours. I got it working by hacking a few lines in /lib/Varien/Data/Collection/Db.php , but I'd rather use the proper solution and leave my core untouched. All I need to do is get a collection and filter it by two or more fields. Say, customer_firstname and remote_ip . Here's my (disfunctional without hacking Db.php ) code: $collection = Mage::getModel('sales/order')->getCollection()-> addAttributeToSelect("*")-> addFieldToFilter(array(array('remote_ip', array('eq'=>'127.0.0.1')), array('customer_firstname', array('eq'=>'gabe'))), array('eq'=>array(1,2,3

Auth 1.0 oauth_signature creation Android for magento API

做~自己de王妃 提交于 2019-11-27 05:31:27
I call the Magento API with the following Autherization as header, auth = "OAuth oauth_consumer_key=**********************,oauth_consumer_secret=****************,oauth_token=************,oauth_token_secret=**************,oauth_signature_method=HMAC-SHA1,oauth_timestamp=" + ConstantFunctions.GetTimeStamp() + ",oauth_nonce=" + ConstantFunctions.GetNonce() + ",oauth_signature=*******************) ; While I call the API, Getting error oauth_problem=signature_invalid .All other parameters validate successfully but got an error in the signature, I try the following code to generate the signature,

Magento tax rounding issue

ぐ巨炮叔叔 提交于 2019-11-27 02:09:56
I got strange rounding issue for VAT in Magento. My product set up is * product price incl 20% VAT is 183.59 I added 30 items into basket and it would cost 30 * 183.59 = 5507.70. I can see this value in basket/checkout so that's fine. If I have just 1 item in basket it's ok. Also the final VAT would be 5507.70 * 20 / 120 = 917.95, but I'm getting 918.00 Do you have any idea how to fix this or where would I take a look? Thanks in advance. In the end I found the solution. I changed System > VAT > Tax Calculation Method Based On from Unit price to Row Total and it works, more details here The

Magento addFieldToFilter: Two fields, match as OR, not AND

醉酒当歌 提交于 2019-11-26 22:32:39
问题 I've been stuck on this for the last few hours. I got it working by hacking a few lines in /lib/Varien/Data/Collection/Db.php , but I'd rather use the proper solution and leave my core untouched. All I need to do is get a collection and filter it by two or more fields. Say, customer_firstname and remote_ip . Here's my (disfunctional without hacking Db.php ) code: $collection = Mage::getModel('sales/order')->getCollection()-> addAttributeToSelect("*")-> addFieldToFilter(array(array('remote_ip'

Magento tax rounding issue

余生长醉 提交于 2019-11-26 22:14:04
问题 I got strange rounding issue for VAT in Magento. My product set up is * product price incl 20% VAT is 183.59 I added 30 items into basket and it would cost 30 * 183.59 = 5507.70. I can see this value in basket/checkout so that's fine. If I have just 1 item in basket it's ok. Also the final VAT would be 5507.70 * 20 / 120 = 917.95, but I'm getting 918.00 Do you have any idea how to fix this or where would I take a look? Thanks in advance. 回答1: In the end I found the solution. I changed System

In magento 1.9.0.0 how can I Enable template path Hint?

心已入冬 提交于 2019-11-26 20:24:15
问题 I am trying to turn on template path hint in magento 1.9.0.0 but it's not working. But in magento 1.8.0.0 it's fully working. How can I turn it on in magento 1.9? 回答1: I see that you have selected store view, Main Website. Please select website view e.g. English and enable template path. 回答2: I haven't installed any language (default was English). For me it works (for version 1.9.2) when I choose "Current Configuration Scope:" -> "Default Store View". Check a screenshot below: 回答3: To enable

How do I create a simple &#39;Hello World&#39; module in Magento?

大兔子大兔子 提交于 2019-11-26 00:34:41
问题 How can the following be accomplished in Magento? Display a \"Hello World\" message using a controller/view/model approach. So, if I went to http://example.com/myController it would show the string \'Hello World\'. Being able to show this string within the template of my website (for example, the header, footer, etc.) will be a bonus. How do I add a method to this controller (or a new controller if necessary), which interacts with a model, and performs the query Select * FROM articles where