The Stack Overflow podcast is back! Listen to an interview with our new CEO.
62

Everyone always complains about Magento search but I believe it can work really well if you spend time planning and configuring it properly. Like Keyword based search method, breaking your query into individual words. See the following from line 326 in class Mage_CatalogSearch_Model_Resource_Fulltext::prepareResult() $words = Mage::helper('...


42

You cannot change the default order direction for product lists from configuration. You can however change the direction from layout XML. Here are a few examples that you can put in your layout XML file, e.g. local.xml: <?xml version="1.0"?> <layout version="0.1.0"> <!-- Change default direction for simple searches --> <...


31

Its important to understand what indexes are slow and why Catalogue complexity and ultimately store architecture will dictate how long a re-index will take - combined with the underlying infrastructure. If you've got 50,000 products and 10 store views, you can guarantee the few million rows in catalog_url_rewrite will take time to process. If you've got ...


29

The question is tagged with ce-1.7.0.2 but for future reference, if you are using ce-1.9.1.0 ee-1.14.1 or higher, the feature is already built in, with the so-called Configurable Swatches which allow "Product Image Swap". You can enable this feature in System > Configuration > CATALOG > Configurable Swatches Product Image Swap The following ...


29

Try this: <depends> <field separator="|"> <value>1|2|3</value> </field> </depends>


26

You need to understand the clear distinction between these two products to understand how to use them. APC is both an OPCode Cache and Fast Backend Memcache is just a Fast Backend Using APC as an OPCode Cache Simply install the module on your server pecl install apc And enable it in your php.ini echo "extension=apc.so" >> /usr/lib/local/php.ini ...


21

For the specific answer to your question see, https://magento.stackexchange.com/a/72700/361 Background Firstly, there is no specific exploit - there are a series of articles doing the rounds at the moment that have misread and misunderstood the source article. The original article merely said (and I'm paraphrasing), If a hacker were able to get access ...


19

The table catalog_product_super_link but the other tables that start with catalog_product_super_ are involved in the relation. catalog_product_super_attribute - holds the configurable attributes catalog_product_super_attribute_label - holds the store view labels for the configurable attributes - this is not that important ...


17

Enable Template Path Hints (System -> Configuration; choose your store view; Developer -> Debug) You will find out that the default file is: app/design/frontend/base/default/template/page/html/footer.phtml (don't touch this file) Copy it to: app/design/frontend/[your_package]/[your_theme]/template/page/html/footer.phtml Clear cache, reload. Then you can ...


17

Do you have PHP setup to cache the WSDL files? PHP's SoapServer implementation (used by Magento) needs to examine the WSDL file at least once during a SOAP call, sometimes more than once. This can create exponential growth in your request times. Check the setting at System -> Configuration -> Magento Core Api -> Enable WSDL Cache and make sure ...


17

You could join the necessary table yourself. $productCollection = Mage::getModel('catalog/product') ->getCollection(); $table = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'my_attribute')->getBackend()->getTable(); $attributeId = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'my_attribute')->...


17

It's a fair amount of work to implement that yourself, but there are a number of extensions that implement that, both free and commercial. SCP is probably the most prominent free extension, and it works well if the theme templates haven't diverged too far from the default. http://www.magentocommerce.com/magento-connect/simple-configurable-products.html ...


17

Welcome to Magento.StackExchange! Unfortunately, there is no out-of-box module that will do this for you. I'd highly encourage you to reconsider this as an option. Your users are not stupid (no matter how stupidly they behave) - many, many years of eCommerce analysis has shown me that, nearly 80% of the time, users reaching a 404 will hit the on-site-...


16

Create an upgrade script with this code: $setup->updateAttribute('catalog_category', 'menutopdescription1', 'is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE); $setup is an instance of Mage_Catalog_Model_Resource_Setup or Mage_Eav_Model_Entity_Setup. If you want to change the db directly (I don't recommend it) you need to change the ...


15

A hack (CE 1.6.2.0+) is to pass the condition as an array and believe it or not this works as intended: $collection->addFieldToFilter(array(array('attribute' => 'my_attribute', 'eq' => 1)));


15

