23

To answer the question. You would use this (not very different than your version): $productCollection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect(array('name', 'image', 'price')) ->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::...


21

The order is install install upgrade script data script data upgrade script More info can be found here: http://inchoo.net/magento/magento-install-install-upgrade-data-and-data-upgrade-scripts/ or http://www.sitepoint.com/magento-install-upgrade-data-scripts-explained/ Or thanks to @RickBuczynski the following link: http://vinaikopp.com/2014/11/03/...


20

Do you have a custom template and did it work in 1.7? In 1.8.1 form_keys were added, so please check your custom template for this line: <?php echo $this->getBlockHtml('formkey'); ?> if it is missing, add it as in /app/design/frontend/base/default/template/persistent/customer/form/login.phtml And check all other forms after the update: https://...


17

Probably nothing because the form key is random, so it has to be different each time. So it should not make a difference, but the best practice, how you should add the form key input to your template, is this: <?php echo $this->getBlockHtml('formkey') ?> Update: I have to admit, I was wrong in one point: The form key stays the same during a ...


16

In your theme directory, in the file: /app/design/frontend/yourthemepackage/default/template/checkout/cart.phtml or in the file: /app/design/frontend/default/yourtheme/template/checkout/cart.phtml Just place on line 50 just after getUrl('checkout/cart/updatePost') ?>" method="post"> paste the below code: <?php echo $this->getBlockHtml('...


15

Background It is not possible with the out-of-box API alone; documentation seems pretty clear on this as it documents no way of establishing selections, options for a bundle Aside from that, the lack of an api.xml file in the Mage_Bundle package is telling that there is no support. Contrast that with another product type which arrived after 1.0, such as ...


14

Upgrade Roadmap for CE 1.9.0.1 from 1.8 take a backup of current database and current 1.8 code. download latest magento from the http://www.magentocommerce.com/download remove all folders and files from your 1.8 code (but you should have backup somewhere) and place all folders and files from the 1.9. now from your 1.8 merge your following folders into the 1....


14

This is the new security feature in full effect as outlined by Cyrill Schumacher. He also was so kind as to provide the fix: controller must extend admin html controller and config.xml routers section must also use admin. There is a very good explanation at Solving Magento – Magento Routers: a Look under the Hood. If you need a custom router name, ...


13

Try to put this in .htaccess <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 2 days" ExpiresByType image/x-icon "access plus 2592000 seconds" ExpiresByType text/html "access plus 1 seconds" ExpiresByType image/gif "access plus 2592000 seconds" ExpiresByType image/jpeg "access plus 2592000 seconds" ...


10

It prevents Cross Site Request Forgery Cross-Site Request Forgery (CSRF) is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request. ...


8

Magento 1.8.1 removes Google Checkout due to Google announcing the product's end of life in November of 2013. Any extensions depending on the presence of Google Checkout modules or layout in Magento may prevent your upgrade to 1.8.1. I recommend in the time-being that you either contact the vendors of those modules or you forego the upgrade. Modifying the ...


8

I have found another way of implementing this, which has some distinct advantages over the {{block}}-in-a-CMS-page method. Shows the native toolbar, for sorting/pagination Makes your "All" products "page" show up in the category navigation menu (you can change this with "Show In Navigation" dropdown.) Allows you to set the default sorting preferences, to ...


8

I know this vague question should not be answered. However I might have run into a similar issue here, this is what I have learned: the form_key must not be different in each request the form_key is consistent throughout the session a different session should create a different form_key (try another browser) the PAGE CACHE does sometimes interfere with ...


8

