• Resolved charl33

    (@charl33)


    I’m using Tag Assistant (by Google) chrome extension, I’ve observed that when the event “order_confirmation” is triggered in the Thank you page. Only the last variable product is added in the Conversions > Ecommerce > Product Performance.

    Looking at the code:
    file enhanced-e-commerce-for-woocommerce-store/public/class-enhanced-ecommerce-google-analytics-public.php
    line ~305

    if (isset($_product->variation_data)) {
    	$orderpage_prod_Array[get_permalink($_product->ID)]=array(
    		"tvc_id" => esc_html($_product->ID),
    		"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
    		"tvc_n" => html_entity_decode($item["name"]),
    		"tvc_p" => esc_js($order->get_item_total($item)),
    		"tvc_c" => $categories,
    		"tvc_attr" => $attributes,
    		"tvc_q"=>esc_js($item["qty"])
    	);
    } else {

    The code $_product->ID returns “”. Fixed it with this code.

    if (isset($_product->variation_data)) {
    	if(version_compare($woocommerce->version, "2.7", "<")){
    		$orderpage_prod_Array[get_permalink($_product->ID)]=array(
    			"tvc_id" => esc_html($_product->ID),
    			"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->ID),
    			"tvc_n" => html_entity_decode($item["name"]),
    			"tvc_p" => esc_js($order->get_item_total($item)),
    			"tvc_c" => $categories,
    			"tvc_attr" => $attributes,
    			"tvc_q"=>esc_js($item["qty"])
    		);
    	} else {
    		$orderpage_prod_Array[get_permalink($_product->get_id())]=array(
    			"tvc_id" => esc_html($_product->get_id()),
    			"tvc_i" => esc_js($_product->get_sku() ? $_product->get_sku() : $_product->get_id()),
    			"tvc_n" => html_entity_decode($item["name"]),
    			"tvc_p" => esc_js($order->get_item_total($item)),
    			"tvc_c" => $categories,
    			"tvc_attr" => $attributes,
    			"tvc_q"=>esc_js($item["qty"])
    		);
    	}
    } else {

    Hoping that the fix would be included in the next release.

    • This topic was modified 3 years, 11 months ago by charl33.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Conversios

    (@tatvic)

    Hi @charl33,

    Thank you very much for sharing this feedback. We have noted this and would include it in the next release.

    Thanks & Regards,
    Tatvic Analytics.

    @tatvic is the latest release of the plugin includes the fix on the issue mentioned above?

    I was testing the latest version and still has the same issue

    Plugin Author Conversios

    (@tatvic)

    Hi @jlapitan,

    Thanks for posting.

    The basic plugin supports only simple product types. We do have a solution with which we can help with the variable product type compatibility.

    Just FYI, we would have written more about the solution we have but the forum policy does not allow us to mention it and we respect that.

    If the communication mode would have been another one then we would have explained you.

    Hope you understand our limitation here.

    Thanks & Regards,
    Tatvic Analytics.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing variable products’ is closed to new replies.