The address is not just on checkout page, but in profile too. Anyway, in admin panel go to System → Configuration → Customers → Customer Configuration open Name and Adress options and the is Number of Lines in a Street Address. Here you can set it.


15

It appears that changes to my .htaccess as well as a missing .htaccess.sample are the culprit. After restoring a stock copy of both files (both were required) the patch appears to apply successfully. To solve this, without losing (needed) modifications, I followed these steps: Create a backup of .htaccess and .htaccess.sample–either with your ...


14

I finally found the reason for the problem and the solution: The problem: SOAPv2 with WS-I does not use the single_data and multi_data attributes. Therefore the check in /app/code/core/Mage/Catalog/Model/Product/Api/V2.php in _prepareDataForSave fails. The method _prepareDataForSave checks for single_data and multi_data which are both not part of the SOAP-...


14

I don't know exactly how you can solve this but I can explain the problem, maybe it helps. I see that the product page is on https but when you click on the add to cart button the form is submitted to http://francesandalbert.com/checkout/cart/add/uenc/aHR0cDovL2ZyYW5jZXNhbmRhbGJlcnQuY29tL3JpbmcuaHRtbD9fX19TSUQ9VQ,,/product/172/. Notice the http. Then ...


13

The exception with the error message you stated is triggered in exactly one place (code slightly truncated for readability): final public function __construct($source) { $this->_source = $source; $this->_init(); // validate column names consistency if (is_array($this->_colNames) && !empty($this->_colNames)) { $...


13

After asking around this are the reasons I've got. Hope its satisfying for you, even though its probably what you expected. The adminhtml interface was made with the intention to make it hard for merchants to totally screw up. For that reason many features that are provided by Magento as a Framework are not possible through the user interface. The ...


12

The problem is a bug in the model Mage_Core_Model_Url_Rewrite_Request (Magento 1.8) and Mage_Core_Model_Url_Rewrite (earlier versions). The section of core code in 1.8 looks like this: // Section from Mage_Core_Model_Url_Rewrite_Request::_rewriteDb() $fromStore = $this->_request->getQuery('___from_store'); if (!$this->_rewrite->...


12

I can try to use addExpressionFieldToSelect. You can find the method in Mage_Core_Model_Resource_Db_Collection_Abstract. In your case it should be something like this: (This is just an assumption, you might get some errors, but the idea is ok) $collection = Mage::getModel('module/module')->getCollection()->addFieldToFilter('status',1); $collection->...


12

Until I find the exact problem here is the solution. Instead catalog_product_save_before use the event catalog_product_prepare_save. The downside of this is that the prepare_save event is dispatched only when saving a product from the admin interface or the API. So if you are saving from a custom code this won't get triggered unless you trigger it manually. ...


12

I would advise never editing core code as it will create issues for you down the road. This is a database change. 0 comes before 1 and no default value is set for that attribute so 0 will always be selected unless otherwise told. You need to go into your database, find the "is_active" attribute code (there may be two, only edit the one with the Source ...


12

$order->getShippingAddress()->getTelephone();


11

Even if I don't see the point (but maybe I'm not that artistic) this can be done easily. First you need to remove the add button from the grid container block. This should be the block: {Namespace}/{Module}/Block/Adminhtml/{Entity}.php. At the end of the __construct method add this line: $this->removeButton('add'); Now you need to add a button near the ...


11

Yes, the inline translation feature is broken in Google Chrome. Back when the inline translation feature was originally developed, Magento made use of a non-standard translate attribute in DOM elements to flag translatable text. Since then, Google Chrome has a feature where a default translate property is added to every DOM node available in javascript (...


11

Magento has this facility in-built since 1.7CE. The class Mage_SalesRule_Model_Coupon_Massgenerator. To make use of it on your own you can instantiate the class: $generator = Mage::getModel('salesrule/coupon_massgenerator'); You need to set some options: $data = array( 'max_probability' => .25, 'max_attempts' => 10, '...


11

Solution 1 This moves out of stock products to the end of the list on page, not all over the pagination: 1.Add event observer: <frontend> <events> <catalog_block_product_list_collection> <observers> <ssd_test> <type>model</type> <...


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