magento-1.4

Magento - Adding a new column to sales_flat_quote_item and sales_flat_order_item

人盡茶涼 提交于 2019-12-17 17:46:22
问题 I'm working with Magento version 1.4.1.1, and I want to save a value in sales_flat_quote_item table (and pass it to sales_flat_order_item ). I've found this tutorial, but I'm not sure if it's still relevant (to Magento version 1.4.1.1) since it talks about a table called sales_order , which I believe is now sales_flat_order and looks a bit different. Should this method still work? If so - Can I use it for sales_flat_quote_item and sales_flat_order_item and what entity_type_id should I put in

Magento backend - make the price field readonly

≯℡__Kan透↙ 提交于 2019-12-14 03:44:30
问题 I want to make the price text field in magento backend readonly because I use another custom attributes to fix prices. How can I do that ? Thanks a lot. 回答1: Since this would make attributes very silly, I don't believe that there is any simple mechanism by which to do this. One easy hack that you could use for this would be to add a JS file to that page which disables the price field specifically. Use the XML layout files for the default adminhtml package to add that JS file. Hope that helps!

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

我与影子孤独终老i 提交于 2019-12-13 12:08:13
问题 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

Magento media url - get rid of 403 Forbidden

一个人想着一个人 提交于 2019-12-13 02:56:53
问题 on my Magento site (not the real url ;) ), I have http://magento.local.com/media/ returning as a 403 Forbidden. This seems to be standard for all Magento installs, but I want to change this, and not have a 403 returned for requests to /media/. How can I do this? EDIT: (adding further information and reason for it) I want /media/ to not be a 403, so that I can redirect requests to /media/ to /media/index.html. I thought this redirect would be easy once the 403 was resolved, but unfortunately

Show recent_viewed products on product Page

℡╲_俬逩灬. 提交于 2019-12-12 09:04:59
问题 The Current default functionality of magento is that it shows the recently viewed products on right side of category page. Now I would like to display the same content on at the bottom of product page. the phtml file used is named at location as frontend/base/default/template/reports/product_viewed.phtml . Is there any simple way to do it ? 回答1: In your theme you will modify the catalog.xml file (/app/design/frontend/{your theme}/default/layout/catalog.xml). Find the following section and add

How to get parent product id in magento?

一笑奈何 提交于 2019-12-12 07:31:41
问题 I know that in Magento 1.4.2.0 one gets parent id's like so list( $parentId ) = Mage::getModel('catalog/product_type_configurable') ->getParentIdsByChild( $product->getId() ); My question is: if I don't know what the parent is, how do I know to use the 'catalog/product_type_ configurable ' vs 'catalog/product_type_ grouped ' model to get the id? 回答1: You may use: $product->getTypeInstance(); Which will return the type object of your product Then you can perform your: ->getParentIdsByChild()

Magento - re-importing of products

天大地大妈咪最大 提交于 2019-12-12 05:58:58
问题 I have a script that pulls in data from a 3rd party file. My import simply parses and inserts rows, which is working fine. The problem comes with images. When the import script runs, it first deletes all the current items and then the import begins, inserting all products and images into the gallery. On the first import, everything is fine, the images go in and I see them on the frontend no problem. The problem comes with everytime I then re-import these products, it doesn't seem to delete

Magento 1.4 - PayPal Payments Standard sometimes won't charge shipping

自作多情 提交于 2019-12-12 05:49:18
问题 I have a UK based website running Magento 1.4.0.1 and recently added PayPal Payments Standard as a payment option. It works as expected for the most part, but recently I've had 2 overseas orders come through that haven't been charged shipping (one to Germany and one to Sweden). When viewing the orders in the backend, Magento seems to think that shipping was charged, but when PayPal is checked, it confirms that no shipping was charged. Obviously, the figure charged in PayPal is the Magento

magento upgrad from 1.4.0.1 to 1.4.2.0

…衆ロ難τιáo~ 提交于 2019-12-12 04:46:32
问题 I am getting this error: Integrity constraint violation: 1062 Duplicate entry '7' for key 'PRIMARY' when upgrading magento. Any idea how to fix it? 回答1: Here is complete solution to upgrade from any version because I tried step by step version upgrade of mageto but I faced the same problems. Magento upgrade takes too long and never completes 来源: https://stackoverflow.com/questions/13069119/magento-upgrad-from-1-4-0-1-to-1-4-2-0

Magento ordering collections after adding items

雨燕双飞 提交于 2019-12-12 03:14:44
问题 i have this method on which i retrieve first a Varien_Data_Collection and then I add items one by one from another Varien_Data_Collection by addItem(): protected function _prepareCollection(){ $productId = $this->getRequest()->getParam('id'); $websiteId = 0; if ($store = $this->getRequest()->getParam('store')) { $websiteId = Mage::app()->getStore($store)->getWebsiteId(); $collection = Mage::getModel('productalert/stock') ->getCustomerCollection() ->join($productId, $websiteId); foreach (