Option one. Seams cleaner. $productId = 1; $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($productId) $customerId = Mage::getSingleton('customer/session')->getCustomerId(); $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($customerId, true); $hasProduct = false; foreach ($...


8

Solution found! If you have a module that does anything regarding the quote and addressing running on a observer you need to add additional code to check if login, is occurring at that step. As found via: http://www.rapidcommerce.eu/blog/2012/04/allways-show-shipping-costs-in-magento/ from Thomas on December 4, 2013. Thanks to Pieter, who dropped a email ...


8

The problem is in Mage_Eav_Model_Entity_Attribute_Backend_Time_Created::beforeSave. This line ends up swapping the month and day: $zendDate = Mage::app()->getLocale()->utcDate(null, $date, true, $this->_getFormat($date)); This happens to just about all entity types including products and customers, and happens during creation and normal save ...


8

Well, the getCurrentCategory() method is defined in the category view block Mage_Catalog_Block_Category_View, thus the left-col.phtml template doesn't have any refference to it. So instead of calling getCurrentCategory() method to get the category, you can get it from the registry: Mage::registry('current_category') So, you can try changing your code to ...


8

Upgrade Roadmap for CE 1.9.0.1 from 1.6.2.0 Take a backup of current database and current 1.6.0.2 code. place maintenance.flag file inside 1.6.2.0 code folder to put website offline. Download latest magento from the http://www.magentocommerce.com/download Remove all folders and files from your 1.6.2.0 code except maintenance.flag (but you should have backup ...


8

Any invoiced orders in Magento cannot be "canceled", but they can be "closed". It sounds like you need to issue a "credit memo", which is a refund in Magento.


7

hey You ca try below code $product_model = Mage::getModel('catalog/product'); // Load product $my_product_sku = 'YOUR SKU'; $my_product_id = $product_model->getIdBySku($my_product_sku); $my_product = $product_model->load($my_product_id); $qty_value = 13; // Add to cart (?) $cart = Mage::getModel('checkout/cart'); $cart->init(); $...


7

If you're unable to locate a phtml file it's best to turn on template hints. Disable cache In the backend go to System > Configuration > Developer and fill out your IP Change the scope to website level with the top left dropdown Turn on Template Path Hints under Debug In the frontend refresh the page and the path to the login template should be visible.


7

A quick fix: In app/[mypackage]/[mytheme]/template/catalog/product/view/attributes.phtml (or copy this file in your theme from base or default custom theme): <?php foreach ($_additional as $_data): // Add these 2 lines $_test_data_value = trim($_data['value']); if ((empty($_test_data_value) || in_array($_test_data_value, array(Mage::helper('catalog')-&...


7

It should work with value: $fieldset->addField('register', 'button', array( 'value' => Mage::helper('module')->__('Button Caption'), 'onclick' => 'test()' )); Just make sure that at the end of your form declaration you don't do this: $form->setValues(....) This will override the value of the button input. Use this instead. $...


7

Did you install all the patches? https://www.magentocommerce.com/download#cat_1735_files After applying the patches, change all admin passwords. And whatever third party modules are installed, can do whatever they want, e.g. make big security holes in magento.


6

Ah hah! According to the Apache error log: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 84 bytes) in /Zend/Db/Statement/Pdo.php on line 290 So apparently Magento needs over 256MB of memory to export customers. OK the store in question has about 20,000 customers but that still sounds like quite a lot. Plus, this ...


6

Find and open the attributes.phtml file. This file can be found here: /app/design/frontend/[YOUR PACKAGE]/[YOUR THEME]/template/catalog/product/view/attribute.phtml Open the file and search for the following lines: <?php foreach ($_additional as $_data): ?> <tr> <th class="label"><?php echo $this->htmlEscape($this->__(...


6

Try adding the parameter clear to your urls. There is a function isClearEdit that is in the class Mage_Adminhtml_Block_Catalog_Category_Tree This appears to stop the second load or at least load the correct category. /** * Check if page loaded by outside link to category edit * * @return boolean */ public function isClearEdit() { return (bool) $...


5

You should check System > Configuration > ADVANCED > Advanced > Modules output > Mage Newsletter and verify that the output is enabled.


5

Your layout xml should look like this: <?xml version="1.0" encoding="UTF-8"?> <layout> <default> <reference name="root"> <block type="core/template" name="custom_block" as="custom_block" template="page/html/custom_block.phtml" /> </reference> </default> </layout> But please ...


5

I had the problem too and your comment hinted me to the right spot. As you said the error comes from the public function joinTable() in app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php. Unlike you I have used joinTable() in a Module of mine. The head of that function says the following * @param string|array $table * @param string $bind * @...


Only top voted, non community-wiki answers of a minimum length are eligible