Title: Dynamic Product
Last modified: March 15, 2018

---

# Dynamic Product

 *  Resolved [winstarnz](https://wordpress.org/support/users/winstarnz/)
 * (@winstarnz)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/dynamic-product/)
 * Hi,
 * I’m developing a process for a customer who is a Courier service provider.
 * They want their customers to be able to enter dimensions for a parcel I.e. Width,
   Height, Depth and it calculates the price for the different services, the user
   picks which service they want to use and it creates the order in WooCommerce.
 * I have the calculation and selecting service working.
 * Each service is created as a product.
 * Please advise how best to set up the product so that we can add the Width, Height
   and Length that the user entered to it when adding the product to the cart? This
   will be done using php.
 * My current thinking is to create an attribute of height, width, depth to each
   product with a value of 1. When the user clicks to select service, I create new
   attributes for the product height, length, width of the value entered. I think
   there must be a better way to do this? as over time, the product is going to 
   end up with thousands of attributes.
 * _[ [Signature deleted](https://wordpress.org/support/guidelines/#avoid-signatures)]_
    -  This topic was modified 8 years, 1 month ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * (@icaleb)
 * Automattic Happiness Engineer
 * [8 years, 1 month ago](https://wordpress.org/support/topic/dynamic-product/#post-10080342)
 * Yea, attribute/terms would not be great. Better to just have text fields, like
   with Product Add-Ons: [https://www.woocommerce.com/products/product-add-ons/](https://www.woocommerce.com/products/product-add-ons/).
   You can add your own fields programatticaly though.
 * Since these fields affect the actual item info, there will be another step. Once
   in the cart or while being added, you will need to set the cart item’s dimensions
   based on the meta values. I believe this plugin does something similar, so it
   is possible: [https://woocommerce.com/products/measurement-price-calculator/](https://woocommerce.com/products/measurement-price-calculator/)
 * Once hooked into the cart item, can just call methods like `$item->set_length()`
   to change the actual values.

Viewing 1 replies (of 1 total)

The topic ‘Dynamic Product’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Caleb Burks](https://wordpress.org/support/users/icaleb/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/dynamic-product/#post-10080342)
 * Status: resolved