J2Store (estensione Joomla!) integration
Un carrello degli acquisti e un’estensione e-commerce che ampliano gli articoli come prodotti e ti permettono di trasformare gli articoli in prodotti a tutti gli effetti.
Vendita offline
Apri il file:
plugins/j2store/payment_offline/payment_offline.php
e trova la funzione _postPayment e questa linea al suo interno:
if ($orderpayment->save()) {
Aggiungi questo codice proprio sopra la linea:
$vars->order_id = $orderpayment->order_id;
$vars->total_cost = $orderpayment->order_subtotal;
Salva il tuo lavoro. Adesso apri il file:
plugins/j2store/payment_offline/payment_offline/tmpl/postpayment.php
e aggiungi questo codice alla fine del file:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost('<?php echo $vars->total_cost; ?>');
sale.setOrderID('<?php echo $vars->order_id; ?>');
sale.setStatus('P');
PostAffTracker.register();
</script>
Salva il tuo lavoro. Questo creerà una commissione in sospeso per ogni transazione offline. Dovrai approvarla o rifiutarla manualmente in seguito – in base alla transazione originale.
PayPal – passaggio 1
Trova il file:
plugins/j2store/payment_paypal/payment_paypal/tmpl/prepayment.php
e trova il campo di input notify_url. Ha un aspetto simile a questo:
<input type="hidden" name="notify_url" value="<?php echo JRoute::_( $vars->notify_url ); ?>" />
e all’interno di questo file aggiungi:
id='pap_ab78y5t4a'
Il campo aggiornato dovrebbe essere così:
<input id='pap_ab78y5t4a' type="hidden" name="notify_url" value="<?php echo JRoute::_( $vars->notify_url ); ?>" />
Proprio sotto il campo di input notify_url (quindi proprio sotto quella linea di codice) metti questo codice qui sotto:
<!-- Post Affiliate Pro Integration snippet -->
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.writeCookieToCustomField('pap_ab78y5t4a', '', 'pap_custom');
</script>
<!-- /Post Affiliate Pro Integration snippet -->
PayPal – passaggio 2
Apri il file:
plugins/j2store/payment_paypal/payment_paypal.php
e trova la funzione _process() e questa linea al suo interno:
$data = $app->input->getArray($_POST);
Ora aggiungi questo codice proprio sopra la linea:
/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php?pap_custom=".@$_GET['pap_custom']);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* /Post Affiliate Pro integration snippet */
Non dimenticarti di integrare il tuo account Joomla con il codice di tracciamento dei clic e di attivare il plugin PayPal IPN Handling nella tua installazione di Post Affiliate Pro.
How to integrate Post Affiliate Pro (Network) with 3rd party affiliate systems?
Learn how to integrate Post Affiliate Pro with 3rd-party affiliate systems. Follow our step-by-step guide to streamline your affiliate tracking!
Discover the power of S2S tracking for capturing server-side actions in scenarios where JavaScript or HTML pixel integration isn't possible. Learn about using PHP API or URL calls with GET parameters to efficiently track commissions, protect against fraud, and ensure accurate data collection. Explore integration options whether you can or cannot add JavaScript to your landing page, and understand the benefits of tying sales to click events for comprehensive tracking. Visit our guide for in-depth insights and step-by-step instructions.
Integration with Joomla 1.5.X and lower
Integrate Joomla 1.5 with PAP4 for seamless user registration to affiliate systems. Download, install, and activate the plugin easily!
Copy Post Affiliate Pro to your server
Learn to install Post Affiliate Pro on your server effortlessly with our step-by-step video guide using an FTP client.