9 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
10 gravityview()->log->error(
'{file} template loaded without context', array(
'file' => __FILE__ ) );
20 $entry = $gravityview->entry->as_entry();
42 $hide_empty_products = ! in_array( $gravityview->field->inputType, array(
'select',
'radio',
'price',
'hidden' ) );
44 if ( $hide_empty_products && $gravityview->view->settings->get(
'hide_empty' ) ) {
47 $quantity_found =
false;
49 foreach ( $gravityview->fields->all() as $_field ) {
50 if ( $_field->type ==
'quantity' ) {
51 if ( $_field->productField == $_field_id ) {
52 $quantity_found = ! empty(
$entry[ $_field->ID ] );
58 if ( ! $quantity_found && ! $gravityview->field->disableQuantity && empty(
$entry[
"$_field_id.3" ] ) ) {
gravityview_get_field_value( $entry, $field_id, $display_value)
Handle getting values for complex Gravity Forms fields.
$value
See if there are any values in the product array GF provides.
gravityview_get_input_id_from_id( $field_id='')
Very commonly needed: get the # of the input based on a full field ID.
if(! isset( $gravityview)||empty( $gravityview->template)) $field_id
The default product field output template.
gravityview()
The main GravityView wrapper function.
if(''==$display_value) $entry