• Resolved hayulthegoat

    (@hayulthegoat)


    global $woocommerce;
    $items = $woocommerce->cart->get_cart();
    echo "<select name='products-list'">;
    foreach($items as $item => $values) { 
        $_product = $values['data']->post; 
        $price = get_post_meta($values['product_id'] , '_price', true);
        echo "<option value=".$values['product_id'].">".$_product->post_title."-".$price."</option>";   
            } 
    echo "</select>";

    Sir, is there any shortcode or extension like the code above?
    I want to make a cart product dropdown field to my contact form 7.

    Please help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘cart item dropdown’ is closed to new replies.