Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 346,083

Results 1,681 to 1,700 of 1,927
12 May 2021, 2:43 PM
#1681
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Edit Orders v4.0 Support Thread

lat9:

@Spanky and @diptimoy, please refer to my response in post #1672.

I did the changes as mentioned by you .@spanky will test and reply you back.

12 May 2021, 3:12 PM
#1682
spanky avatar

spanky

New Zenner

Join Date:
May 2021
Location:
New York
Posts:
16
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Ok so - that change made it so that when I edit shipping/product quantity everything looks good. However, if I try to edit the product price, it just ignores it and reverts back. Any ideas there?

12 May 2021, 3:16 PM
#1683
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Spanky:

Ok so - that change made it so that when I edit shipping/product quantity everything looks good. However, if I try to edit the product price, it just ignores it and reverts back. Any ideas there?
If you're not using manual-entry pricing, the product prices are automatically calculated and override any manual entry.

12 May 2021, 3:21 PM
#1684
spanky avatar

spanky

New Zenner

Join Date:
May 2021
Location:
New York
Posts:
16
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Ah ok, this appears to be working good now. Thank you so much for the help

12 May 2021, 3:23 PM
#1685
diptimoy avatar

diptimoy

Zen Follower

Join Date:
Apr 2012
Location:
Bardhaman , Bharat
Posts:
217
Plugin Contributions:
1

Re: Edit Orders v4.0 Support Thread

lat9:

If you're not using manual-entry pricing, the product prices are automatically calculated and override any manual entry.

the configuration is as follows
Attachment 19564

12 May 2021, 3:45 PM
#1686
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

... and you've got the ability to "Choose" whether manual or automatic, with the default being automatic. If you don't change the price-calculation method to 'Manual' prior to submitting the order for update, the automatic pricing calculation mode will kick in.

17 May 2021, 2:35 PM
#1687
spanky avatar

spanky

New Zenner

Join Date:
May 2021
Location:
New York
Posts:
16
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I was advised by diptimoy to post here, but currently our coupons are still not being calculated properly. The last bit of help you gave me to edit the code in the editorders plugin worked well. Was wondering if there's something else I can do to fix this. Basically, the tax is taking the subtotal with the coupon deducted into account, but the fee and total are not.

17 May 2021, 4:53 PM
#1688
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Spanky:

I was advised by diptimoy to post here, but currently our coupons are still not being calculated properly. The last bit of help you gave me to edit the code in the editorders plugin worked well. Was wondering if there's something else I can do to fix this. Basically, the tax is taking the subtotal with the coupon deducted into account, but the fee and total are not.
What is the relative sort-order of ot_coupon when comparing to the ot_shipping and ot_tax?

19 May 2021, 1:37 PM
#1689
spanky avatar

spanky

New Zenner

Join Date:
May 2021
Location:
New York
Posts:
16
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I tried to reply with this but it appears to have not gone through? See the image attached.

Attachment 19581

19 May 2021, 2:16 PM
#1690
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

Spanky:

I was advised by diptimoy to post here, but currently our coupons are still not being calculated properly. The last bit of help you gave me to edit the code in the editorders plugin worked well. Was wondering if there's something else I can do to fix this. Basically, the tax is taking the subtotal with the coupon deducted into account, but the fee and total are not.

spanky, just so i am clear, when a customer enters a coupon on the store front, does ZC calculate the coupon correctly?

and then if you are in the admin section using EO, it no longer calculates it correctly?

does the order you are using have products on it that are NOT applicable to the coupon?

in my testing, i have found the ot_coupon module processes differently when using EO then it does when on the storefront.

you previously stated you were using v157c. you can try commenting out line 676 as indicated here:

https://github.com/zencart/zencart/blob/3e0eceacccf1faf75d84d9fea8d1dde5fdf7aa2d/includes/modules/order_total/ot_coupon.php#L674-L677

but i would double check that the coupon works on both the storefront and on the admin using EO. if it now works using EO but is incorrect on the storefront, we can add some additional code to address that situation.

if that change does not work, i will just crawl back into the hole from which i came.

best.

19 May 2021, 4:11 PM
#1691
spanky avatar

spanky

New Zenner

Join Date:
May 2021
Location:
New York
Posts:
16
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

So, I have yet to attempt the fix you mentioned but conducted another test just to be sure, and I get the same incorrect values both in the store front and back end. Let me break it down to try and make it clear:

So first off - I don't know if this is normal behavior or not, but I can never actually see the discount reflected in the subtotal. The subtotal always shows as what it is without the discount, and then after shows whatever the discount amount comes out to be.

So I have the following order with the following values after the coupon:

Subtotal: 202.40
Discount: 20.24 (10%)
Shipping: 38.50
Fee 8.43
Tax: 18.62
Total: 247.71

Now, again to clarify, that 202.40 is the same before and after the coupon is applied. If you do the math, you'll see that the fee is calculated by adding the shipping and unmodified subtotal together and multiplying by 3.5%

The sales tax, however, is subtracting 20.24 from 202.40, then adding that to the shipping and (incorrect) fee, then multiplying the sum by 8.125%, which is correct (other then the fact that the fee is incorrect).

I asked diptimoy to implement the fix you mentioned so I can do some more testing, but to be clear, these results are both on the storefront and back end.

19 May 2021, 5:14 PM
#1692
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Spanky:

I tried to reply with this but it appears to have not gone through? See the image attached.

Attachment 19581
I'll note that the ot_coupon's sort-order causes its calculations to be performed prior to that of ot_shipping, so if your coupon(s) include free-shipping, the associated order's calculations will be off.

16 Jun 2021, 12:57 PM
#1693
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

I've just submitted v4.6.0 of Edit Orders for the Zen Cart moderators' review; I'll post back here when it's available for download.

 This release contains changes associated with the following GitHub issues:

#45: Remove Ty Package Tracker integration, now provided by a separate plugin.
#189: Drop support for Zen Cart versions prior to 1.5.6.
#190: Refactoring for zc156+ and restructuring.
#191: Eliminate product-price input fields when pricing method is Auto or AutoSpecials.
#193: Correct MySQL error when tax isn't set.
#195: Make EO more 'screen-reader friendly'.
#198: Correct order-update when an order-total's value is taxed.
#200: eo_get_new_product now returns all products and products_description fields.
#201: eo_get_country now returns its input value, if that value is an array.
#202: Correct PHP notice issued during product addition if ot_loworder_fee or ot_cod_fee is active.

17 Jun 2021, 4:11 PM
#1694
wsworx avatar

wsworx

Zen Follower

Join Date:
Jun 2012
Location:
California
Posts:
260
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

So I gave up, deleted my ZC installation and did a new installation of 1.5.7c.
Installed EO 4.6.0 but now I am getting the following error log when I attempt to access a customer order:

"Request URI: //index.php?cmd=edit_orders&page=1&oID=7952&action=edit,
#1 require(/home2/
/public_html/) called at [/home2//public_html//index.php:11]
--> PHP Warning: Use of undefined constant DISPLAY_PRICE_WITH_TAX_ADMIN - assumed 'DISPLAY_PRICE_WITH_TAX_ADMIN' (this will throw an Error in a future version of PHP) in /home2/
/public_html/******* on line 79.

Request URI: //index.php?cmd=edit_orders&page=1&oID=7952&action=edit, IP address: 107.204.159.118
#1 require(/home2/
/public_html/) called at [/home2//public_html//index.php:11]
--> PHP Warning: Use of undefined constant DISPLAY_PRICE_WITH_TAX - assumed 'DISPLAY_PRICE_WITH_TAX' (this will throw an Error in a future version of PHP) in /home2/
/public_html/******* on line 79.
"

I have looked but I cannot figure out which file these two constants would be defined in.
I know the settings can be changed in Cofiguration:Store but according to this error they are not defined at all
Can someone assist with this?

Thank You

17 Jun 2021, 4:34 PM
#1695
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

catalog/youradmin/includes/languages/english/edit_orders.php has the definitions, around line 76?

17 Jun 2021, 4:38 PM
#1696
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

wsworx:

So I gave up, deleted my ZC installation and did a new installation of 1.5.7c.
Installed EO 4.6.0 but now I am getting the following error log when I attempt to access a customer order:

"Request URI: //index.php?cmd=edit_orders&page=1&oID=7952&action=edit,
#1 require(/home2/
/public_html/) called at [/home2//public_html//index.php:11]
--> PHP Warning: Use of undefined constant DISPLAY_PRICE_WITH_TAX_ADMIN - assumed 'DISPLAY_PRICE_WITH_TAX_ADMIN' (this will throw an Error in a future version of PHP) in /home2/
/public_html/******* on line 79.

Request URI: //index.php?cmd=edit_orders&page=1&oID=7952&action=edit, IP address: 107.204.159.118
#1 require(/home2/
/public_html/) called at [/home2//public_html//index.php:11]
--> PHP Warning: Use of undefined constant DISPLAY_PRICE_WITH_TAX - assumed 'DISPLAY_PRICE_WITH_TAX' (this will throw an Error in a future version of PHP) in /home2/
/public_html/******* on line 79.
"

I have looked but I cannot figure out which file these two constants would be defined in.
I know the settings can be changed in Cofiguration:Store but according to this error they are not defined at all
Can someone assist with this?

Thank You

https://github.com/zencart/zencart/blob/v157/zc_install/sql/install/mysql_zencart.sql#L2350-L2351

it looks like you have a bad install of ZC 157c...

17 Jun 2021, 4:44 PM
#1698
wsworx avatar

wsworx

Zen Follower

Join Date:
Jun 2012
Location:
California
Posts:
260
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

marton_1:

catalog/youradmin/includes/languages/english/edit_orders.php has the definitions, around line 76?

I thought that as well but that is defining the following:

define('WARNING_DISPLAY_PRICE_WITH_TAX'

not

DISPLAY_PRICE_WITH_TAX

or

DISPLAY_PRICE_WITH_TAX_ADMIN

17 Jun 2021, 4:44 PM
#1699
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

marton_1:

catalog/youradmin/includes/languages/english/edit_orders.php has the definitions, around line 76?

the line to which you referring looks to define WARNING_DISPLAY_PRICE_WITH_TAX, based on values for DISPLAY_PRICE_WITH_TAX_ADMIN and DISPLAY_PRICE_WITH_TAX.

the vars in question look to be part of a base ZC install and should be in the configuration table of the zen-cart database. if they are not there, then something failed in the install of the base zen-cart.

without digging too deep, i would guess there are debug logs for the zc install and something failed due to the database perhaps being in strict mode. but alas, i am just guessing.

best.

17 Jun 2021, 4:53 PM
#1700
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,069
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

wsworx:

How is it that they are showing up in the My Store menu though?
Attachment 19636

carlwhat:

https://github.com/zencart/zencart/blob/v157/zc_install/sql/install/mysql_zencart.sql#L2350-L2351

it looks like you have a bad install of ZC 157c...
I'm agreeing with @carlwhat here. @wsworx, within your admin, append the following to the admin's base URL:

/index.php?cmd=configuration&gID=6

... which will bring up the 'hidden' modules settings. Be very, very careful since some of those changes are programmatic!

Find the setting Admin configuration_key shows and change its value to 1. Then head back to Configuration :: My Store and select the Display Product with Tax setting.

What configuration key is identified?