magento custom options price calculation - height * width - php

I'm building a webshop with Magento and like to add a product with three custom options: select option, width and height.
For instance, I sell doors. The size of the door shoul be chosen by the costumer. In order to accomplish that, I created 3 custom options in all the simple products: type of door with a fixed price, width and height.
What i would like is to be able to calculate the price of the type of door based on the size (width & height). So the fixed price of one of the type of doors is 1000 / 1000 mm and one someone put 1000 / 2000 that it calculates it.
Thanks in advance

Create a configurable product with all 3 above attributes as configurable attributes. Assign the calculated prices to the individual simple products. When customer will select the type, width and height, the respective simple product with these configurations will be selected and the its price will be reflected in cart without any overrides. :)

Related

Restrict Product Variables Selection Woocommerce

This relates to WooCommerce Product Variations.
A client has only one product (a cushion), it has one attribute (fabric type) with many variations - over 50 fabric type swatches. They would like to display the fabric variations sorted into groups to make them easier for customers to choose from (example: floral fabrics, baby fabrics, block colour fabrics).
Does anyone know if there is a way to do this?

Want to add a checkbox to product page on woocommerce/measurement calculator plugin

I want to add a checkbox to products in certain categories in my online shop, but when the checkbox is ticked it will need to add 'x' amount to the total of the product.
To complicate things further, the product is total is calculated by (area x product price) after the user has inputted their required Length and Width, the checkbox will need to use the area value and then multiply the area by 2.5 and then add that sub-total to the grand total of the product. It's an add-on to the product. If you catch my drift?
Here's a link to a sample product page. The products are carpets, so when you to tick the checkbox, the carpets will have a stain protection applied and will be charged for.
Is there any snippet of code that could help me here?
So it was a relatively easy solution. It was just a case of turning the product into a variable product and using attributes to make a "yes or no" drop-down box, with one of the options having an increased price. This makes the price change before the area is calculated, unlike the 'product add-ons' plugin, which adds on after.
I can't believe it took me two weeks to find the answer to this.

Relational Dropdown/Select product attributes in Magento backend

I'm developing a Magento store for a vehicle accessory company. There are a number of vehicle specific items that need Make/Model/Year attributes, however I can't find an extension that allows creation of relational attribute dropdowns - I need three dropdowns, whose options change dynamically depending on the previous dropdown selection, for example:
Dropdown A has four Vehicle Makes. Choosing a Make then populates the Model dropdown with a specific set of options and so on for the Year dropdown.
Is this possible in Magento? I've looked at some of the Make/Model/Year extensions, but they're all text inputs - too much room for input error by staff members. I've also tried VehicleFits but it isn't working/throws a lot of errors and it appears development has ceased.
I've searched high and low, any help would be greatly appreciated.
It's not possible to create dependent product attributes directly or straight forwardly under Manage Attributes. But you can make your attributes depend on each other by creating Configurable products.
Lets say you have 2 colors (black and blue) and 2 sizes (L,XL) and you want to make your colors depend on sizes.
At first create 2 attributes size and color of type dropdown under Manage attributes and create the attribute options and values. and Assign it to the right attribute set.
Now create the simple products , lets say product A with size L and color Black and product B with color Blue and size XL.
Now create a configurable product lets say AB and associate these two simple products A and B. Save the product.
If the customer opens the product AB and if they choose size L they can find only color Black. This is how you can make your product attributes dependent on each other.
Source: here
Or may be this is what you are looking for:
http://www.magentocommerce.com/magento-connect/dependent-custom-options-configurable.html
Hope it helps.

how to add to cart a product with a value multiplied by some amount.?

i am new to prestashop. here i want to add to cart a product with its value multiplied by some amount.
such as, my product's value per meter is $200. user will put height and width in meter. if a user inputs 2m height and 2 meter width, then the calculated value will be $200*2*2 = $800
i want to add to cart this product with $800 instead of $200 per quantity through ajax. how is it possible.!here is height and width each 1m.
Locate the product.tpl file in your theme folder. There is an <input id="quantity_wanted"> element. You need to update this value according to user input of the product width and height.
Adding to cart will be handled by Prestashop, as it sends {id_product, quantity, id_product_attribute, ...} to the PHP controller, where quantity is value of "quantity_wanted" input.
So, add two HTML <input> elements for width and height and process these values using Javascript, which will change "quantity_wanted" input value.
Also think of: providing this functionality inside a module to avoid changing Prestashop core code, storing width and height of each added product, as you will need this information to prepare customer order.

Magento: Get min. and max. price for a product (from associated products attributes price configuration)

I try to get minimum and maximum price for a configurable product using its attributes. For example; I have defined prices for all associated products of Shoe XYZ (shoe_xyz_4 / size 4: $99, shoe_xyz_5 / size 5: $109, etc) and I want to display a price '$99—$109'.
Any Ideas?
You can call it as an array like this:
$_maximumPriceValue =$_product[max_price];

Categories