magento-1.4

Magento - Programmatically Disable Automatic Indexing

杀马特。学长 韩版系。学妹 提交于 2019-11-30 14:11:45
问题 In Magento 1.9 Enterprise (which is essentially the 1.4 Community Edition), what is the correct way to disable the index programmatically so that it wont reindex after every product update? We have a complex product import procedure, so we can't use the built-in catalog import. 回答1: Setting the indexer to "manual" mode will prevent it from automatically indexing on save/edit/delete. In MAGE_ROOT/shell you can find a script called indexer.php that, between others allows you to enable/disable

Images in Magento widgets

别说谁变了你拦得住时间么 提交于 2019-11-30 09:57:36
I am developing a site for a fashion client in Magento Community version 1.4.2 and as part of this project I need to have some customized home page promotion blocks to feature specific products or categories of products. For this I thought I would write my own widget and have made pretty good progress in this with the exception of how to deal with images. I need to include an image as part of the promotion. In my widget definition file I included the following parameter <image> <label>Image</label> <description>Promotion image</description> <visible>1</visible> <type>image</type> </image> This

Magento - How do I add an invoice fee to an order during checkout process

喜欢而已 提交于 2019-11-30 05:32:32
How do I add an invoice fee to an order with my payment module? I guess this should be done during the checkout process through my payment method model. Perhaps I should create and add an item/product to the cart/quote/order object? I don't know how to do any of these things though. Please help clockworkgeek Although possible it is not for the feint-hearted. Here is a rough run-down of the steps to add a line to the totals area, which will then add your fee to the grand total. In the config node <global><sales><quote><total> add a new entry (see app/code/core/Mage/Sales/etc/config.xml for more

magento orders list query

自作多情 提交于 2019-11-30 05:32:05
I want to select the list of all orders in Magento. This is required for me to show the list of all the orders from magento in another PHP application presently I'm working on. Also can some one write me the code using the Magento conventions such as Mage:: Im using Magento 1.4.2 version. Thanks, Mark This code uses the "Magento way" and accesses the data through the Model layer which insulates you from changes in the table structure (e.g. flat vs EAV). Create a new PHP file containing this skeleton code in the root of your Magento install (if elsewhere update the path for the first require

filtering product collection on “is_salable”

笑着哭i 提交于 2019-11-30 05:02:06
I would like to filter a product collection to show only items that are in stock. I thought this would be easy given that there's an attribute called 'is_salable' that is 1 (true) if it's in stock, 0 (false) if not. But no matter what I do, it doesn't work. Further, it seems to halt the execution of the query before it finishes. Here's some sample code: $this->_productCollection = Mage::getModel('catalog/product')->getCollection(); $this->_productCollection->addAttributeToSelect('*'); $this->_productCollection->addAttributeToFilter('my_attribute', true); //So far, so good...filtering on 'my

Magento Email Template If Statements

我的未来我决定 提交于 2019-11-29 22:24:09
The Magento Email Template If Statements aren't evaluating to true when I expect them to. Can someone tell me what's wrong? Take a look at the following code: {{var customer.group_id}} {{if customer.group_id}}Print true{{else}}Print false{{/if}} {{if customer.group_id==4}}Print true{{else}}Print false{{/if}} {{if customer.group_id=4}}Print true{{else}}Print false{{/if}} {{if customer.group_id eq 4}}Print true{{else}}Print false{{/if}} The output is 4 Print True Print False Print False Print False I tried putting quotes around the 4, but same result. How do I evaluate equalities with magento

How to convert standalone PHP files to Magento's MVC

早过忘川 提交于 2019-11-29 18:13:00
I have a task to convert the standalone PHP files to Magento's MVC. These PHP files were created by another developer. The code in the PHP file accesses the database, converts the result into JSONP format and forward it to the frontend developer. I don't have any knowledge of Magento's MVC. Is this task of conversion similar to the modules in the app/code/core/Mage in the Magento folder?? How can I do this? Is the magento MVC the same as the PHP MVC? I am including the php file that I need to convert to Magento MVC. So it will be easier for you to understand.. <?php header('content-type:

Images in Magento widgets

偶尔善良 提交于 2019-11-29 14:34:39
问题 I am developing a site for a fashion client in Magento Community version 1.4.2 and as part of this project I need to have some customized home page promotion blocks to feature specific products or categories of products. For this I thought I would write my own widget and have made pretty good progress in this with the exception of how to deal with images. I need to include an image as part of the promotion. In my widget definition file I included the following parameter <image> <label>Image<

Best way to output ajax data from a Magento Admin Extension

隐身守侯 提交于 2019-11-29 10:57:41
I'm writing a Magento Admin extension that has some ajax callbacks in it. Up until now I've been echoing the json I'm feeding back through the ajax call with a simple echo statement in the controller. It "works" but I get a bunch of errors like this in my log file: 2010-12-14T15:37:05+00:00 DEBUG (7): HEADERS ALREADY SENT: [0] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:44 [1] /home/simplifiedsafety/www/store/lib/Zend/Controller/Response/Abstract.php:727 [2] /home/simplifiedsafety/www/store/app/code/core/Mage/Core/Controller/Response/Http.php:75 [3]

can a magento adminhtml field depend on more then one field or value?

*爱你&永不变心* 提交于 2019-11-29 07:40:01
In http://alanstorm.com/magento_system_configuration_in_depth_tutorial @AlanStorm gives a very good tutorial for system configuration. He also explains how to use a <depends> tag to make a field show only when a specific value is set in another field. My Q is how can I make fieldB visible if field A has either value V1 or V2. and are there any other options with the <depends> ? Also If someone knows where in magento's code this is implemented I would also like to have a look at the code myself. Thanks There is a better way, but you will need to override the core files Override the method under