To add additional information about a product when adding to cart, you can use the options
param to submit any data you wish along with the product you are adding to cart. You can see documentation on this here: https://craftcommerce.com/docs/add-to-cart#line-item-options-and-notes
As for modifying the price of the product based on those options; this is not possible by default in Craft Commerce, although we have provided a way that a plugin can achieve this.
There are 2 possible solutions:
1) Write a plugin that provides a Purchasable
. A purchasable is a Craft Element, which your customers could build or edit on the front-end, and then add it to the cart. This is the more advanced path. You would need to know how to create a Craft Element, allow front end users to create and edit them, then make the element a purchasable. Documentation on Purchasables here: https://craftcommerce.com/docs/purchasables
2) Submit line item option data, but write a plugin that uses the onPopulateLineItem
event to modify the price of the line item based on the option data submitted. It would look something like this:
craft()->on('commerce_lineItems.onPopulateLineItem', function($event){
$purchasable= $event->params['purchasable'];
$lineItem = $event->params['lineItem'];
if(isset($lineItem->options['giftWrapped']) && $lineItem->options['giftWrapped'] == 'yes'){
$lineItem->price = $purchasable->getPrice() + 10; // gift wrap is 10 dollars
$lineItem->saleAmount = 0;
}
});
The original price would still show in the product listing, but the option submitted when adding to cart would change the price of the line item when in the cart.
The 2 methods above allow you to have configurable prices of products.