Hi esmond,
Sorry running to little issue here with the totals,
Coupon total. The code works with total amounts but it does not apply the coupon discount. If you can help with this will be much appreciated.
Thank you
Sam
Try opening another topic in the future so it is much easier for other users to follow.
If you're looking at coupon, you must ensure you have enabled the order total module in extensions > order total.
If you're looking at coupon, you must ensure you have enabled the order total module in extensions > order total.
Thanks, It's on
It's the same pepperjam code that we are trying to implement. Sorry I was not clear
I think this is what they are looking for
The above is the total of each item before the discount, but when the coupon is applied, it does not deduct for that item total.
Would that be another db->query?
Do you want me to open another topic or continue with this?
Thanks
It's the same pepperjam code that we are trying to implement. Sorry I was not clear
Code: Select all
$output .= '&AMOUNT' . $count . '=' . $result['total'];
Code: Select all
echo $order['order_total'];
Would that be another db->query?
Do you want me to open another topic or continue with this?
Thanks
you will probably have to fetch the total from the order_total table to get the total after discount. You can fetch with
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE code = 'total' AND order_id = '" . (int)$order_id . "'");
$amount = $query->row['value'];
Thank you for being so patent with us..
Is there away to get the price of each item after the discount.
here's the output
AMOUNT1=200.0000 and AMOUNT2=124.0000 are the original values of each item before the discount.
What I think they are trying to get is the items above amount after the discount if any
Thank you, I really appreciate the help
Sam
Is there away to get the price of each item after the discount.
Code: Select all
$output .= '&AMOUNT' . $count . '=' . $result['total'];
Code: Select all
<iframe src="https://t.pepperjamnetwork.com/track?PID=6935&INT=ITEMIZED&ITEM1=492&QTY1=1&AMOUNT1=200.0000&ITEM2=455&QTY2=2&AMOUNT2=124.0000&OID=497" width="1" height="1" frameborder="0"></iframe>
What I think they are trying to get is the items above amount after the discount if any
Thank you, I really appreciate the help
Sam
OK, not sure if this is correct but it seems to be working:
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_product WHERE order_id = '" . (int)$order_id . "'");
$output = '<iframe src="https://t.pepperjamnetwork.com/track?';
$output .="PID=6935";
$output .="&INT=ITEMIZED";
$count = 1;
foreach ($query->rows as $result) {
$output .= '&ITEM' . $count . '=' . $result['product_id'];
$output .= '&QTY' . $count . '=' . $result['quantity'];
$output .= '&AMOUNT' . $count . '=' . $result['total'];
$count++;
}
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_total WHERE code = 'total' AND order_id = '" . (int)$order_id . "'");
$amount = $query->row['value'];
foreach ($query->rows as $result) {
$output .= '&PROMOCODE' . '=' . $result['value'];
$count++;
}
$output .='&OID=' . $order_id . '" width="1" height="1" frameborder="0"></iframe>';
I can't remember the discounted price being stored, because the coupon is offset at the total calculation. I'm sure the codes you have isn't really correct this way.
Thanks,
So, from what I understood, OpenCart does not give you the discounted price per item after applying the promocode. Just the total discount at the total check out price?
If that's the case, then I think we are going to eliminate the Promocoode for now. We will Just using the individual sale on items for now!
Also, It seems like more than just above code, I suppose there are some IF statements.
Again, thanks for your help
Sam
So, from what I understood, OpenCart does not give you the discounted price per item after applying the promocode. Just the total discount at the total check out price?
If that's the case, then I think we are going to eliminate the Promocoode for now. We will Just using the individual sale on items for now!
Also, It seems like more than just above code, I suppose there are some IF statements.
Again, thanks for your help
Sam
I realize this is an old thread, but does anybody know how to provide the code in OC 2.0.3.1 for Pepperjam (EAAN) integration? This is far beyond my pay grade but we've already subscribed and I need to find someone who can provide the code to make this work.
I have the details if required. Please PM me if necessary.
Cheers
JP
I have the details if required. Please PM me if necessary.
Cheers
JP
Who is online
Users browsing this forum: No registered users and 28 guests