magento-1.9

Magento 1.9 remove tax on checkout when user enter VAT

眉间皱痕 提交于 2019-12-11 06:19:00
问题 I'm trying to make magento modification when user enter vat number on checkout remove tax from order. I found a code on stackoverflow which support on magento older version but it not work with new version 1.9 , I made few modifications for work the condition and return 0,even it return 0 checkout still shows tax. here is my code which is on file /app/code/core/Mage/Tax/Model/Calculation.php line number 268 public function getRate($request) { if (!$request->getCountryId() || !$request-

Cannot enable PayPal API in Magento

非 Y 不嫁゛ 提交于 2019-12-11 05:58:39
问题 In Magento 1.9.2.2 I'm trying to enable PayPal payments under System > Config > Payment Methods. I've entered the correct PayPal API credentials and chosen API Signature as the authentication method. We are not using a proxy server. When I save the config the 'Enable this solution' dropdown remains greyed out and the solution cannot be enabled. Can anyone help? 回答1: Have you followed the below? Taken from PayPal site. OpenStep 1: Complete the Required Settings: On the Admin menu, select

Json form data coming improper

那年仲夏 提交于 2019-12-11 04:54:52
问题 I have created rest api for getting categories and sub-categories using recursion technique. Here is my code:- public function getNodeChildrenData(Varien_Data_Tree_Node $node) { $data = array( 'title' => $node->getData('name'), 'url' => $node->getData('url_key'), ); foreach ($node->getChildren() as $childNode) { if (!array_key_exists('children', $data)) { $data['children'] = array(); } $data['children'][$childNode->getData('entity_id')] = $this->getNodeChildrenData($childNode); } return $data

Catalog Price Rules “Apply Rules” programmatically

偶尔善良 提交于 2019-12-11 02:55:57
问题 I have created one Catalog Price Rule Programmatically it works fine. so my issue is, I need to do login with admin and need click button of "Apply Rules" other wise discount is not apply in magento store, so i need "Apply Rules" programmatically and i have no idea about it how to do. Any help or suggestion will be appreciated. 回答1: You can Apply Rules using the below code with Newly created Catalogrule ID $rule = Mage::getModel('catalogrule/rule')->load($ruleId); Mage::getResourceModel(

“Violation readystatechange handler took 760ms” after update to latest Chrome

China☆狼群 提交于 2019-12-10 12:49:05
问题 After updating to the latest Google Chrome release we are getting errors when we open colorbox on our website: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. [Violation] 'readystatechange' handler took 760ms [Violation] Forced reflow while executing JavaScript took 51ms [Violation] Forced reflow while executing JavaScript took 43ms [Violation] Forced reflow while

Adding products to cart by url gives 404 at first access and works on 2'nd

点点圈 提交于 2019-12-10 12:14:45
问题 I have followed this example magento: URL querystring for adding product and applying discount coupon to cart to add products to cart and apply discounts at the same time using 1 request. It works fine except for the first request (ex: in incognito mode) as it will give a 404 not found and then if I refresh the URL again it will work just fine. The URL looks like this https://www.website.com/checkout/cart/add/?product=10&qty=1&return_url=https://www.website.com/index.php/checkout/cart

How to get order details dynamically?

馋奶兔 提交于 2019-12-08 09:30:51
问题 I need to retrieve an order from Magento by its id. How do I load a specific order by id? so far i have tried this: <?php $orderNumber = 145000013; $order = Mage::getModel('sales/order')->loadByIncrementId($orderNumber); // get order item collection $orderItems = $order->getItemsCollection(); foreach ($orderItems as $item){ $product_id = $item->product_id; $product_sku = $item->sku; $product_name = $item->getName(); $_product = Mage::getModel('catalog/product')->load($product_id); $cats = $

How to use magento api with iOS app

倾然丶 夕夏残阳落幕 提交于 2019-12-08 07:07:29
问题 I want to use Magento custom API with iOS app. What option we have to develop such a application.Magento SOAP or REST or anything else is useful in this case. Please suggest me best way. Thanks 回答1: You have to setup API roles and users in Magento. After that you can use these credentials to fetch and update data in Magento. Check this http://www.codepetals.com/setup-your-magento-store-for-integration-with-mobile-app-or-an-erp/ 来源: https://stackoverflow.com/questions/37435082/how-to-use

ERROR: “/app/etc/” must exist for proper tool work magento 1.9

删除回忆录丶 提交于 2019-12-07 19:06:51
问题 I am trying to install the newly release security patch for magento 1.9. I am working on window system. and I am getting the following error. D:\xampp\htdocs\magento>sh PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh ERROR: "/app/etc/" must exist for proper tool work. I am running command by CMD and SH is working fine too I tried with Git too. but getting same error Not working on Linux too can anyone tell me what is the exact issue and how it could be fixed. Thanks 回答1: Able to make it

Custom layouts for catalog_category_view on Magento

吃可爱长大的小学妹 提交于 2019-12-07 11:41:42
问题 I need to be able to use different layouts for different categories, selected on the Custom Design tab on the category and Page Layout field. I'm using Magento 1.9.1.0. In my config.xml I have: <global> <page> <layouts> <module_home module="page" translate="label"> <label>Module Home</label> <template>page/base.phtml</template> <layout_handle>module_home</layout_handle> </module_home> <module_categories module="page" translate="label"> <label>Module Categories</label> <template>page/base