Getting configurable product options pre selected from the layered navigation - magento

I have several configurable products (with many simple products associated to them).
When browsing the super attributes through the layered navigation, you can filter down to all products that have (for instance) size= medium, Colour = Red.
I have set my simple products to not be visible and showing my configurable products, however, when you select the configurable product, the product options do not default to what has been filtered in the layered navigation.
Is there a way to get the relevant product options pre-selected on the product page?
suppose the user selected the filters from the listing page as size ="medium" colour ="red"
Now when user selects the configurable product from listing page after applying filter corresponding values must be pre selected on product detail page.

There is no ready-made way to do this. When the request is made for the product that product knows nothing of the layered navigation state. In theory you could add in some server side code to do that however this might have a performance penalty as you might not be able to use cache effectively.
You could do something on the front end in javascript. Add an event listener to the links in the filtered navigation and store an object in local storage, e.g. with size and colour.
On the product page you could then set the configurable product according to those values by waiting for the configurable product options to be built, then load the options object from local storage and then update the configurable product accordingly. You will need to then fire off events so the product page knows that options have been selected and can do things like update the price accordingly.
Internally Magento uses attribute option values that have numerical ids. These can be a bit complicated to work with, so you may want to put some logic in to read the labels instead, e.g. 'Red' instead of e.g. '461'.
There is no prototype specific way of working with local storage and you don't need some layer of jquery, normal javascript should suffice when it comes to storing/retrieving your size/colour object.
I found the following article to be the head start needed for doing things with the configurable product drop-downs:
http://inchoo.net/ecommerce/magento/how-to-make-configurable-options-autoselected-on-configurable-product-view-page/

Related

Magento configurable products doesn't show attribute set inside tabs

I add some associated products to a configurable product. I used many attributes defined in attribute set "Phone_specification" for example for configurable phone.
It is supposed to show these specifications as a table (like CPU, GPU, LCD quality, ... so that to be compared later or ...) inside tabs below main description of configurable product.
But it shows nothing. It ignores these attributes which have been defined for configurable product. But in individual associated items it shows properly.
The tab on the product detail page that shows a list of product attributes will only show the attributes and their values assigned for that product. If it's a configurable product, it will not show the attributes for the simple products, because there could be more than one value.
If you want information to appear there, assign the attributes and values to the configurable product and they should appear.
Also for the attributes to appear on the Product View Page, you must make sure that the Visible on Product View Page on Front-end is set to Yes for that product.
Go to Catalog > Attributes > Manage Attributes
Click the attribute you want to appear on the product view page.
Set the option Visible on Product View Page on Front-end to Yes
Hit the Save button and flush your Magento caches.
Your attributes will now on the product view pages for the products they are directly assigned to.

Adding a custom attribute selector to a Magento product with text values, not dropdown

Magento offers Configurable Products so that it lets buyer selects attributes for a given product, like Size for Shirt, or Color for a Phone.
Problem is, you must add each possible single combination as a simple product, and that Configurable Product works merely as a container. This is impractical for attributes with too many values, and unexpected values.
For example it does not allow text values. What if a buyer wants to print his name on a Shirt?
What if I wanted to add a selectable attribute of tens of values? It doesn't have to be a added through the admin area, hardcoded solutions are OK.
Something like Cart Item Annotation is there?
Configurable products should not be used for products that doesn't have a physical definition, for instance Drawing and Designs. Instead it's better to use Custom Options instead for these cases, where you don't care about inventory of products nor attribute based statistics. This could be done through the Custom Options tab at Manage Product screen. Surely this eliminates the need for configurable products for a variety of cases.

Magento Layered Navigation (Manadev.com) ia acting strange with configurable products

I am using Manadev SEO Layered Navigation Plus (http://www.manadev.com/seo-layered-navigation-plus) as my layered navigation, but it's acting strange with configurable products.
My configurable products use only one attribute to create configurables (Size). However I have a Color attribute, also used in the layered navigation (dropdown not used to create configuragles, because every product comes in one color and many sizes).
The problem is that Size attribute shows all the simples of the configurable product, even if they are disabled in the admin. When you see the product page, the disabled simples are not showing up, but they do in the layered navigation. What do you think may be the problem?
Btw I may have imported values for Color in the configurable product as well as in it's simples. And Re-Indexing doesn't work.
SEO Layered Navigation Plus extension relies on standard Magento functionality which prepares special index tables for use in layered navigation (and decides which products should be shown when an option is selected). Unfortunately, this functionality does not consider quantity of simple products when preparing index tables for configurable products.
Standard Magento layered navigation has the same issue because it relies on the same indexes.
There is no quick fix. We consider altering Magento indexing functionality to address this issue.
To keep you posted on this issue please contact us through www.manadev.com website.

Layered Navigation in magento is not working with Configurable products

I am using this extension in my magento web store
http://www.manadev.com/seo-layered-navigation-plus (Layered navigation)
This extension working fine for simple products.
But in my case, I have two attributes that would be used to create configurable products, i.e Size and Color. Now when I create my configurable products, and associate my simple products of different sizes and colors to that configurable product and browse the Category Landing page, In layered navigation I don't see any Color or Size from the associated products of configurable products, neither it searches for the selected color or size in the associated child products of a configurable products. This has become a serious problem for me and it seems like this extension doesn't work with configurable products, I have already them too, but no reply as yet.
Has anyone went through the same problem ?
Try to re-index all. That should solve your problem.
This issue is closed for noor. For the record the reason for misbehavior is in attribute setup he had and in general is not related to SEO Layered Navigation Plus. What should be avoided:
Attributes used both in Layered Navigation should be allowed to set either on Configurable Product label or on simple product level. If you have not done it from the beginning, disabling attribute usage in configurable products is not enough as to that moment values can already be stored in database. So after disabling you should additionally delete values of that attribute assigned to all configurable products in catalog_product_entity_int table.

Magento: Different products in the different store views under the same store?

I have multi website, multi stored Magento shop, and I have a need to make some products available in one store_view, but not available in the other, where both store_views are part of the same store and website.
All my products are configurable with simple products attached to them. Only way I could think of solving this is registering a new product attribute through which I control where each product goes. That works great for the catalog and lists of products, but I have huge problems with single product view and choosing the configurable product options.
I can't seem to find where in Magento core those option are generated, so I could override that and strict some options for each store view. Basically, I need to know where is this
generated. My last resort would be managing this through AJAX, but there is already a lot of AJAX code and calls in that page that it would be confusing.
Any help or tip would be very appreciated.
I am pretty sure that the way above is not working because the attribute enable/disable product has impact at website level and not store or store view!
So if you do like tomakun says the product will be disabled at the whole website and not just for the store view you choose first!
I have the same problem that I want to assign different products all to one website but to different stores.
So far I just found the solution above to change the visibility at store view level.
But I think this not the optimal solution. It should be possible to disable a product on store level!
This feature is already available by default in Magento.
For bulk enabling/disabling products for a particular store view, do the following:
Go to your Catalog > Products
Select a store view above the product list.
You are now viewing all products included in THIS store view.
Once you have the correct store view selected, select the products you want to Enable or Disable using the checkbox on the left.
Now, using the Actions dropdown menu on top right of the product list, choose 'Change Status', select 'Disabled' or 'Enabled' and hit the Submit button.
Doing this will Enable or Disable the selected products from the selected store view (step 2). This is good for bulk actions but you can also do the same for all products one by one:
Open your product, select the relevant store view on top left of the page. Then in the General Tab, you have status: Enabled or Disabled. Choose the option that you want to apply for the current store view and hit Save.
That's it!

Resources