adding if / then equation to magento 1/2 custom option pricing - magento

I am planning on using a csv pricing matrix to calculate height x width for curtains. There are multiple heading types in curtains (track or pole) for example that increase the price of the curtains.
I ideally would like the end user to select their heading type from one front end product (having different products for each heading type would be easy, but not ideal UX). I am finding it difficult to source an extension that would essentially work on multi csvs dependent on custom option selection and so I wondered if a custom option could add a fixed cost to this.
The problem I then have is the cost isn't fixed on the width. for example
upto 800mm would add £3 to price, up to 1600 would add £17, upto 2400 would add £32 and so on.
I therefore think I need to add if/then to the custom option. I think I would need to add If eyelet heading selected then +17 to total. update I should add that as it is made to measure then the logic would need to include an if totalprice
Is this at all possible?

Hmm. The crazy idea I came with by reading your problem goes like this. Your problem is that in custom options you have to set ranges but the end user will choose exactly the dimensions.
So, you could easily hide the custom options, give the end user a text input with proper validation and then with jquery select the right magento option.
All this If I understood your problem correctly.
Anyway you should modify the product view.phtml based on your needs and find a way to work globally for all your products or you will end up with a code too difficult to maintain in the future.

Related

Magento: Different sizes and colors under one simple product?

I’m setting up an online clothing store and have come across a huge problem:
When I make at product (a t-shirt for example), I want to be able to add the available sizes and colors, without having to create a product for every single option.
When I add a color or size, I need to be able to enter a SKU for each product, so I can tell which option the customer chose in the store. First I tried making 2 sets of attributes: “Color” and “Size”, so I could multi-select when adding a product. But the attributes didn’t show up as options in the store, as I had hoped.
I did a lot of searching, and found that some people used the “Costom Option” tab, to make fields for the available sizes, colors etc. - but I don’t want add those options every time I add a product. The multi-select feature I accomplished with the attributes, would have been perfect.
Also I found that someone was forced to pay for an extension to accomplish this - but as I am running on a very tight budget, so I really don’t want to pay anything to achieve this.
You can achieve this programmatically, observing the product save and generate all simple products of a configurable product. Unfortunately, you will have to manage stock for those items separately.
You can do this by creating a configurable products. For more information on how to create configurable products please refer to http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-configurable-product. You can refer to http://www.srota.co for an example.

display a non configurable attribute of a configurable product on front end

so for each simple product under a configurable product there is an attribute (for clarity here i'm going to call it "special attribute"), which is basically a description for that combination of configuration options. I'm not working with cars but as an example of my problem imagine you choose a cadillac in magento then choose what stereo, what color, what wheel type you want. This combination has a "special attribute" (as do all combinations) of "horizon edition" or "travellers edition" or whatever else that type is. some combinations have many lines describing for "special attribute". This won't work as a configurable attribute, if I put the information into a normal attribute I can see it in the backend but it won't be visible from the front end. Has anyone got any tips on whether this is straight forward, can use a plugin. I'm thinking I'm probably going to have to do it with json and jquery but pretty tight on time right now.
thanks for reading
Welcome to SO!
An exact answer depends on your application. You may have noticed that the config option dropdown is built from JSON data which is rendered in catalog/product/view/type/options/configurable.phtml. The corresponding block class used to render this template is Mage_Catalog_Block_Product_View_Type_Configurable. You could bang your attribute into the JSON data by adding to the config attributes collection, but depending on your experience with Magento modeling and rewrites.
A possibly easier approach might be to grab the child products of the configurable and get the attribute info therefrom.
Organic Internet - Simple Configurable Products extension does it for you. There is an extension to install for free on Connect and all the code is up on GitHub.

Product calculation by custom dimensions in Magento

I already asked this question (like many before me) in the Magento 'How do I' forums and have not received any answers/ideas.
I want to create a customisable product (picture/mirror frames) by size (height/width) enabling the user to enter the size.
I have seen this done in another Magento site with the ability to select unit of measurement which is another excellent feature I would like to use.
Any ideas on how to achieve this would be greatly appreciated.
Take a look at custom options of an product. There is little documentation, but here you can determine attributes without fixed values like normal attributes have.
You can find the 'Custom options' tab while editing a product in the menubar at the left.

Using one stock for multiple items in Magento

Ok so what I want is to have multiple simple products draw from the same stock.
Scenario
I have a sinle nail file (Stock:500)
I have a box of nail files (50/box)
I want it so that if someone buys a box then it deducts from the 500 stock of the singles. Essentially what we do is if someone buys a box, then we ship them 50 of the single files in a box.
Any easy way to do this?
This isn't a native function of Magento, so there a few approaches you can take to emulate it:
Use an external stock management package to keep track of stock and modify Magento to use that. This will require more backend modification.
Attempt to fool Magento by using product bundles in clever ways. This will require more frontend modification
Develop or find a Bill of Materials plugin for Magento. I didn't see anything after a short search, so you may have to build it. Have that module check the constituent materials for a product before allowing it to be added to the cart.
Hope that helps!
Thanks,
Joe
Consider:
Create a template for the products that you wish to order this way. This template need only be the files you need to modify, by default it will find the missing files from your default theme;
In the template you can place some PHP to write out some extra javascript, of the prototype variety;
This frontend code hides the real quantity box, with prototype 'hide' for the relevant css id to make it a hidden form field;
The code shows its own quantity box, also an extra field for how many of the fifty packs are required;
An onchange event on these boxes gets the values of the boxes, does the required multiplication and addition, then updates the hidden 'real' quantity box with (boxes*50)+singles;
On submit the customer sees in the cart the total quantity of the product ordered - this will be total units, not broken down 'per box'. If this is a problem, you can put some words to explain that or modify your main template to handle this and present to the customer the boxes+singles breakdown;
Set your products to use the 'new theme' that has your template update code.
Test, test, test!
As mentioned by Joseph this cannot be done out of the box. The above workaround is only partial, however, so long as you make it clear to customers that they are buying 500 units instead of 500 boxes then you should have a reasonable solution.

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