Magento show empty grouped product - magento

I want tot display the grouped products in magento(version 1.9.1.1) even if they don't have a active simple product attached to them.
It's possible for me to view the grouped product on the frontend if i visit the product by using the direct url, but when I use the search form or check the category page I don't see the product.
If I activate the simple product that is associated to the grouped product the grouped product does appears in the category page and search form.
Thanks in advance!

This is due to a bug in Magento's grouped product price indexer (Mage_Catalog_Model_Resource_Product_Indexer_Price_Grouped).
The indexing process only takes into account grouped products that have simple products associated, see Mage_Catalog_Model_Resource_Product_Indexer_Price_Grouped Line 118:
if (!is_null($entityIds)) {
$select->where('l.product_id IN(?)', $entityIds);
}
This needs to be changed to
if (!is_null($entityIds)) {
$select->where('e.entity_id IN(?)', $entityIds);
}
to make it work. Also, the mass indexing of product prices (via admin interface or via shell) fixes the problem because the reindexAll() function of the named class does not limit to grouped products that have associated simple products either.
Please note that you shouldn't make those changes within the core file but overwrite the class instead.
The issue has also been reported to Magento.

Related

Is it possible to filter related products based on some of it's attributes on the product view page?

I am new to magento and looking for a solution. Is it possible to filter related products based on some of it's attributes on the product view page? I have a product and there are 100s of related products associated with it. I want customers to filter these related products based on their attributes on the product view page itself. Is it possible? Please help me.
Regards, Pallab
The template (Magento 1.9.1.0 version) for this is located in: frontend/your_package/your_theme/template/catalog/product/list/related.phtml template and the Block class associated with this template is: Mage/Catalog/Block/Product/List/Related.php and the method is: protected function _prepareData() where the related products collection is being fetched. You will have to setup your filters as you need, most likely by using JavaScript and finding the products that match the selected (filtered) attributes by the customer.
For more thorough answer, I will need more information about how these filters should look like and work.

Preselect configurable product options based on simple product

This is a very similar question to this:
Preselect configurable product options by simple product URL
But the important part of the answer just points to a dead link.
There are a million pages that explain how to get the configurable product from the simple product, but not the configurable product with the options set to what would produce the simple product.
I need this for a couple areas. First, there's a section of the site that will programatically add the product to the cart based on SKU. It finds the simple product via SKU, and I can get its parent product, but I can't add that to the cart with the options that will point it to the simple product.
Secondly, I need the link that's generated for the simple product to show the page for it's configurable product, with the appropriate options selected since we're generating links for an external service that gets the links to all the simple product pages which are currently disabled.
I've looked everywhere but can't find how to get the configurable product options selected.

How to remove information in Magento catalog, but only for specific product type

I am wondering how can I delete this two divs -
in Magento catalog, but only for specific product type. In short, I would like to have product type which would appear in catalog only with product-image and product-name, without - price, Out of stock, Add to Wishlist, Add to Compare.
It's possible to load different layout updates depending on loaded product type. You can see an example of how it's done in Magento for configurable products here: https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/design/frontend/base/default/layout/catalog.xml#L275-L287
It's possible because view action of product controller makes this to be executed: https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/code/core/Mage/Catalog/Helper/Product/View.php#L59-L60
You can change the design for any product from the admin.
You need to create a separate theme with a different product page which will have only the attributes you would like.
Then you can select the design for that specific product. Please see the screenshot, how you can change design for any product

Update magento price using custom attributes

I am a newbie to Magento Framework.
Can any one tell me how to add custom pricing to products based on custom attributes.
For example: I would not enter price or I will enter a dummy number for price in admin panel and other attributes like weight and type of item and category.
Based on the category, weight and type of item I want to calculate the actual price something
like price=weight*category+typeOfItem And also if there is any special price to the product it should also apply along with tier prices
I have created a custom module using Alan Storm's Blog but I am unable to override the pricing. Sometimes it works in the product listing page but never works with 'tier' price.
You might find it easier to use a configurable product for this, assuming you don't have a huge range of weights and products
Otherwise maybe look at overwriting the
getFinalPrice() method in the Mage_Catalog_Model_Product_Type_Price model.

Magento category page displays no products

When I view a category page (ie. url.com/category.html) the page shows the category title, description but no products. Doesn't seem to be loading them since I get this message "There are no products matching the selection."
The products are enabled, visible in catalog & search, have quantity and are in stock and product categories are listed under a root category called "Default Category". I have a featured products listed on the home page by category ID which display fine and individual product detail pages display as they should as well.
I have tried refreshing cache/indexes and searching Google all to no avail. I thought it may be an issue caused by a customization I made to the theme but switching to the default theme made no change so it would seem I must be missing something in the product or category configurations.
Possibly related? – searching always returns no results even if by product name
I am using magento ver 1.5.1
Please check following settings are done for your product
The products must be Visible in Catalog.
The products must be Enabled.
Product must have a stock Quantity.
The product must be set to In Stock.
If the product is set not to track stock, it still need to have a stock Quantity and be set to In Stock.
The product must be assigned to the target Category.
If using multi-website mode (or if you imported the products through Data Flow), the products must be assigned to the target Website.
You must refresh your “var/Cache” & rebuild all indexes from admin > system > index management
Hope this helps you.
Next time if you have same problem you can try two things:
1 - Reindex catalog and products
2 - Check user permissions
If you move your database from one server to another or you restore the database you might want to check the customer_group table. More specifically you should check the "NOT LOGGED IN" records and its ID, it should be "0" if it is not the products won't be visible for that group of users which is pretty much all users on most Magento shops.
How many attributes do you have? Too many attributes marked as "Visible on product listing page" can break the indexes. Are there records in the catalog_product_flat_* table(s)?
OK after I looked up the records and replaced my theme's list.phtml file with the default one (for about the 100th time) products started displaying. Not sure what changed but as long as they continue to display I'm happy.

Resources