CRE Loaded integration
Una soluzione di e-commerce completa e facile da usare, che combina un potente software per negozi online e un programma di carrello degli acquisti completo.
L’integrazione con CRE Loaded avviene inserendo lo script di tracciamento delle vendite nella pagina di conferma. Per ottenere i valori di OrderID e TotalSale, lo snippet si connette al database CRE Loaded e recupera i valori da lì.
Individua il file ‘checkout_success.php’
Trova e apri il file ‘checkout_success.php’
Trova la posizione corretta per l’integrazione nel file
Nel file ‘checkout_success.php‘ trova queste linee:
// load all enabled checkout success modulesrequire(DIR_WS_CLASSES . 'checkout_success.php');
Inserisci il codice
Prima di queste linee inserisci questo codice:
//--------------------------------------------------------------------------
// Post Affiliate Pro code
// The code below will get the order_id and total value of recent order
// from the database and displays invisible image that registers the sale
// for affiliate (if some affiliate referred this visitor)
//--------------------------------------------------------------------------
// get order id
$sql = "select orders_id from ".TABLE_ORDERS.
" where customers_id='".(int)$customer_id.
"' order by date_purchased desc limit 1";
$pap_orders_query = tep_db_query($sql);
$pap_orders = tep_db_fetch_array($pap_orders_query);
$pap_order_id = $pap_orders['orders_id'];
// get total amount of order
$sql = "select value from ".TABLE_ORDERS_TOTAL.
" where orders_id='".(int)$pap_order_id.
"' and class='ot_subtotal'";
$pap_orders_total_query = tep_db_query($sql);
$pap_orders_total = tep_db_fetch_array($pap_orders_total_query);
$pap_total_value = $pap_orders_total['value'];
// draw invisible image to register sale
if($pap_total_value != "" && $pap_order_id != "")
{
$pap_sale_img = '<img src="https://URL_TO_PostAffiliatePro/scripts/sale.php?TotalCost='.$pap_total_value.'&OrderID='.$pap_order_id.'" width=1 height=1>';
}
//--------------------------------------------------------------------------
// END of Post Affiliate Pro code
//--------------------------------------------------------------------------
Individua il modello
Trova e apri il file ‘/templates/content/checkout_success.tpl.php‘
Trova il luogo corretto per l’integrazione
In questo file trova:
</table></form>
Dopo questa riga inserisci questo codice:
<?php
//--------------------------------------------------------------------------
// START of Post Affiliate Pro code
//--------------------------------------------------------------------------
echo $pap_sale_img;
//--------------------------------------------------------------------------
// END of Post Affiliate Pro code
//--------------------------------------------------------------------------
?>
Sei pronto
Il carrello di CRE Loaded è ora integrato. Ogni volta che il cliente entra nella pagina di conferma dell’ordine, il codice di tracciamento viene richiamato e registra una vendita per l’affiliato di riferimento.
Nota: Testato su CRE Loaded 6.2 Pro B2B 6.2.06
Discover the power of the Lifetime Commissions plugin! Ensure lifetime referral tracking with unique customer identifiers, allowing affiliates to earn commissions on future sales without repeated clicks. Easily manage customer-affiliate relations and configure settings to suit your needs. Boost your affiliate program's efficiency with customizable options and ensure commissions for affiliates, even across different devices or channels. Explore seamless integration with eCommerce systems and enhance your marketing strategy today!
Discover the essentials of clicks (referrals) tracking with our comprehensive guide. Learn about the importance of click tracking code, explore various code examples including simple, asynchronous, and PHP versions, and dive into advanced tracking options. Optimize your affiliate marketing strategy with expert tips on setting account IDs, managing cookies, and customizing tracking parameters. Visit now to enhance your click tracking implementation!