43

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 --> <...


30

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


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 ...


21

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 ...


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 to ...


19

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 ...


18

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.


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-search ...


15

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


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 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

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->...


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

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 ...


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

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> <...


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 ...


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, '...


10

Assuming you already have your entity and a grid for it in the backend here is what you need. In my example, my entity is called article and the module is Easylife_Press. Adjust the names to fit your module. First you need a new table to remember the relation between products and your entities. For this add in your config.xml the table declaration inside ...


10

I've done something like this, and this is a contrived example and over-simplified to see if you would even consider this to be a viable solution: It's similar to defining a sudoku grid but that sudoku grid's open areas are open seats: $section1 = <<<SECTION A,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-, B,-,-,-,-,-,-,-,-,-,-,-,-,-...


10

The following code should work for you $stock_item = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); if (!$stock_item->getId()) { $stock_item->setData('product_id', $product_id); $stock_item->setData('stock_id', 1); } $stock_item->setData('is_in_stock', 1); // is 0 or 1 $stock_item->setData('...


10

The solution to this problem is most likely going to be re-building the price index. Without building the price index, or saving each product individually, there will be no price index values for the new customer group. In the catalog_product_index_price table you'll find that there is a row per product for each customer group. These indexes are joined onto ...


10

Try using sales_order_save_after instead, it's triggered right after an order is saved in the database and returns the full order object Why this event is triggered twice, I'm not sure. It's an an event triggered from Core/Model/Abstract.php method afterCommitCallback, seems that Magento is saving / committing 2 different data sets on the the Order model. ...


10

The methods addFieldToFilter() and addAttributeToFilter() are the same. /app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:339 /** * Wrapper for compatibility with Varien_Data_Collection_Db * * @param mixed $attribute * @param mixed $condition */ public function addFieldToFilter($attribute, $condition = null) { return $this->...


10

Try this. Mage::getModel('catalog/product')->getCollection()->getSize() When using count the full collection is loaded. For getSize() magento uses a separate sql. But this ignores any limit you set on the collection. If you need a limit then use this: count($collection->getAllIds()); This still executes an sql to get all the ids but it ignores ...


9

This is mostly due to any of the below two reasons Server timed out and closed the connection. fix: try increasing the wait_timeout variable in your mysqld’s my.cnf/my.ini configuration file. Server dropped an incorrect or too large packet. fix : increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf/my.ini file. ...


9

Try this. // Get product. $product = Mage::getModel('catalog/product')->load(16); // Get attribute set model. $model = Mage::getModel('eav/entity_attribute_set'); // Get attribute set id. $attributeSetId = $product->getAttributeSetId(); $attributeSet = $model->load($attributeSetId); // This is ...


9

First of all you shouldn't be using load in a loop. It's a really big performance killer. Use ->addAttributeToSelect('small_image') and after that use the $product object instead of $_productInCollection. but if you really insist on using load use if as follows. $_productInCollection = Mage::getModel('catalog/product')->load($product->entity_id); ...


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