magento-1.7

Get Billing Addresses in dropdown in Magento

痴心易碎 提交于 2019-12-13 03:59:33
问题 I am trying to get the dropdown list for billing addresses in Magento, I can see the following block of code for shipping, but essentially want the billing or am I doing something wrong? $this->getAddressesHtmlSelect('shipping'); I have tried changing this to 'billing' with no joy 回答1: You can get billing address as dropdown by this code echo Mage_Checkout_Block_Onepage_Billing::getAddressesHtmlSelect('billing'); Refer app\design\frontend\base\default\template\persistent\checkout\onepage

Display associated product price in custom phtml file

流过昼夜 提交于 2019-12-13 02:58:59
问题 I have a custom phtml file loaded via local.xml file. In this file I am displaying few products.Some of the products displaying are grouped products. SO I want to show the least tier price of these product.How can I get the least tier price? 来源: https://stackoverflow.com/questions/34018962/display-associated-product-price-in-custom-phtml-file

How to set external URL link to Magento admin menu

[亡魂溺海] 提交于 2019-12-13 02:21:46
问题 I am working on a module where I have created one menu in Magento admin using adminhtml.xml . Now I want to link one of the menu to an external URL and set target="blank" . But I'm not sure how to do it in adminhtml.xml . Here is my code. <?xml version="1.0"?> <config> <menu> <system> <children> <convert translate="title"> <children> <importmagmi translate="title" module="importexport"> <title>MagMi Importer</title> <action><url helper="https://externalurl.com"/></action> <sort_order>100<

Creating a bundled product with Magento

删除回忆录丶 提交于 2019-12-13 00:54:14
问题 I've been following along with this example: Magento programmaticaly create bundle Product and the code is working when I create a new product, however, I can't get it to work when I load a product either bundled or simple. [EDIT] I can load a bundled product that I created programmatically through the code below and add products to the bundle. A bundled product I created through the GUI I cannot add products too. Any idea how I can load a product up then bundle it with another a product?

Change the Dashboard Graph in version 1.7/1.12 of Magento

爱⌒轻易说出口 提交于 2019-12-13 00:39:36
问题 In previous versions of Magento (1.6 and before for CE, 1.11 and before for EE) the graph on the admin Dashboard would reflect the count of total orders taken. Since 1.7/1.12 this has now been changed to reflect orders that have been invoiced. We use custom statuses and like having the Dashboard graph as a quick heart beat type report on sales. However, none of our orders ever reach an invoiced status because of how we handle back end order processing (not through Magento) How can I change

Magento redirect from adminthtml page to a frontend action

半城伤御伤魂 提交于 2019-12-12 20:23:08
问题 Following this post I've finally managed to capture an event by extending the Magento_Adminhtml_Controller_Action and carry out some actions before it. But now I'm trying to improve it so I can capture another event triggered on the admin panel and from there pass an array through the request variable to another event on the frontend. I've these SO questions/answers, here and here but no way I can achieve what I need. I've tested the observer code using die() to be sure that the execution

Magento. How to add simple product in cart programmatically with custom options

喜夏-厌秋 提交于 2019-12-12 17:01:54
问题 I am trying to add my simple product with custom options in cart. $post = $this->getRequest()->getPost(); $_product = Mage::getModel('catalog/product')->load(8); $QuoteId= Mage::getModel('checkout/cart_api')->create('default'); $storeId = Mage::app()->getStore()->getId(); $arrProducts = array( array( "product_id" => 8, "qty" => 1, "options" => array( '1' => array( 'sku' => 'cheese' ) ) ) ); $cart = Mage::getSingleton('checkout/cart'); $cart->addProduct($_product, $arrProducts); $cart->save();

Get a product's parent category even if it is accessed directly

霸气de小男生 提交于 2019-12-12 16:42:49
问题 I have a custom model/block that gets the current product's parent category: class Namespace_Module_Model_Product extends Mage_Catalog_Model_Product { public function someFunction() { $category = $this->getCategory(); ... } } This custom block is used on a product's page. This works perfectly if the product is accessed via its parent category, e.g.: domain.com/some-category/my-product.html . However, if the product is accessed directly (for example through the search) and the URL is like

Change charset for CSV Export file

谁说我不能喝 提交于 2019-12-12 11:06:17
问题 I'm using magento 1.7.0 in Spanish language. When export the CSV file form sales order.The Spanish character are changed. I have found the reason for that. During the export to csv the charset is set to western europe . So now i need to change that to UTF-8 . How to change that. 回答1: Check default charset on your server (PHP, apache/nginx). If there everything looks ok, add <charset>utf8</charset> to database section in app/etc/local.xml , then default_section should looks like: <default

Customize the validation error messages of validation.js in magento

点点圈 提交于 2019-12-12 10:16:57
问题 In my magento application the checkout page , will displays error message using validation.js file. when i click to continue in the new billing address without entereing some value it displays error message as This is required field .. I want to change this message as its corresponding field name . Instead of that error message i need to display as First name is a required field .. How can i do this ? EDIT this is the input box which is located in customer/widget/name.phtml as: <input type=