• Hi,
    congratulations for your plugin, it is wonderful and very useful.
    I am using your plugin to show some woocommerce products on a map, how can I Show on a new map the items that the customer added his cart.
    Thank you a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Camille V

    (@socrapop)

    Dear Carlotoscani,

    Unfortunately, you can’t do that with my plugin.

    The [travelers-map current_query_markers=true] parameter (displaying only the current query posts) only works with the defaut wordpress query system.
    Woocommerce is using global variables for products in the cart:

    global $woocommerce;
    $items = $woocommerce->cart->get_cart();

    So you can’t use it with Travelers’ Map.

    Sorry :/ I’m adding this to my “ideas box” for future updates ??

    Have a nice day,
    Camille

    Thread Starter carlotoscani

    (@carlotoscani)

    hi, thanks a lot for your replay, I have many ideas for future update of your plugin so you can create a fantastic plugin for many travel agency, do you have an email where I can write to you?
    regards

    Thread Starter carlotoscani

    (@carlotoscani)

    do you think this code could be helpful:

    <?php
    global $woocommerce;
    $items = $woocommerce->cart->get_cart();

    foreach($items as $item => $values) {
    $_product = wc_get_product( $values[‘data’]->get_id() );
    //product image
    $getProductDetail = wc_get_product( $values[‘product_id’] );
    echo $getProductDetail->get_map(); // accepts 2 arguments ( size, attr )

    }
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show on map items of the cart’ is closed to new replies.