Have Error - Anyone HELP? Im dead in the water!

Community Based Support for JROX Affiliate Manager Only
Post Reply
Posts: 12
Joined: Mon Mar 02, 2015 1:53 pm

Have Error - Anyone HELP? Im dead in the water!

Post by endlessxpressions » Tue Aug 23, 2016 12:38 pm

So the coding worked fine integrating to my open cart. But I noticed that it was giving commissions ON shipping and didnt take into account coupons.
So Jrox gave me another code to add.
Added that and now Im getting errors and it wont track sales.
Can anyone advise me on what to do? Im dead in the water and I dont know how to fix this!

Erros Im getting after adding their code on checkout success page:

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in /home/streetkt/public_html/shophodgepodge.com/catalog/controller/checkout/success.php on line 15Notice: Undefined index: value in /home/streetkt/public_html/shophodgepodge.com/catalog/controller/checkout/success.php on line 17

and no sales are tracked for comm now.

Im using opencart and I need it JUST to give commissions on the subtotal minus coupon codes.

If you know of a better code PLEASE let me know.

Code I have now:
$sql = 'SELECT * FROM `' . DB_PREFIX . 'order` WHERE order_id = ' . (int)$this->session->data['order_id'];
$jrox2 = mysqli_query($jrox, $sql);
$aff_data = mysqli_fetch_assoc($jrox2);

$sql = 'SELECT * FROM `' . DB_PREFIX . 'order_total WHERE order_id = ' . (int)$this->session->data['order_id'] . ' AND code = \'sub_total\'';
$jrox2 = mysqli_query($jrox, $sql);
$sub_total = mysqli_fetch_assoc($jrox2);

$aff_integrate = file_get_contents('http://www.shophodgepodge.com/rep/sale/amount/' . $aff_data['value'] . '/trans_id/' . $this->session->data['order_id'] . '/tracking_code/' . $_COOKIE['jamcom']);

Post Reply