| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
BCSE Points - displaying in packing list | |||
|
|
Thread Tools |
#1
|
|||||||||
|
|||||||||
BCSE Points - displaying in packing list
I've used th epacking list mod on the forum to create a packing list/invoice combo. I'd like to put the customers current reward points total at the bottom.
I've edited history_order.php to add the following: Code added: Code:
[code] if ($orders) { $orders_data = array(); foreach ($orders as $orderid) { $order_data = func_order_data($orderid); if (empty($order_data)) continue; # # Security check if order owned by another customer # if ($current_area == 'C' && $order_data["userinfo"]["login"] != $login) { func_header_location("error_message.php?access_den ied&id=34"); } $order = $order_data["order"]; $customer = $order_data["userinfo"]; $giftcerts = $order_data["giftcerts"]; $products = $order_data['products']; $orders_data[] = array ("order" => $order, "customer" => $customer, "products" => $products, "giftcerts" => $giftcerts); //Added below $username=$order_data["userinfo"]["login"]; $agq="select sum(points) as total from points where login = '$username' and (expire >= '".time()."' or expire = '' or expire is null)"; $result=mysql_query($agq); $points = mysql_fetch_row($result); $smarty->assign("points", $points[0]); } I'm then using {$points} in the template. My problem is that it's pulling the value for the last customer only, and putting the same value in each invoice when i'm batch printing. can anyone help? tia
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#2
|
|||||||
|
|||||||
Re: BCSE Points - displaying in packing list
Quote:
Hi, has anyone an answer for this problem? I have a very similar issue with the same points printing on invoices for all customers. Thanks in advance Nick
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: BCSE Points - displaying in packing list
I found it was actually in the install readme, one of the optional extras at the end.
hth
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|