Forums / All Other Contributions/Addons / Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Locked

Started by swguy on 22 Dec 2009, 12:19 AM · Views: 3,664

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
22 Dec 2009, 12:19 AM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,748
Plugin Contributions:
56

Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

If you are using Super Orders or Edit Orders and an order total discount other than Group Discounts (e.g. Better Together, Quantity Discounts, Military Discounts, Newsletter Discounts, Combination Discounts, Big Spender, Big Chooser, Frequency Discounts, or any other contribution written by someone other than me), the process of editing an order using either of those mods will flip the sign on a discount causing it to appear to be a surcharge.

The fix is straightforward; both admin/edit_orders.php and admin/super_edit.php simply list discount classes ("ot_coupon", etc.) You simply have to add any additional classes you are using to if statements in those two files which enumerate through the order total discount classes. Searching for "ot_coupon" will show you what to change.

The full fix and more notes are on my blog at http://thecartblog.com/2009/12/21/zen-cart-edit-orders-and-my-discounting-mods/

Scott

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

22 Dec 2009, 12:34 AM
#2
jsweb avatar

jsweb

Zen Follower

Join Date:
Jul 2005
Location:
UK and Ireland
Posts:
392
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Thanks Scott -- that post was much appreciated as we were struggling with that.

Regards

Jamie

The JSWeb Team
Providing Zen Cart Hosting, Design and Support services to help your business succeed online!
JSWeb | UK / Ireland ZenCart Design and Hosting Specialists

22 Dec 2009, 1:57 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,748
Plugin Contributions:
56

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

LOL donations gratefully accepted.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

2 May 2010, 5:55 PM
#4
00boto avatar

00boto

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

I am having this issue with the Edit Order add on but I am not using additional group discounting software. Please help.

I get the same exact result you described on your webpage.

My $ot_class code looks like this.

$ot_class == "ot_coupon" || $ot_class == "ot_gv"

Yet it still changes the - to a + upon editing an order.

Please help.

Matt

2 May 2010, 6:17 PM
#5
00boto avatar

00boto

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

I also tried adding group discounts to the ot_coupon class line like this.

$ot_class == "ot_coupon" || $ot_class == "ot_gv" || $ot_class == "ot_group_pricing"

But no luck.

If I manually place a - sign in the order and click update then the - sign will remain. All new orders when I go to edit them lack the - sign on group discounts.

2 May 2010, 6:51 PM
#6
00boto avatar

00boto

New Zenner

Join Date:
May 2010
Posts:
3
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Looks like I got it fixed by adding the ot_group_discount to edit_orders.php.

I was looking for it to display a "-" sign and not paying attention to the actual total.

Thanks!

21 May 2010, 10:52 AM
#7
manage_it avatar

manage_it

Inactive

Join Date:
May 2006
Posts:
80
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

I still have the problem with the - sign after editing an order with a group discount. the discount turns into a surcharge.
I have already changed the edit_orders.php, are there any other changes needed?

if ($ot_class == "ot_coupon" || $ot_class == "ot_gv" || $ot_class == "ot_group_pricing")

I use zencart 138a and edit_orders 2.3.

thx.

Bram

11 Oct 2010, 8:51 PM
#8
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Thank you so much for these instructions! That took care of something that's been a thorn in my side for almost 2 years. Donation on its way!

11 Oct 2010, 10:49 PM
#9
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,748
Plugin Contributions:
56

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Thank you!

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

27 Oct 2010, 7:32 AM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Just wanted to note that this fix will be incorporated into the upcoming Super Orders release.. Thanks Scott for the info!!:smile:

swguy:

If you are using Super Orders or Edit Orders and an order total discount other than Group Discounts (e.g. Better Together, Quantity Discounts, Military Discounts, Newsletter Discounts, Combination Discounts, Big Spender, Big Chooser, Frequency Discounts, or any other contribution written by someone other than me), the process of editing an order using either of those mods will flip the sign on a discount causing it to appear to be a surcharge.

The fix is straightforward; both admin/edit_orders.php and admin/super_edit.php simply list discount classes ("ot_coupon", etc.) You simply have to add any additional classes you are using to if statements in those two files which enumerate through the order total discount classes. Searching for "ot_coupon" will show you what to change.

The full fix and more notes are on my blog at http://thecartblog.com/2009/12/21/zen-cart-edit-orders-and-my-discounting-mods/

Scott

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

27 Oct 2010, 7:35 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Wouldn't the better "fix" be to fix those other discounting mods to properly identify themselves as such, and produce correct output, and thus not trigger the problem?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Oct 2010, 4:44 PM
#12
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

DrByte:

Wouldn't the better "fix" be to fix those other discounting mods to properly identify themselves as such, and produce correct output, and thus not trigger the problem?
:laugh::laugh: You might be right.. Though I'm not sure how to do this.. If I understand you correctly is this something that has to be corrected in the discounting modules themselves??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

27 Oct 2010, 4:46 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

Yes .

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Oct 2010, 4:48 PM
#14
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Interoperability betwen Super Orders/Edit Orders and non-native discounting mods

DrByte:

Yes .Got it!!:smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.