• Hey! I need to pull the following values *along with the Order Id *for reporting to pinterest for the pinterest tag.

    Ideas how to do this with your plugin?

    global $woocommerce;

    $totalamount = $woocommerce->cart->cart_contents_total; //calls the order total
    $order_quantity = $woocommerce->cart->cart_contents_count; //calls the total cart quantity

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author artiosmedia

    (@artiosmedia)

    Hello @espressivo, I read your post 5 hours after posting, and I am in deliberations with my best developer regarding this question. Hopefully, I will know something soon. Thanks for your patience.

    Thread Starter espressivo

    (@espressivo)

    Hi! This is what I have thus far – the only thing not working now is the bundle quantity is counted extra. So if she has a bundle of 3 products then the quantity count is 4 (one for the bundled product and then 3 for the products included in the bundle).

    add_action('wp_head', 'wpb_hook_javascript1'); // Adds this to the head
    
    function wpb_hook_javascript1() {
      if (is_page ( array('1751'))) { //Adds it to the specific page, in this case WooCommerce cart
    
    	
    // This calls the cart contents
    
    $order_id_number = wc_get_order_id_by_order_key( $_GET['key'] );
    $order = wc_get_order( $order_id_number );
    $totalamount = $order->get_total();
    	
    $sumofitems = 0;	
    foreach ( $order->get_items() as $item_id => $item ) {
       $quantity = $item->get_quantity();
       $sumofitems+=$quantity;
    }
    	
       
    ?> 
            <script>
      
    		
    			
      		pintrk('track', 'checkout', {  
            order_id: '<?php  echo  $order_id_number ?>',
    		 value: '<?php echo $totalamount ?>', 
            order_quantity: '<?php echo $sumofitems ?>',
            currency: 'USD',
    		em: '<?php echo wp_get_current_user()->user_email ?>'
    			
    			
      });
    </script>
    Plugin Author artiosmedia

    (@artiosmedia)

    Great! That is very helpful, @espressivo.

    If you can figure out the bundle challenge, we should be able to incorporate this addition as a setting in the plugins settings panel. Where the user can choose to activate price paid and quantity bought as additional information when posting to the three provided social media choices.

    Since you are working from a live environment with all the variables, your developing a complete working solution is extremely valuable. Your WordPress account could be given credit for the addition. Since this plugin is free, recognition is all we can afford ??

    Thread Starter espressivo

    (@espressivo)

    Well I don’t need any payment or anything but this is not information that has to be present when shared out to the channel – it is for the Pinterest tracking code to track for when someone is paying for ads to their store. I will keep at it and post an update. This is very specific to Pinterest and just needs to fire on the thank you page if someone has the Pinterest tag installed.

    Plugin Author artiosmedia

    (@artiosmedia)

    Oh.. I see, @espressivo. I did not understand what you were initially thinking, but you have clarified it much better for our comprehension. Tracking code for Pinterest if the tag is installed. We will eagerly await your final code and implement as quickly as possible.

    Thanks,
    Artios Media

    Plugin Author artiosmedia

    (@artiosmedia)

    @espressivo, can you share your final edits, please?

    Thread Starter espressivo

    (@espressivo)

    We ended up using a different thank you plugin. Sorry! Your plugin is great – just needed one that integrated with a client’s funnel system directly (WooFunnels).

    Hello,
    Thank you very much for the plugin… this is by far the best thank you plugin in the WP. I am just a bit worried about the update. look like it has been 2 months and has not been updated anyway..

    my question here would be a shortcode for the address because I want to display it in the map.

    please help. Thank you

    Plugin Author artiosmedia

    (@artiosmedia)

    Closing this thread.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Need values’ is closed to new replies.