Hi Guy,
Am i missing something here. I have Inline Entity Form set up for my commerce products on a commerce line item.

The issue i have is that i always have to enter the price. If the order status is set to shopping cart, it doesn't allow me to enter a price. I then save the line item and a price isn't added to the line item. I then save the order and it throws an error as the price cannot be null.

If the order status inst set to 'shopping cart' i have to manually enter the price which works but my desired outcome would be for the system to populate the price automatically from the select product.

Hope you guys can help. I would just use the normal inline item manager field but it doesn't allow me to enter details for my custom product.

Thanks in advance

Comments

rotty_dean’s picture

Issue summary: View changes
bojanz’s picture

What's your line item type? Is it custom? Did you create it via commerce_custom_product? Or through the hook?

rotty_dean’s picture

Line item type was created using the "Add a product line item type" (so not a hook) button on the line item page. Only added one field to allow input. The field type is Long text.

Using "Commerce Customizable Products" Module.

bojanz’s picture

Title: Price Field on Line Items » commerce_product_line_item_populate() not called for product line item types
Status: Active » Fixed
StatusFileSize
new2.5 KB

Confirmed the issue. Renaming it to describe the actual problem.

Committed the attached patch. It introduces the needed change and removes a commerce_cart related chunk that is not needed (since we're now hiding the price field for product line items as recommended).

rotty_dean’s picture

Great work, Confirmed working in my setup!

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.