osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Edit Orders Bug

This is a discussion on Edit Orders Bug within the osCMax v2 Features Discussion forums, part of the osCMax v2.0 Forums category; I have just noticed bug number 208. I had the same problem and I did not trust myself or anyone ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Features Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack (3) Thread Tools
  3 links from elsewhere to this Post. Click to view. #1  
Old 12-30-2006, 07:28 PM
New Member
 
Join Date: Dec 2004
Posts: 14
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 0
davem
Default Edit Orders Bug

I have just noticed bug number 208.

I had the same problem and I did not trust myself or anyone else involved with processing orders to remember to add the "-" sign, so here is the workaround I put in my files:

Couple of notes first:

1. I am not using RC3 as my modified site means I have more integration to do before I can implement this.
2. For ease of use, I have looked at the default RC3 and referred to it in the following line numbers.
3. I only use Gift Vouchers, if you use others credits such as Discount Coupons or Customer Loyalty Schemes you will have to change the IF statement below or add OR clauses, ie. $ot_title == 'Gift Vouchers:' || $ot_title == 'YOUR OTHER CREDIT:'

Open admin/edit_orders.php
around line 393 find
PHP Code:
 value '" . $ot_value . "'
change to
PHP Code:
 value '" . ($ot_title == 'Gift Vouchers:' ? -$ot_value : $ot_value) . "'
Open admin/includes/classes/order.php
Note that if you are using an earlier version open admin/includes/classes/oe_order.php
around line 36 find
PHP Code:
 'value' => $totals['value'], 
change to
PHP Code:
 'value' => ($totals['title'] == 'Gift Vouchers:' ? -$totals['value'] : $totals['value']), 
This is only a workaround and I am sure someone with far better coding skills than me will be able to clean it it. However if you need any help with it please drop me a note.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to davem For This Useful Post:
JohnW (02-29-2008), michael_s (12-30-2006)
Reply


LinkBacks (?)
LinkBack to this Thread: http://www.oscmax.com/forums/oscmax-v2-features-discussion/6813-edit-orders-bug.html

Posted By For Type Date
208: Edit Order w/Gift Voucher - Bug Tracker - open source Commerce Maximized :: osCMax This thread Refback 04-03-2008 11:29 PM
208: Edit Order w/Gift Voucher - Bug Tracker - open source Commerce Maximized :: osCMax This thread Refback 03-24-2008 07:02 AM
208: Edit Order w/Gift Voucher - Bug Tracker - open source Commerce Maximized :: osCMax This thread Refback 01-18-2008 10:10 AM

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Get duplicate orders in customers orders heaven osCommerce 2.2 Discussion 0 11-07-2005 04:29 AM
How to edit Max with htmlarea? RCarlton osCMax v1.7 General Mods Discussion 24 02-21-2005 08:21 PM
Edit attributes - Something Something isn't right Anonymous osCMax v1.7 Discussion 4 02-08-2005 03:16 PM
How do I edit these files? Anonymous osCMax v1.7 Discussion 2 08-03-2004 01:18 PM
How to edit <head> pgowder osCommerce 2.2 Modification Help 5 01-03-2003 09:00 AM


All times are GMT -8. The time now is 08:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax