WooCommerce is a free plug-in for the content management system WordPress, which adds the functionality of an online shop to WordPress. One of the most popular WordPress plug-ins was first released in 2011.
With the free plugin the feed can be generated:
To the plugin Product Feed PRO
Our technical shop support will be happy to assist you with the setup if required.
1. In the admin area, navigate to "Design -> Theme Editor". Then select the "Theme functions (functions.php)" on the right.
2. Copy this code snippet directly under <?php:
session_start();
/** solute Landingpage Tracking */
add_action ('woocommerce_before_single_product', 'landingpageTracking');
function landingpageTracking(){
if (strpos($_SERVER['REQUEST_URI'], "soluteclid")>0){
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'){
$landing = 'https://';
} else {
$landing = 'http://';
}
$landing .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$_SESSION['soluteclid'] = time()." ".$landing;
$url = "https://cmodul.solutenetwork.com/landing";
$url .= "?url=".urlencode($landing);
$curlCon = curl_init();
curl_setopt($curlCon, CURLOPT_URL, $url);
curl_setopt($curlCon, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curlCon);
curl_close($curlCon);
}
}
/** solute Conversion Tracking */
add_action ('woocommerce_thankyou', 'billiger_tracking');
function billiger_tracking($order_id) {
$order = new WC_Order($order_id);
$total = $order->get_total();
$shipping = $order->get_shipping_total();
$tax = $order->get_total_tax();
$sale_amt = $total-$shipping-$tax;
if (isset($_SESSION['soluteclid'])){
$ttl = 60*60*24*30;
$session = $_SESSION['soluteclid'];
$soluteclid = explode(" ", $session);
if ((int)$soluteclid[0] + $ttl > time()){
$url = 'https://cmodul.solutenetwork.com/conversion';
$url .= '?val='.urlencode($sale_amt);
$url .= '&oid='.urlencode($order_id);
$url .= '&factor=1';
$url .= '&url='.urlencode($soluteclid[1]);
$url .= '&ctsystem=WooCommerce';
$curlCon = curl_init();
curl_setopt($curlCon, CURLOPT_URL, $url);
curl_setopt($curlCon, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curlCon);
curl_close($curlCon);
} else {
unset($_SESSION['soluteclid']);
}
}
}
Attention: The functions.php will be overwritten every time a new Wordpress theme is selected.
Our Technical Shop Support will be happy to help you.
Tel: +49 721-98993-60
(For direct dialling, select "1" in the voice menu and then "2".)