Plugin Author
alekv
(@alekv)
Hi @marpessa1
We don’t support SKUs yet.
Regards
Aleks
Hi Aleks,
You marked this case as resolved a little while ago. Could you explain how to use the SKU field from the products in woocommerce – and not the post id?
best regards,
Lars
For future viewers I fixed this by changing line 305 in wgdr.php
from
ecomm_prodid: ' . json_encode( $this->mc_prefix . get_the_ID() ) . ',
to
ecomm_prodid: ' . json_encode( $this->mc_prefix . $product->get_sku() ) . ',
and line 414 from
array_push( $cartprods_items, $this->mc_prefix . $entry['product_id'] );
to
array_push( $cartprods_items, $this->mc_prefix . wc_get_product( $entry['product_id'])->get_sku());
-
This reply was modified 9 years ago by
larsbuur.
-
This reply was modified 9 years ago by
larsbuur.
-
This reply was modified 9 years ago by
larsbuur.
One more addition. See line 424 here -> https://gist.github.com/LarsBuur/016a336ad25ba3a51b2d648c86ef483c
This link contains the full file using SKU´s and not wordpress post id.
Plugin Author
alekv
(@alekv)
The plugin has been updated. It now supports the SKU.