magento-1.4

magento add custom input field to customer account form in admin

与世无争的帅哥 提交于 2019-12-04 10:24:59
I am trying to add a custom input field to the account information tab of a customer in admin. i have successfully been able to create a custom attribute in the eav table for my input, but have been unsuccessful in finding how to make my input show up. curious of anyone has any good resources on how to do this? The above link doesn't work anymore. I found a better explanation at http://www.excellencemagentoblog.com/customer-registration-fields-magento1-6 . If you just do the first steps you will only have the added fields in the admin. The fastest way is to create a php file and access it

magento - delete extension?

微笑、不失礼 提交于 2019-12-04 10:17:08
I bought a magento extension and copied the files into the magento directory. Everything worked great. Then I wanted to re-install it. So I deleted all relevant files in app/code/local and i deleted the relevant database tables. When I re-copied the extension files back into the magento directory and tried to test the extension out, i get this error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydb.swam_list' doesn't exist I looked in the database and it seems magento did not re-create the database tables for the extension. How do I re-install this extension? Look in the table

Programmatically send shipping/tracking mail

孤者浪人 提交于 2019-12-04 08:42:47
问题 In Magento 1.4, I am successfully using this code to mark an order as Complete and add a shipping tracking code to it : $order = Mage::getModel('sales/order')->loadByIncrementId($increment_id); if($order->canShip()) { $itemQty = $order->getItemsCollection()->count(); $ship = Mage::getModel('sales/service_order', $order)->prepareShipment($itemQty); $ship = new Mage_Sales_Model_Order_Shipment_Api(); $shipmentId = $ship->create($increment_id); } $shipment_collection = Mage::getResourceModel(

Add Username to Order Comment History

梦想的初衷 提交于 2019-12-04 08:41:28
问题 Is there a simple way to add the username of the person who is making the comment in the admin history to the comment thread on the order? -- edit -- Another way of asking this would be how do I add an additional field to the comment history model so that I can override the appropriate models and templates inserting that data into the data structure. 回答1: If you want to add the username who is currently logged in and making change in order or commenting on order. you need to add an attribute

Detect home page in Magento .phtml that will work with BLOCK_HTML cache enabled

南笙酒味 提交于 2019-12-04 07:26:40
I have tried the following two methods in catalog/navigation/vert_nav.phtml to add or suppress content specific to the home page: if($this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true))): or if( Mage::getSingleton('cms/page')->getIdentifier() == 'home' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' ) : Both work fine, however when BLOCK_HTML cache is turned on, it works at first, then after a while the home page starts displaying content that is intended only for other pages (after an else clause I use lower down). When I turn

Before And After In Local.xml Magento?

喜夏-厌秋 提交于 2019-12-04 07:12:50
I've managed to get to the point where I understand how to move blocks from column to column in my Magento layouts: via specifying a "left" or "right" attribute in the <reference> tag. However, I don't understand how to change the order in which blocks appear. I've noticed that the "before" and "after" attributes of the <block> tag have something to do it with, but I'm not sure how they work. If I want to move a block from the top of its area to anywhere else in our page, what's the proper use and syntax for those attributes? For example, I have a Category page and I have these blocks in it:

Magento payment : additional_information or payment attribute?

有些话、适合烂在心里 提交于 2019-12-04 05:42:19
I'm wondering which is the better way to add some information to a payment in magento (1.4.1.1). Let's say I want to add an information called "payment_duedate" which would be the date the customer has to pay his invoice. Actually, there is a field in the sales_flat_order_payment called "additional_information" which contain serialized data set by the method setAdditionalInformation($arg1,$arg2); available in the 'sales/payment' model. So I could save my date by : $payment->setAdditionalInformation('payment_duedate',$myDate); $payment->save(); But one could also choose to add a payment

How do I add a filter on a product attribute to Magento Advanced Export Profiles?

☆樱花仙子☆ 提交于 2019-12-03 20:59:11
I want to filter my data to csv using the "Manufacturer" field. I tried this, but it didn't work: <action type="catalog/convert_adapter_product" method="load"> <var name="store"><![CDATA[0]]></var> <var name="filter/manufacturer"><![CDATA[898]]></var> </action> <action type="catalog/convert_parser_product" method="unparse"> <var name="store"><![CDATA[0]]></var> <var name="url_field"><![CDATA[0]]></var> </action> <action type="dataflow/convert_mapper_column" method="map"> <var name="map"> <map name="sku"><![CDATA[sku]]></map> <map name="name"><![CDATA[name]]></map> </var> <var name="_only

How To Get Sub Categories in Magento ?`

自闭症网瘾萝莉.ら 提交于 2019-12-03 20:30:23
I am playing with magento's home page where I have created a tab Which Shows all the categories including Root, categories, and Sub Categories (In One Tab). Now I want to Show Only Main Categories( Whose Parent Is Root) in main Tab And under Each Category I want to List Their respective Sub Categories. I wrote The following Code to achieve a part of this, MODEL CLASS public function getsubCategory($parent) { $subcategoryCollection = Mage::getModel('catalog/category') ->getCollection() ->addAttributeToFilter('parent_id', $parent); return $subcategoryCollection; BLOCK CLASS protected function

Magento category ID from product ID

徘徊边缘 提交于 2019-12-03 18:04:15
问题 In magento how to get the category id of each product from its product ID. $items = $request->getAllItems(); $c = count($items); for ($i = 0; $i < $c; $i++) { if ($items[$i]->getProduct() instanceof Mage_Catalog_Model_Product) { if ($items[$i]->getProduct()->getId()) { $this->_dhlAllowed = false; } } } Here $items[$i]->getProduct()->getId() returns product ID. I want its category ID. 回答1: public function getProductCategory() { /* @var $product Mage_Catalog_Model_Product */ $product = Mage: