How add custom column to woocommerce shopping cart and then add info of some input from this column to order, checkout page and to email?
Actually i need add friends list from buddypress to each product row(price must depends on how many friends checked).
Here i found suggestion, but it`s partly helpfull <a href="https://stackoverflow.com/questions/21650019/woocommerce-add-input-field-to-every-item-in-cart">WooCommerce: Add input field to every item in cart</a>
wp community also keep silence
<a href="http://wordpress.org/support/topic/woocommerce-custom-column-in-cart?replies=1" rel="nofollow noreferrer">http://wordpress.org/support/topic/woocommerce-custom-column-in-cart?replies=1</a>
what i do - its just add list of avalaible friends and no idea how can I save data on update cart or proceed.
Im seek ANY info about this question.
Actually i need add friends list from buddypress to each product row(price must depends on how many friends checked).
Here i found suggestion, but it`s partly helpfull <a href="https://stackoverflow.com/questions/21650019/woocommerce-add-input-field-to-every-item-in-cart">WooCommerce: Add input field to every item in cart</a>
wp community also keep silence
<a href="http://wordpress.org/support/topic/woocommerce-custom-column-in-cart?replies=1" rel="nofollow noreferrer">http://wordpress.org/support/topic/woocommerce-custom-column-in-cart?replies=1</a>
what i do - its just add list of avalaible friends and no idea how can I save data on update cart or proceed.
Code:
if ( bp_has_members( 'user_id=' . bp_loggedin_user_id() ) ){
function ggUserFrom(){
$arrUsers = array();
while ( bp_members() ){
bp_the_member();
$arrUsers[ bp_get_member_user_nicename() ] = bp_get_member_user_nicename();
}
return $arrUsers;
}
echo "<div class='friends-holder'>";
foreach ( ggUserFrom() as $friend ){
echo '<p><input type="checkbox" name="cart['.$cart_item_key.'][friendsfromcart]" value="'.$friend.'">
<span>'.$friend.'</span></p>';
}
echo "</div>";
}
Im seek ANY info about this question.