add shoppingitem d name
This commit is contained in:
parent
16df753efd
commit
0292445e5e
@ -68,6 +68,7 @@ function fulcrm_shoppingcart_get_session_cart( $create = true ) {
|
||||
if ( array_key_exists( 'fulcrm_shoppingcart_id', $_SESSION ) ) {
|
||||
$api_data = fulcrm_apiv2_GET( 'shoppingcart/' . $_SESSION[ 'fulcrm_shoppingcart_id' ] . '/',
|
||||
$query = array( 'expand' => implode( ',', array( 'shoppingitems',
|
||||
'shoppingitems.d',
|
||||
'shoppingitems.content_object',
|
||||
'shoppingitems.product' ) ) ) );
|
||||
if ( $api_data[ 'success' ] ) {
|
||||
@ -135,10 +136,11 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form_submit( $form, &$form_sta
|
||||
// 'person' => $uuid,
|
||||
),
|
||||
),
|
||||
'name' => $form_state[ 'values' ][ 'shoppingitem_name' ],
|
||||
),
|
||||
);
|
||||
|
||||
$api_data = fulcrm_apiv2_POST( 'shoppingitem/', $item );
|
||||
$api_data = fulcrm_apiv2_POST( 'shoppingitem/', $item, $query = array( 'expand' => 'd' ) );
|
||||
if ( $api_data[ 'success' ] ) {
|
||||
drupal_set_message( t('Added to shopping cart.'), 'status' );
|
||||
$form_state[ 'redirect' ] = 'fulcrm/cart';
|
||||
@ -163,6 +165,9 @@ function fulcrm_shoppingcart_buy_eventbookingtype_form( $form, &$form_state, $pe
|
||||
'#markup' => '<h3>' . check_plain( $product[ 'name' ] ) . '</h3>',
|
||||
);
|
||||
|
||||
$form[ 'shoppingitem_name' ] = array( '#type' => 'hidden',
|
||||
'#value' => $product[ 'name' ] . "\r\n" . $eventbookingtype[ 'name' ] . "\r\n" . $eventbookingtype[ 'event' ][ 'name' ] );
|
||||
|
||||
$form[ 'product_id_hmac' ] = array( '#type' => 'hidden',
|
||||
'#value' => fulcrm_crypto_object_id_form_value( 'product', $product[ 'id' ] ) );
|
||||
$form[ 'eventbookingtype_id_hmac' ] = array( '#type' => 'hidden',
|
||||
|
Loading…
x
Reference in New Issue
Block a user