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

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.

Related

Getting configurable product options pre selected from the layered navigation

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/

Magento: Configurable / Bundeld products ? How does it work exactly?

We're a little bit lost between configurable products, bundled products, using custom options, etc.
I'll tell you the result we would like to obtain:
We're a USB manufacturing company. And we want to sell custom USB keys via Magento.
We have about 50 different USB models available. For each model, the customer must be able to select the desired color (won't change the price), the desired capacity (1 GB, 2GB, 4 GB, etc - this will change the price, e.g. 20, 30, 40 % more of product's price). He must also be able to select the packaging of the key (eg box, plastic bag, leather bag, etc).
We want to use tier pricing, and show the price of the keys depending on the quantity AND on the capacity he selected.
A perfect example of what we want to do is: http://wowusb.com/plastic-custom-usb-flash-drive/usb-81.html.
We've tried using the SCP extension (Single Configurable Products), but don't really understand how to use it.
We don't really need to have associated products. One product for each USB model is OK, just having options (and tier pricing) on this one, just like the shop above.
Can you guide us on how to realise this ?
Any help will be greatly appreciated !
Thanks
The Simple Configurable Products extension will work well for this sort of thing, there's typically not a whole lot of configuration (just choose what parts of the configurable product you want to update when the user selects the options). The SCP extension will help greatly when it comes to tiered pricing.
To build a configurable option for what you are looking for, first you must make product attributes (drop-down type, global scope) for each attribute. This is in Catalog -> Attributes -> Manage Attributes. You would make one each for color, storage size and packaging. For each attribute you would add the different options available.
Once those are made, make sure to add them to the Attribute Set (Catalog -> Attributes -> Manage Attribute Sets) you will be using.
Now comes the work: You'll need to make a simple product for every combination available. For each simple product, you'll need to select the specific attributes created earlier, as well as set the tiered pricing for each simple product.
A rough idea math wise: 5 colors X 5 sizes X 3 packages = 75 simple products
This can be done via csv import, so that may save you some time, although you'll have to examine how tiered pricing is structured from within an exported list and copy it exactly. By the way, I recommend setting these products visibility to "Not Visible Individually", but don't disable them.
Now you can begin to build the configurable product. Once you start creating the new product, it will ask you which attributes to use, so select the color/size/packages and whichever else you want the products to be fine-tuned by.
Enter the general product information as normal. Price doesn't matter here (SCP extension doesn't use it).
Under "Associated Products", filter the grid view to find all the simple products you have created, and begin checking them off. If a product line turns red, it means that a product has already been selected with the exact same attributes.
Once you have a configurable product listed, you can play with the SCP extension settings (System -> Configuration -> SCP Config) to have the product behave as you want. The options under the Cart heading determines what you would like to display in the cart line. The options under the Product Page heading let you determine if you would like various sections of the configurable product to update with the corresponding simple product info (description, short description, main image, gallery images and additional info box).
When the user selects the last option, the product prices will automatically update, as well as show the tiered pricing box ("Buy X for $Y each and save Z%!").
One last thing, when using the SCP extension, do NOT add any "Custom Options" to a configurable product, they must be added to the simple products associated to the configurable product instead (Other product types are fine).

Is it possible to apply a custom option to an entire category of products in Magento?

I'm working on a Magento-powered jewelry store and the sample ring I added as a product, I
created a custom option for Ring Size (a SELECT drop down).
Easy enough.
My question is this - how can I apply that custom option to ALL products within the Rings
category?
Looks like you're wrong with the idea of using custom options here. If you're planning to use Ring Size for all of your Rings products, it's better to create a Ring Size attribute, add it to "Rings" Attribute Group, and use this attribute group to create your Rings products.
Update. You need to use the Configurable product type for your rings product. Here's the manual how to create a Configurable product.
To wrap it up - here's the brief description of Configurable products functional: The actual "configurable" product is a virtual "container" that contain simple physical items with concrete attribute option within itself.
In your case you will create a Configurable product that is configured by the attribute Ring Size. Then you will create some simple product, each with it's own Ring Size option. After simple products are created, you will assign them to the configurable product, so the customer will have the ability to choose the desired Ring Size on the frontend.
Just don't forget to mark Ring Size attribute as "is used to create configurable products" duting the attribute creation.

Magento - Uses and Benefits of getOptionsByCode

I have seen that Magento uses this method "getOptionsByCode()" in the class "Mage_Sales_Model_Quote_Item" a lot, for retrieving / fetching the Quote Item options by code. After printing each of the Options, for any item, I found these:-
info_buyRequest
option_ids
option_1843
attributes
product_qty_231
simple_product
Now here are my questions:-
What Magento is trying to achieve with the use of this method "getOptionsByCode()", or its benefits?
Is this only to be used for the Configurable Products, or for other composite Product Types also?
How to determine which option codes are for Custom Options of the corresponding Product Item?
What are the options "info_buyRequest" and "simple_product" specifically used for?
Are there any other uses of the Custom Options, like Configurable Attributes or something else?
Thanks to all in advance!
Let's answer one at a time:
The item's options are the values the user selected for adding that product to the cart (for instance, the different options and their selected values).
All of the products use at least the info_buyRequest option. I don't really know about the other ones.
I think they might be all inside of the "attributes" option, but I never really used custom options.
info_buyRequest is used to spec the qty, and all other options. It is the initial request (that later gets processed). The simple product probably is the real product you are adding to the cart (that is, the item might be a configurable product, but you add in the cart a simple product).
I don't really know. But, if what you need is to find out the options chosen for such product, my guess is you should check either the "attributes" option, or just get the simple_product and get it's options.

Magento grouped product options

I want to show a set of products as a table inside one product with these attributes.
Dimensions Width x Gusset x Height Code Price/Case Bags/Case Weight
So i chosen grouped product option but it does not match the requirement. How can i design a table like format from the grouped product option with radio button to choose only one product from it. So using grouped product or configurable product or by any way how can i achieve this.
Here am attaching the screen-shot which i actually wanted
I can think of two ways to represent this in code. If the dimensions tend to be from a limited set of choices, you could use a configurable product to represent this choice, simply displaying all possible sub-products in the table. This would let you reuse the existing catalog product page with a little retrofitting.
If they do not fit well, you could place the items in a category hidden from the public categories and loop through each of the products in the category to display the table. This would require more work to tie back to putting into the cart, etc.
Importantly, it looks like each of your options has an entirely uncorrelated price, so it seems to me that you need to have a simple product underpinning these options at some point. (I'm sure you could get more clever, I'm just not sure that's a good idea.)
You can easily solve this with a plugin for Magento. There is a plugin here which will do exactly what you want. It will display product options in a grid: http://www.magemechanics.com/product-grid-options.html

Resources