Ubercart integration
Um ótimo carrinho de compras de e-commerce de código aberto que integra totalmente sua loja online com o Drupal.
É uma integração do Ubercart para integração da página de agradecimento e também uma solução para Ubercart usando PayPal.
Localize as configurações
Vá para Administrador > Administração da loja > Configuração > Configurações de finalização de compra > Editar > Mensagens de checkout
Código de integração para página de agradecimento
Adicione este código ao cabeçalho da mensagem de conclusão do Checkout:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
var sale = PostAffTracker.createSale();
sale.setTotalCost('[uc_order:subtotal]');
sale.setOrderID('[uc_order:order-id]');
sale.setProductID('[uc_order:products]');
PostAffTracker.register();
</script>
Altere o formato de entrada em “Cabeçalho da mensagem de conclusão de checkout” para HTML completo.
Não esqueça de salvar suas alterações.
Usando o PayPal no Ubercart
Se você estiver usando o PayPal como gateway de pagamento em seu Ubercart, é melhor integrá-lo diretamente.
Edite o arquivo sites/all/modules/ubercart/payment/uc_paypal/uc_paypal.module – encontre a função uc_paypal_wps_form() e coloque este código logo após a linha com o código:
‘notify_url’ =>
'custom' => $_COOKIE['PAPVisitorId'],
Now, edit the file sites/all/modules/ubercart/payment/uc_paypal/uc_paypal.pages.inc and find the function uc_paypal_ipn() - put the following code below the function line:
/* Post Affiliate Pro integration snippet */
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://URL_TO_PostAffiliatePro/plugins/PayPal/paypal.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_exec($ch);
/* /Post Affiliate Pro integration snippet */
Não esqueça de salvar suas alterações.
9. Integrate the affiliate software with your website
Integrate your affiliate software seamlessly with your website for effective tracking of referrals and commissions. Set it up right!
Complimentary White Glove Setup & Full Integration Service
Start your affiliate program effortlessly with our free White Glove Setup & Integration Service—no fees, no contracts, just results!