gidnus 0 Posted March 2, 2015 Share Posted March 2, 2015 I have checked the Affiliate Manager Software documentation. there is 'how to integrate the system with other eCommerce softwares,' but no information for 'AbanteCart.' Please can someone help me check 'AbanteCart.com', and paste the Affiliate Integration code here. I would be very very grateful.Thanks. Quote Link to post Share on other sites
forumadmin 0 Posted March 13, 2015 Share Posted March 13, 2015 does abanteCart post the sale and transaction values to a thank you page after payment is made? Quote Free Affiliate Marketing Software Link to post Share on other sites
gidnus 0 Posted March 16, 2015 Author Share Posted March 16, 2015 Yes, abanteCart post the sale and transaction values to a success.php page. here is a copy of the code in the success.php page: <?php if (! defined ( 'DIR_CORE' )) { header ( 'Location: static_pages/' ); } class ControllerPagesCheckoutSuccess extends AController { public function main() { //init controller data $this->extensions->hk_InitData($this,__FUNCTION__); if (isset($this->session->data['order_id'])) { $amount = $this->session->data['used_balance']; // in default currency if($amount){ $transaction_data = array( 'order_id'=>(int)$this->session->data['order_id'], 'amount' => $amount, 'transaction_type'=>'order', 'created_by' => $this->customer->getId(), 'description' => sprintf($this->language->get('text_applied_balance_to_order'), $this->currency->format($this->currency->convert($amount,$this->config->get('config_currency'), $this->session->data['currency']),$this->session->data['currency'],1), (int)$this->session->data['order_id'])); $this->customer->debitTransaction($transaction_data); } // google analytics data for js-script in footer.tpl $order = new AOrder( $this->registry ); $order_data = $order->buildOrderData( $this->session->data ); $order_tax = $order_total = $order_shipping = 0.0; foreach($order_data['totals'] as $total ){ if($total['total_type']=='total'){ $order_total += $total['value']; }elseif($total['total_type']=='tax'){ $order_tax += $total['value']; }elseif($total['total_type']=='shipping'){ $order_shipping += $total['value']; } } $this->registry->set('google_analytics_data', array('transaction_id' => (int)$this->session->data['order_id'], 'store_name' => $this->config->get('store_name'), 'currency_code' => $order_data['currency'], 'total' => $order_total, 'tax' => $order_tax, 'shipping'=> $order_shipping, 'city'=>$order_data['shipping_city'], 'state'=>$order_data['shipping_zone'], 'country'=> $order_data['shipping_country'] )); $this->cart->clear(); unset( $this->session->data['shipping_method'], $this->session->data['shipping_methods'], $this->session->data['payment_method'], $this->session->data['payment_methods'], $this->session->data['guest'], $this->session->data['comment'], $this->session->data['order_id'], $this->session->data['coupon'], $this->session->data['used_balance']); //Redirect back. Fix for clearing shopping cart content $this->redirect($this->html->getSecureURL('checkout/success')); } $this->document->setTitle( $this->language->get('heading_title') ); $this->document->resetBreadcrumbs(); $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('index/home'), 'text' => $this->language->get('text_home'), 'separator' => FALSE )); $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/cart'), 'text' => $this->language->get('text_basket'), 'separator' => $this->language->get('text_separator') )); if ($this->customer->isLogged()) { $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/shipping'), 'text' => $this->language->get('text_shipping'), 'separator' => $this->language->get('text_separator') )); $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/payment'), 'text' => $this->language->get('text_payment'), 'separator' => $this->language->get('text_separator') )); $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/confirm'), 'text' => $this->language->get('text_confirm'), 'separator' => $this->language->get('text_separator') )); } else { $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/guest'), 'text' => $this->language->get('text_guest'), 'separator' => $this->language->get('text_separator') )); $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/guest/confirm'), 'text' => $this->language->get('text_confirm'), 'separator' => $this->language->get('text_separator') )); } $this->document->addBreadcrumb( array ( 'href' => $this->html->getURL('checkout/success'), 'text' => $this->language->get('text_success'), 'separator' => $this->language->get('text_separator') )); $this->view->assign('heading_title', $this->language->get('heading_title')); if($this->session->data['account']=='guest'){ $this->view->assign('text_message', sprintf( $this->language->get('text_message_guest'),$this->html->getURL('content/contact'))); }else{ $this->view->assign('text_message', sprintf( $this->language->get('text_message'), $this->html->getSecureURL('account/account'), $this->html->getSecureURL('account/history'), $this->html->getURL('content/contact'))); } $this->view->assign('button_continue', $this->language->get('button_continue')); $this->view->assign('continue', $this->html->getURL('index/home')); $continue = HtmlElementFactory::create( array ('type' => 'button', 'name' => 'continue_button', 'text'=> $this->language->get('button_continue'), 'style' => 'button')); $this->view->assign('continue_button', $continue); $this->processTemplate('common/success.tpl' ); //init controller data $this->extensions->hk_UpdateData($this,__FUNCTION__); } } Quote Link to post Share on other sites
forumadmin 0 Posted March 27, 2015 Share Posted March 27, 2015 you can add the highlighted code like this under the section below: if (isset($this->session->data['order_id'])) { $amount = $this->session->data['used_balance']; // in default currency if($amount){ $transaction_data = array( 'order_id'=>(int)$this->session->data['order_id'], 'amount' => $amount, 'transaction_type'=>'order', 'created_by' => $this->customer->getId(), 'description' => sprintf($this->language->get('text_applied_balance_to_order'), $this->currency->format($this->currency->convert($amount,$this->config->get('config_currency'), $this->session->data['currency']),$this->session->data['currency'],1), (int)$this->session->data['order_id'])); $this->customer->debitTransaction($transaction_data); file_get_contents('http://www.domain.com/affiliates/sale/amount/' . $amount . '/trans_id/' . (int)$this->session->data['order_id'] . '/tracking_code/' . $_COOKIE['jamcom']); } Quote Free Affiliate Marketing Software Link to post Share on other sites
jamesrhenry 0 Posted June 21, 2018 Share Posted June 21, 2018 I see this post is two years old, is there any update as to Integrating this Affiliate Manager with Abantecart? Thanks! Quote Link to post Share on other sites
forumadmin 0 Posted June 27, 2018 Share Posted June 27, 2018 I see this post is two years old, is there any update as to Integrating this Affiliate Manager with Abantecart? Thanks! First, check if that code is still the same and add the JAM integration code in the same place. Quote Free Affiliate Marketing Software Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.