-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
1.5.7 New Installation with upgraded database from 1.5.6
PHP7.4
Attachment 19262
The twitch Hidden Model has been removed for now, the list is an image not actual typing, but all other plugins are installed and functioning
When I update the prices of the order and click "Update" the price stay the same.
I enabled debugging for one attempt at changing prices but the log is too long to post and I cannot figure out how to attach a .txt file as the system just keeps telling me it is an invalid file. So I posted the portion of the log pertaining to the change of pricing.
I have removed the beginning of the URL for security
Your assistance would be greatly appreciated.
Code:
============================================================
= Creating display of Order Product #31725
============================================================
Product Details:
{"qty":1,"id":"1740",
"orders_products_id":"31725",
"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"model":"Varies, See List on item page",
"tax":"0.0000",
"price":"229.9900",
"final_price":"229.9900",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0,"attributes":[{"option":"Big Dog Model",
"value":"Ridgeback",
"option_id":"28",
"value_id":"98",
"prefix":"+",
"price":"0.0000",
"product_attribute_is_free":1}]}
Options ID #28
Product Attribute:
["3617"]
Options Info:
{"options":{"1469":"Boxer",
"1470":"Bulldog",
"1471":"Chopper",
"1472":"Mastiff",
"1473":"Pitbull",
"1474":"Ridgeback"},"name":"Big Dog Model",
"type":"0",
"length":"32",
"size":"32",
"rows":"5"}
2020-10-27 17:56:34, Edit Orders entered (4.5.3) action (update_order)
Enabled Order Totals: ot_subtotal.php;ot_onetime_discount.php;ot_shipping.php;ot_tax.php;ot_loworderfee.php;ot_total.php
getOrderInfo(update_order), on entry: Called by ***/edit_orders.php on line #326
Subtotal: (not set), Shipping: (not set), Shipping Tax-Rate: (not set), Shipping Tax-Description: (not set), Shipping Tax: (not set), Tax: 0.0000, Total: 788.2900, Tax Groups: {"0.0000":"1"}
$_SESSION['shipping']: (not set)
Order Totals
ot_subtotal. Text: $779.99, Value: 779.9900
ot_shipping. Text: $8.30, Value: 8.3000
ot_total. Text: $788.29, Value: 788.2900
getProductTaxes(Tax)
{"products_tax_class_id":"1"}{"qty":1,"id":"1932","orders_products_id":"31724","name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2","model":"000-00005-8Cv2","tax":"0.0000","price":"550.0000","final_price":"550.0000","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0","products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0}
getProductTaxes, returning 0.
getProductTaxes(Tax)
{"products_tax_class_id":"0"}{"qty":1,"id":"1740","orders_products_id":"31725","name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG","model":"Varies, See List on item page","tax":"0.0000","price":"229.9900","final_price":"229.9900","onetime_charges":"0.0000","products_priced_by_attribute":"0","product_is_free":"0","products_discount_type":"0","products_discount_type_from":"0","products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0,"attributes":[{"option":"Big Dog Model","value":"Ridgeback","option_id":"28","value_id":"98","prefix":"+","price":"0.0000","product_attribute_is_free":1}]}
getProductTaxes, returning 0.
getOrderInfo(update_order), on exit:
Subtotal: 779.99, Shipping: (not set), Shipping Tax-Rate: (not set), Shipping Tax-Description: (not set), Shipping Tax: (not set), Tax: 0.0000, Total: 788.2900, Tax Groups: {"Tax":0}
$_SESSION['shipping']: (not set)
Order Totals
ot_subtotal. Text: $779.99, Value: 779.9900
ot_shipping. Text: $8.30, Value: 8.3000
ot_total. Text: $788.29, Value: 788.2900
Order Subtotal: 779.99
Order Totals
ot_subtotal. Text: $779.99, Value: 779.9900
ot_shipping. Text: $8.30, Value: 8.3000
ot_total. Text: $788.29, Value: 788.2900
Order Tax (total): 0.0000
Order Tax Groups:
{"Tax":0}
eoInitializeShipping(7489, update_order), on entry:
Subtotal: 0, Shipping: 0, Shipping Tax-Rate: (not set), Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 0, Tax Groups: {"Tax":0}
$_SESSION['shipping']: (not set)
Order Totals
initializeShippingCostFromPostedValue, ot_shipping: {"code":"ot_shipping","shipping_module":"usps","title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","value":"8.3000"}, shipping cost: 8.3.
calculateOrderShippingTax returning 0, rate = '0.0000', cost = 8.3.
eoInitializeShipping(7489, update_order), on exit:
Subtotal: 0, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 0, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
Requested Products:
{"31724":{"qty":"1",
"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":"0.0",
"final_price":"495.00"},"31725":{"qty":"1",
"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"onetime_charges":"0.0000",
"attr":{"28":{"value":"1474",
"type":0}},"model":"Varies, See List on item page",
"tax":"0.0",
"final_price":"206.99"}}
Products in Original Order:
[{"qty":1,"id":"1932",
"orders_products_id":"31724",
"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":"0.0000",
"price":"550.0000",
"final_price":"550.0000",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0},
{"qty":1,"id":"1740",
"orders_products_id":"31725",
"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"model":"Varies, See List on item page",
"tax":"0.0000",
"price":"229.9900",
"final_price":"229.9900",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0,"attributes":[{"option":"Big Dog Model",
"value":"Ridgeback",
"option_id":"28",
"value_id":"98",
"prefix":"+",
"price":"0.0000",
"product_attribute_is_free":1}]}]
Order Product ID: 31724 Row ID: 0
Product in Request:
{"qty":1,"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":"0.0",
"final_price":"495.00"}
Old Product:
{"qty":1,"id":"1932",
"orders_products_id":"31724",
"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":"0.0000",
"price":"550.0000",
"final_price":"550.0000",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0}
Old Order Subtotal: 0
Old Order Totals: Old Tax (total): 0
Old Tax Groups:
{"Tax":0}
Removed Product Order Subtotal: 0
Removed Product Order Totals: Removed Product Tax (total): 0
Removed Product Tax Groups:
{"Tax":0}
eo_update_order_subtotal (1), taxes on entry. Called by ***/edit_orders.php on line #476
Subtotal: 0, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 0, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
getProductTaxes(Tax)
false{"qty":1,"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2","model":"000-00005-8Cv2","tax":0,"final_price":"550.0000","id":1932,"price":"550.0000","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"Tax","onetime_charges":0}
getProductTaxes, returning 0.
eo_update_order_subtotal, taxes on exit.
Subtotal: 550, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 558.3, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
Pricing was automatically calculated, without specials pricing.
Added Product:
{"qty":1,"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":0,"final_price":"550.0000",
"id":1932,"price":"550.0000",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_virtual":"0",
"product_is_always_free_shipping":"0",
"tax_description":"Tax",
"onetime_charges":0}
Added Product Order Subtotal: 550
Added Product Order Totals:Added Product Tax (total): 0
Added Product Tax Groups:
{"Tax":0}
Order Product ID: 31725 Row ID: 0
Product in Request:
{"qty":1,"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"onetime_charges":"0.0000",
"attr":{"28":{"value":"1474",
"type":0}},"model":"Varies, See List on item page",
"tax":"0.0",
"final_price":"206.99"}
Old Product:
{"qty":1,"id":"1740",
"orders_products_id":"31725",
"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"model":"Varies, See List on item page",
"tax":"0.0000",
"price":"229.9900",
"final_price":"229.9900",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0,"attributes":[{"option":"Big Dog Model",
"value":"Ridgeback",
"option_id":"28",
"value_id":"98",
"prefix":"+",
"price":"0.0000",
"product_attribute_is_free":1}]}
Old Order Subtotal: 550
Old Order Totals: Old Tax (total): 0
Old Tax Groups:
{"Tax":0}
Removed Product Order Subtotal: 550
Removed Product Order Totals: Removed Product Tax (total): 0
Removed Product Tax Groups:
{"Tax":0}
eo_get_new_product, adding attribute: {"value":"1474","type":0}, {"option_id":"28","value_id":"98","value":"Ridgeback"}
eo_update_order_subtotal (1), taxes on entry. Called by ***/edit_orders.php on line #476
Subtotal: 550, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 558.3, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
getProductTaxes(Tax)
false{"qty":1,"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG","onetime_charges":0,"model":"Varies, See List on item page","tax":0,"final_price":229.990000000000009094947017729282379150390625,"id":1740,"price":"229.9900","products_discount_type":"0","products_discount_type_from":"0","products_priced_by_attribute":"0","product_is_free":"0","products_virtual":"0","product_is_always_free_shipping":"0","tax_description":"Tax","attributes":[{"option_id":"28","value_id":"98","value":"Ridgeback"}]}
getProductTaxes, returning 0.
eo_update_order_subtotal, taxes on exit.
Subtotal: 779.99, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 788.29, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
Pricing was automatically calculated, without specials pricing.
Added Product:
{"qty":1,"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"onetime_charges":0,"model":"Varies, See List on item page",
"tax":0,"final_price":229.990000000000009094947017729282379150390625,"id":1740,"price":"229.9900",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_virtual":"0",
"product_is_always_free_shipping":"0",
"tax_description":"Tax",
"attributes":[{"option_id":"28",
"value_id":"98",
"value":"Ridgeback"}]}
Added Product Order Subtotal: 779.99
Added Product Order Totals:Added Product Tax (total): 0
Added Product Tax Groups:
{"Tax":0}
Updated Products in Order:
[{"qty":1,"name":"BIG DOG EHC 05 to 11 CARB OR EFI VERSION 2",
"model":"000-00005-8Cv2",
"tax":0,"final_price":"550.0000",
"id":1932,"price":"550.0000",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_virtual":"0",
"product_is_always_free_shipping":"0",
"tax_description":"Tax",
"onetime_charges":0,"stock_reduce":1},
{"qty":1,"name":"BACKBONE WIRE HARNESS MAIN 04 BIG DOG",
"onetime_charges":0,"model":"Varies, See List on item page",
"tax":0,"final_price":229.990000000000009094947017729282379150390625,"id":1740,"price":"229.9900",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_virtual":"0",
"product_is_always_free_shipping":"0",
"tax_description":"Tax",
"attributes":[{"option_id":"28",
"value_id":"98",
"value":"Ridgeback"}],"stock_reduce":1}]
Updated Products Order Totals:Updated Products Tax (total): 0
Updated Products Tax Groups:
{"Tax":0}
============================================================
= Processing Requested Updates to Order Totals
============================================================
Requested Order Totals:
[{"code":"ot_shipping",
"shipping_module":"usps",
"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"value":"8.3000"},
{"code":"ot_onetime_discount",
"title":"",
"value":"",
"shipping_module":"usps"},
{"code":"ot_tax",
"title":"",
"value":0}]
Starting Order Totals:Starting Tax (total): 0
Starting Tax Groups:
{"Tax":0}
eo_update_database_order_total: and_clause: (), found (0), {"code":"ot_shipping",
"shipping_module":"usps",
"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"value":8.300000000000000710542735760100185871124267578125,"text":"$8.30",
"sort_order":104}
eo_update_database_order_total: and_clause: (), found (1), {"code":"ot_onetime_discount",
"title":"",
"value":0,"shipping_module":"usps",
"text":"$0.00",
"sort_order":102}
eo_update_database_order_total: and_clause: (), found (1), {"code":"ot_tax",
"title":"",
"value":0,"text":"$0.00",
"sort_order":"300"}
eo_update_database_order_totals, taxes/totals on entry. Called by ***/edit_orders.php on line #648
Subtotal: 779.99, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: (not set), Shipping Tax: 0, Tax: 0, Total: 788.29, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
ot_shipping. Text: $8.30, Value: 8.3
ot_onetime_discount. Text: $0.00, Value: 0
ot_tax. Text: $0.00, Value: 0
Checking taxes for ot_onetime_discount: Tax class (MODULE_ORDER_TOTAL_ONETIME_DISCOUNT_TAX_CLASS:), 0
eo_update_database_order_totals, after adjustments: {"order_id":7489,"currency":"USD",
"currency_value":"1.000000",
"payment_method":"Check\/Money Order",
"payment_module_code":"moneyorder",
"shipping_method":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"shipping_module_code":"usps",
"coupon_code":"",
"cc_type":"",
"cc_owner":"",
"cc_number":"",
"cc_cvv":null,"cc_expires":"",
"date_purchased":"2020-10-27 17:36:39",
"orders_status":"1",
"total":788.2899999999999636202119290828704833984375,"tax":0,"last_modified":"2020-10-27 17:56:34",
"ip_address":"107.204.159.118 - 107.204.159.118",
"language_code":"en",
"tax_groups":{"Tax":0},"subtotal":779.990000000000009094947017729282379150390625,"shipping_cost":8.300000000000000710542735760100185871124267578125,"shipping_tax":0,"shipping_tax_rate":"0.0000"}
eoUpdateOrderShippingTax(, 0.0000, Tax): {"0.0000":"Tax","0":"Tax"}
eo_update_database_order_totals, after process: {"order_id":7489,"currency":"USD",
"currency_value":"1.000000",
"payment_method":"Check\/Money Order",
"payment_module_code":"moneyorder",
"shipping_method":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"shipping_module_code":"usps",
"coupon_code":"",
"cc_type":"",
"cc_owner":"",
"cc_number":"",
"cc_cvv":null,"cc_expires":"",
"date_purchased":"2020-10-27 17:36:39",
"orders_status":"1",
"total":788.2899999999999636202119290828704833984375,"tax":0,"last_modified":"2020-10-27 17:56:34",
"ip_address":"107.204.159.118 - 107.204.159.118",
"language_code":"en",
"tax_groups":{"Tax":0},"subtotal":779.990000000000009094947017729282379150390625,"shipping_cost":8.300000000000000710542735760100185871124267578125,"shipping_tax":0,"shipping_tax_rate":"0.0000"}
[{"code":"ot_subtotal",
"title":"Sub-Total:",
"text":"$779.99",
"value":779.990000000000009094947017729282379150390625,"sort_order":"100"},
{"code":"ot_shipping",
"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day))::",
"text":"$8.30",
"value":8.300000000000000710542735760100185871124267578125,"sort_order":104},
{"code":"ot_total",
"title":"Total:",
"text":"$788.29",
"value":788.2899999999999636202119290828704833984375,"sort_order":"999"}]
[{"class":"ot_shipping",
"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"value":8.300000000000000710542735760100185871124267578125,"text":"$8.30",
"sort_order":104},
{"class":"ot_onetime_discount",
"title":"",
"value":0,"text":"$0.00",
"sort_order":102},
{"class":"ot_tax",
"title":"",
"value":0,"text":"$0.00",
"sort_order":"300"}]
eo_update_database_order_total: and_clause: (), found (0), {"code":"ot_subtotal",
"title":"Sub-Total:",
"text":"$779.99",
"value":779.990000000000009094947017729282379150390625,"sort_order":"100"}
eo_update_database_order_total: and_clause: (), found (0), {"code":"ot_shipping",
"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):",
"text":"$8.30",
"value":8.300000000000000710542735760100185871124267578125,"sort_order":104}
eo_update_database_order_total: and_clause: (), found (0), {"code":"ot_total",
"title":"Total:",
"text":"$788.29",
"value":788.2899999999999636202119290828704833984375,"sort_order":"999"}
Removing order-total, and-clause: title = '' OR `class` = 'ot_onetime_discount'
Removing order-total, and-clause: title = '' OR `class` = 'ot_tax'
eo_update_database_order_totals, removing tax groups NOT IN ('Tax:').
eo_update_database_order_totals, taxes on exit.
Subtotal: 779.99, Shipping: 8.3, Shipping Tax-Rate: 0.0000, Shipping Tax-Description: Tax, Shipping Tax: 0, Tax: 0, Total: 788.29, Tax Groups: {"Tax":0}
$_SESSION['shipping']: {"title":"United States Postal Service (2.50lbs) (Priority Mail\u2122 Small Flat Rate Box (2-day)):","id":"usps_","cost":8.300000000000000710542735760100185871124267578125}
Order Totals
ot_shipping. Text: $8.30, Value: 8.3
ot_onetime_discount. Text: $0.00, Value: 0
ot_tax. Text: $0.00, Value: 0
Order Totals
ot_shipping. Text: $8.30, Value: 8.3
ot_onetime_discount. Text: $0.00, Value: 0
ot_tax. Text: $0.00, Value: 0
Updated Tax (total): 0
Updated Tax Groups:
{"Tax":0}
============================================================
= Done Processing Requested Updates to the Order
============================================================
Final Subtotal: 779.99
Final Totals: ot_shipping. Text: $8.30, Value: 8.3
ot_onetime_discount. Text: $0.00, Value: 0
ot_tax. Text: $0.00, Value: 0
Final Tax (total): 0
Final Tax Groups:
{"Tax":0}
-
Re: Edit Orders v4.0 Support Thread
@wsworx, to manually apply pricing, you need to change EO's setting for the Product Price Calculation method.
Code:
Pricing was automatically calculated, without specials pricing.
-
Re: Edit Orders v4.0 Support Thread
Thank You for the response
I figured it had to be something I was or was not doing.
-
Re: Edit Orders v4.0 Support Thread
I've just submitted v4.5.4 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:
#171: Correct PHP notice during product addition.
#172: Correct PHP notices thrown by the ot_shipping constructor.
#173: Correct coloring of EO buttons/icons added to a zc157 version of the admin's Orders listing.
#177: Use role="table" for the EO address-block as an aid to screen readers (thanks, @jage9!).
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
I've just submitted v4.5.4 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:
#171: Correct PHP notice during product addition.
#172: Correct PHP notices thrown by the ot_shipping constructor.
#173: Correct coloring of EO buttons/icons added to a zc157 version of the admin's
Orders listing.
#177: Use role="table" for the EO address-block as an aid to screen readers (thanks,
@jage9!).
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1513
-
Edit Orders - not copying products_weight value
When a new product is added to an order the products_weight value is set to null. This occurs every time. The field "products_weight" is defined as float in the db.
Code:
============================================================
= Creating display of Order Product #19865
============================================================
Product Details:
{"qty":1,"id":"19",
"orders_products_id":"19865",
"name":"Clutch springs, Norton (set 3)",
"model":"EM608",
"tax":"10.0000",
"price":"13.6364",
"final_price":"13.6364",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0}
environment Dev: Zen Cart 157a; Apache 2.4.46; PHP 7.4.9; MySQL 5.7.31; Windows 10
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
OldNGrey
When a new product is added to an order the products_weight value is set to null. This occurs every time. The field "products_weight" is defined as float in the db.
Code:
============================================================
= Creating display of Order Product #19865
============================================================
Product Details:
{"qty":1,"id":"19",
"orders_products_id":"19865",
"name":"Clutch springs, Norton (set 3)",
"model":"EM608",
"tax":"10.0000",
"price":"13.6364",
"final_price":"13.6364",
"onetime_charges":"0.0000",
"products_priced_by_attribute":"0",
"product_is_free":"0",
"products_discount_type":"0",
"products_discount_type_from":"0",
"products_weight":null,"products_virtual":0,"product_is_always_free_shipping":0,"products_quantity_order_min":null,"products_quantity_order_units":null,"products_quantity_order_max":null,"products_quantity_mixed":0,"products_mixed_discount_quantity":0}
environment Dev: Zen Cart 157a; Apache 2.4.46; PHP 7.4.9; MySQL 5.7.31; Windows 10
... and it's been like that as far back as EO v4.1.5! Thanks for the report, I've opened this GitHub issue to track the required changes.
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
lat9
... and it's been like that as far back as EO v4.1.5! Thanks for the report, I've opened
this GitHub issue to track the required changes.
Ah, the underlying cause is that EO hasn't 'kept up' with the database schema changes introduced in zc156:
Code:
ALTER TABLE orders_products ADD products_weight float default NULL;
ALTER TABLE orders_products ADD products_virtual tinyint(1) default NULL;
ALTER TABLE orders_products ADD product_is_always_free_shipping tinyint(1) default NULL;
ALTER TABLE orders_products ADD products_quantity_order_min float default NULL;
ALTER TABLE orders_products ADD products_quantity_order_units float default NULL;
ALTER TABLE orders_products ADD products_quantity_order_max float default NULL;
ALTER TABLE orders_products ADD products_quantity_mixed tinyint(1) default NULL;
ALTER TABLE orders_products ADD products_mixed_discount_quantity tinyint(1) default NULL;
ALTER TABLE orders_products_download ADD products_attributes_id int(11) default NULL;
-
Re: Edit Orders - not copying products_weight value
Noting, too, that the orders table was also updated to include an order_weight field for zc156; that field's not updated on order-update/addition either.:(
-
Re: Edit Orders - not copying products_weight value
On my English language web site I see a nice picture of a wrench on the right side of the order page and when I click on it I jump into edit order mode.
On my foreign language site, I see the default text; the link to edit order mode works OK.
It is not a bug, just a nice to have if you ever have some spare time.
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
marton_1
On my English language web site I see a nice picture of a wrench on the right side of the order page and when I click on it I jump into edit order mode.
On my foreign language site, I see the default text; the link to edit order mode works OK.
It is not a bug, just a nice to have if you ever have some spare time.
There were some additional language constants added for 'english'; you'll need to carry them over to your 'alternate' language definitions.
-
Re: Edit Orders - not copying products_weight value
Here's an odd one. A client has been using Edit Orders for a few years. We recently upgraded the site to Zen Cart 1.5.7a and EO 4.5.3.
They used to be able to enter a negative number for product quantity and price. They did this to track returns (yikes). It no longer allows negative numbers. I did a quick edit and when I enter a negative for the product quantity, the product is removed from the order.
What's the logic look like for quantity and price? Meaning is there a feasible way to allow them to use negative numbers for both?
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
jeking
Here's an odd one. A client has been using Edit Orders for a few years. We recently upgraded the site to Zen Cart 1.5.7a and EO 4.5.3.
They used to be able to enter a negative number for product quantity and price. They did this to track returns (yikes). It no longer allows negative numbers. I did a quick edit and when I enter a negative for the product quantity, the product is removed from the order.
What's the logic look like for quantity and price? Meaning is there a feasible way to allow them to use negative numbers for both?
What Zen Cart/EO version was in use previously? I'd need more information to see if there's a way to allow this non-standard use to be included in the EO base processing.
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
lat9
What Zen Cart/EO version was in use previously? I'd need more information to see if there's a way to allow this non-standard use to be included in the EO base processing.
Zen Cart 1.5.6c
EO 4.5.3, so the same
-
Re: Edit Orders - not copying products_weight value
Quote:
Originally Posted by
jeking
Zen Cart 1.5.6c
EO 4.5.3, so the same
OK, if the same version of EO was working on zc156c, then there's something going on with the zc157 interactions.
-
Edit Orders - Total Price column is Total Net
Using Edit Orders 4.5.4 with zc 157b
The Total Price column is the total of the Net Price not the Gross Price for the row. The Sub-Total below the Total Price column is the Sub-Total of the Gross.Attachment 19307
Previous versions hadn't shown the Gross price. Is it possible to show the Total Price as the actual Gross total for the row?
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
OldNGrey
Using Edit Orders 4.5.4 with zc 157b
The Total Price column is the total of the Net Price not the Gross Price for the row. The Sub-Total below the Total Price column is the Sub-Total of the Gross.
Attachment 19307
Previous versions hadn't shown the Gross price. Is it possible to show the Total Price as the actual Gross total for the row?
Absolutely. I've created a GitHub issue (https://github.com/lat9/edit_orders/issues/180) to track the associated change. That'll be part of EO v4.5.5, coming real-soon-now.
-
Re: Edit Orders - Total Price column is Total Net
I've just submitted v4.5.5 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:
#178: Update order/product weight fields for zc156 and later when adding/updating.
#179: Update product's addition notification to include the SQL data array.
#180: Display "Total Price" as the gross price when the store displays prices with tax.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
I've just submitted v4.5.5 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:
#178: Update order/product weight fields for zc156 and later when adding/updating.
#179: Update product's addition notification to include the SQL data array.
#180: Display "Total Price" as the gross price when the store displays prices with tax.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1513
-
Re: Edit Orders - Total Price column is Total Net
hi,
i'm trying to understand the reset_totals checkbox. in what situation would want to use the checkbox v not to use the checkbox.
i'm getting some PHP notices when it is not checked, as somehow the orders_totals array has a missing element, ie there are 6 elements to the array, numbered from 0-6, with index 2 missing.
in addition, when i look at that array, there is an element for ot_tax and yet ot_tax is not enabled in my orders_totals modules. so is that somehow hard coded?
but i really would like to understand why that reset_totals is there.
thanks in advance.
-
Re: Edit Orders - Total Price column is Total Net
That "Reset Totals" checkbox is a way to kick EO in the arse and have it "do-over" the totals. Sometimes the order_total/order_tax element(s) in the base orders table get out-of-sync with the values recorded in the orders_total table.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
That "Reset Totals" checkbox is a way to kick EO in the arse and have it "do-over" the totals. Sometimes the order_total/order_tax element(s) in the base orders table get out-of-sync with the values recorded in the orders_total table.
so there is no harm with having it always checked, and ignoring it when not checked? ie the only penalty is a little processing time and perhaps some DB hits?
i have tracked down this bug to ot_tax. ot_tax is hard coded into EO. if you have a store that does NOT make use of the ot_tax orders total module, and you do not have the checkbox checked, you will get PHP notices as such:
Code:
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1499
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1499
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1500
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1500
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1505
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1505
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Undefined offset: 2 in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1509
[08:10:05 US/Great_State_of_Los_Angeles] PHP Notice: Trying to access array offset on value of type null in /admin/includes/functions/extra_functions/edit_orders_functions.php on line 1509
i believe i am using the latest version with an alpha or beta designation (call me a radical), and 1499 corresponds to here:
https://github.com/lat9/edit_orders/...ions.php#L1499
personally, i am not a fan of hard coding anything (despite doing it all the time); but if i can override that checkbox to have it always checked using your provided observer with no ill effect, that's fine with me.
thanks in advance!
-
Re: Edit Orders - Total Price column is Total Net
@carlwhat, I'll give that a look-see over the next week.
Update: What is it that's removing element [2] from that array without re-indexing?
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
@carlwhat, I'll give that a look-see over the next week.
Update: What is it that's removing element [2] from that array without re-indexing?
:thumbsup:
with regards to your update, i suppose that is the million $ question.
i have yet to dig in any further than i have already posted.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
carlwhat
:thumbsup:
with regards to your update, i suppose that is the million $ question.
i have yet to dig in any further than i have already posted.
Do I get the million or do I have to pay when you get that answer?:P
P.S. You're a radical!
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
P.S. You're a radical!
gee thanks.
this is the code that is removing the index:
PHP Code:
// Process the order totals
$order_totals = $GLOBALS['order_total_modules']->process();
in fact it is not removing it, it is re-arranging it.
it looks like the problem resides elsewhere; in the tax module that the client uses.
thanks for the help.
guess the million will now have to go unclaimed!
:P
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
carlwhat
gee thanks.
this is the code that is removing the index:
PHP Code:
// Process the order totals
$order_totals = $GLOBALS['order_total_modules']->process();
in fact it is not removing it, it is re-arranging it.
it looks like the problem resides elsewhere; in the tax module that the client uses.
thanks for the help.
guess the million will now have to go unclaimed!
:P
@carlwhat, I believe that I can provide a work-around for the issue you've identified (order_totals not re-indexed after removal). I could use a foreach loop instead of a for-loop to prevent those 'missing indices' notices.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
@carlwhat, I believe that I can provide a work-around for the issue you've identified (order_totals not re-indexed after removal). I could use a foreach loop instead of a for-loop to prevent those 'missing indices' notices.
@lat9, thanks for the help in pinpointing where the problem might be as well as thinking about solutions. i want to be clear about what is happening, prior to you making a determination as to what you may want to do.
i think i was incorrect in my expression of what the tax module did in my last post. it is not a rearrangement as i suggested; it removes its element (in all observed cases, that was element [2]), and then adds a new one to the end of the array. i have now modified that code to use the removed index if removed, or just add it to the end of the array if not removed (loving the new coalesce operator in php7+). that seems to have addressed the problem with no ill consequences that i have seen.
in addition, i am still unclear if one can safely remove the reset_totals checkbox from user choice with no ill consequences. i initially did that approach (using the observer which again addressed the issue), and again with no ill consequences. i understand a bit of a processing penalty; but i can easily live with that.
i also think there are shops out there that may experience this problem, that if it can be solved within EO, it would be of value. not every shop will have the IT techno expertise to figure this out, and as php progresses i think some of these notices could turn into warnings, then errors, etc.
i can test your solution later today if you would like. i would hesitate for you to commit to anything un-tested; and unless you are so inclined to set up your env to mimic this behavior, i could easily do it later today.
best.
-
Re: Edit Orders - Total Price column is Total Net
@lat9, tested and seems to work.
seems like a good approach.
thanks.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
carlwhat
@lat9, tested and seems to work.
seems like a good approach.
thanks.
... and thanks back to you for the validation. I thought that I'd gone through and changed those for() loops to foreach() wherever there wasn't a possible need to update a loop-element. I'll go through EO's processing to make sure that I've 'hit' all those!
-
Re: Edit Orders - Total Price column is Total Net
Just installed today on my zen cart 1.5.7 (1.5.7, not 1.5.7a or 1.5.7b). I found that the subtotal does not change at all no matter how I add or remove products. But after I removed all the products, and then add new products to the order, all the calculation becomes right. It seems that the products already in the order are ignored in calculation
Another problem is: when I use "reset totals prior to update", subtotal becomes 0, and does not change anymore, no matter how I add/remove products
Really strange...
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
markau
Just installed today on my zen cart 1.5.7 (1.5.7, not 1.5.7a or 1.5.7b). I found that the subtotal does not change at all no matter how I add or remove products. But after I removed all the products, and then add new products to the order, all the calculation becomes right. It seems that the products already in the order are ignored in calculation
Another problem is: when I use "reset totals prior to update", subtotal becomes 0, and does not change anymore, no matter how I add/remove products
Really strange...
Not so strange ... zc157 (no alpha-suffix) has a critical flaw for any plugin that makes use of the notify/observe infrastructure of Zen Cart (like Edit Orders). Update your zc157 code base to zc157b or, at a minimum, update to use the known bugs in the zc157 series (https://www.zen-cart.com/showthread....v1-5-7-series).
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
Not so strange ... zc157 (no alpha-suffix) has a critical flaw for any plugin that makes use of the notify/observe infrastructure of Zen Cart (like Edit Orders). Update your zc157 code base to zc157b or, at a minimum, update to use the known bugs in the zc157 series (
https://www.zen-cart.com/showthread....v1-5-7-series).
Many thanks for your instructions. I updated the minimum, no effect. I already installed too many plugins so full update would be too painful. I give up.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
markau
Many thanks for your instructions. I updated the minimum, no effect. I already installed too many plugins so full update would be too painful. I give up.
Any clues as to those 'other' plugins would certainly help in diagnosing your issue.
-
Re: Edit Orders - Total Price column is Total Net
Would it be possible to permit negative quantities to be used with the "Add Product" button, as a way of doing returns and exchanges?
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
swguy
Would it be possible to permit negative quantities to be used with the "Add Product" button, as a way of doing returns and exchanges?
You could create a change request on EO's GitHub repo (https://github.com/lat9/edit_orders), but since that's not a 'mainstream' usage it'll be a while before that change is incorporated into the EO distribution.
-
Re: Edit Orders - Total Price column is Total Net
-
Re: Edit Orders - Total Price column is Total Net
Hello!
I tried to Google to find something relevant in this thread but I didn't... so please let me ask here.
I finally updated my ZC to 1.5.6c with EO v4.5.5 + MariaDB 10.3.23.
I also updated to utf8mb4 to fix the problems with Emojis.
But when editing an order (just a comment + email sent) I got this:
Field 'updated_by' doesn't have a default value
Indeed orders_status_history.updated_by doesn't accept NULL (or default) in the Datase and EO SQL statement doesn't seem to populate 'updated_by' when making updates.
Code:
#5 zen_db_perform() called at [/var/www/XXX/admin-XXX/edit_orders.php:310]
--> PHP Fatal error: 1364:Field 'updated_by' doesn't have a default value :: insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('2477', '4', now(), '1', 'FOOBARFOOBAR') ==> (as called by) /var/www/XXX/admin-XXX/includes/functions/database.php on line 51 <== in /var/www/lespoisplumes.fr_v1.5.6c/includes/classes/db/mysql/query_factory.php on line 171.
Did I forget to update an important file or is it the expected behavior, and it only worked so far because MySQL (before MariaDB) was less strict?
I just did this to allow empty/NULL values and it works again.
Code:
ALTER TABLE `orders_status_history` CHANGE `updated_by` `updated_by` VARCHAR(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
Julien
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
generikz
Hello!
I tried to Google to find something relevant in this thread but I didn't... so please let me ask here.
I finally updated my ZC to 1.5.6c with EO v4.5.5 + MariaDB 10.3.23.
I also updated to utf8mb4 to fix the problems with Emojis.
But when editing an order (just a comment + email sent) I got this:
Field 'updated_by' doesn't have a default value
Indeed orders_status_history.updated_by doesn't accept NULL (or default) in the Datase and EO SQL statement doesn't seem to populate 'updated_by' when making updates.
Code:
#5 zen_db_perform() called at [/var/www/XXX/admin-XXX/edit_orders.php:310]
--> PHP Fatal error: 1364:Field 'updated_by' doesn't have a default value :: insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('2477', '4', now(), '1', 'FOOBARFOOBAR') ==> (as called by) /var/www/XXX/admin-XXX/includes/functions/database.php on line 51 <== in /var/www/lespoisplumes.fr_v1.5.6c/includes/classes/db/mysql/query_factory.php on line 171.
Did I forget to update an important file or is it the expected behavior, and it only worked so far because MySQL (before MariaDB) was less strict?
I just did this to allow empty/NULL values and it works again.
Code:
ALTER TABLE `orders_status_history` CHANGE `updated_by` `updated_by` VARCHAR(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
Julien
What's the site's history? In the 'original' osh_updated_by plugin and for the zc156+ upgrade, the SQL used to create the updated_by field has a default value:
Code:
ALTER TABLE orders_status_history ADD updated_by varchar(45) NOT NULL default '';
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
What's the site's history?
Oh it's an old dinosaur getting a transfusion now and then!
Quote:
v1.5.6c [2021-01-07 15:05:13] (Version Update 1.5.5->1.5.6c)
v1.5.5e [2017-03-19 17:11:48] (Version Update 1.5.4->1.5.5e)
v1.5.4 [2017-03-19 17:11:44] (Version Update 1.5.3->1.5.4)
v1.5.3 [2017-03-19 17:11:40] (Version Update 1.5.2->1.5.3)
v1.5.2 [2017-03-19 17:11:34] (Version Update 1.5.1->1.5.2)
v1.5.1 [2017-03-19 17:11:28] (Version Update 1.5.0->1.5.1)
v1.5.0 [2017-03-19 17:11:20] (Version Update 1.3.9->1.5.0)
v1.3.9h [2010-11-04 22:35:18] (Version Update 1.3.9g->1.3.9h)
v1.3.9g [2010-10-01 12:17:54] (Version Update 1.3.9f->1.3.9g)
v1.3.9f [2010-09-10 23:38:40] (Version Update 1.3.8->1.3.9f)
v1.3.8 [2009-07-04 20:22:05] (Fresh Installation)
I guess the database structure is obsolete and somehow ZC SQL updates missed that one while MySQL would fail gracefully when MariaDB just won't now?
Julien
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
generikz
Oh it's an old dinosaur getting a transfusion now and then!
I guess the database structure is obsolete and somehow ZC SQL updates missed that one while MySQL would fail gracefully when MariaDB just won't now?
Julien
Nope, I'm guessing that one of your now-obsolete plugins made that change to the database, but I'm having a hard time determining where the issue was sourced.
-
Re: Edit Orders - Total Price column is Total Net
Hello,
I'm trying to understand what is the reason behind edit orders removing the product and attributes from the database and assigning new ids? what is the reason for this behaver, is it to maintain sort order?
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
jacobsh
Hello,
I'm trying to understand what is the reason behind edit orders removing the product and attributes from the database and assigning new ids? what is the reason for this behaver, is it to maintain sort order?
wow. 1 post and already jumping into some nitty-gritty.... :thumbsup:
i have no good answers on that one; the current maintainer of the plugin has done an excellent job of straightening this plugin and making it workable. why the original author choose to do it that way is another question.... but addressing that issue seems to be a massive amount of refactoring and the potential for bugs is great...
there is a plugin to address some extra fields you may have added to the orders_products table here:
https://www.zen-cart.com/downloads.php?do=file&id=2292
i do not remember if i did something as well to address the attributes for products.
best.
-
Re: Edit Orders - Total Price column is Total Net
I'd asked the previous maintainer the same question and, unfortunately, didn't bookmark his response.
As @carlwhat indicated, the re-structuring of EO to not regenerate those orders_products_id is going to be a fairly complicated exercise, since there are plugins that currently 'plug into' EO to manage the product variants ... and keeping downward compatibility is one of my 'hot buttons'.
-
Re: Edit Orders - Total Price column is Total Net
thank you both of you! @carlwhat i'm working with zencart the whole day :smile:
-
Re: Edit Orders - Total Price column is Total Net
I've just submitted v4.5.6 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:
#182: Refactor to ensure that the price-calculation method is defined.
#183: Use foreach instead of for (where possible) in loops processing the updated order-totals.
#186: Correct missing constants in HTML email messages when updating orders (zc157+ interoperation).
Note: Subsequent releases of Edit Orders will support Zen Cart v1.5.7 (with applied bugfixes) and later only.
-
Re: Edit Orders - Total Price column is Total Net
Quote:
Originally Posted by
lat9
I've just submitted v4.5.6 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:
#182: Refactor to ensure that the price-calculation method is defined.
#183: Use foreach instead of for (where possible) in loops processing the updated order-totals.
#186: Correct missing constants in HTML email messages when updating orders (zc157+ interoperation).
Note: Subsequent releases of
Edit Orders will support Zen Cart v1.5.7 (with applied bugfixes) and later
only.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1513
-
Re: Edit Orders - Total Price column is Total Net
Sorry for the churn, but I've just submitted v4.5.7 of EO for the Zen Cart moderators' review and will post back here when it's available for download.
This release corrects GitHub issue #188 (Adding a product with a TEXT attribute causes a MySQL error).
-
Re: Edit Orders v4.0 Support Thread
"Sorry for the churn"...lol.
Your the last individual here who has to apologize for anything lat9. While some of the options with SuperOrders were nice to have, and a couple needed, most of us could not do without EditOrders which you have graciously stepped in and kept up for us. We need a link to donate to you.
-
Re: Edit Orders v4.0 Support Thread
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
swguy
Approved.
Thanks, @swguy, for the quick turn-around.
-
Re: Edit Orders v4.0 Support Thread
I'm looking to make changes to the way that EO renders the customer/billing/shipping addresses in support of screen readers. See this GitHub issue for details and progress: https://github.com/lat9/edit_orders/issues/175
Making that change will result in the dropping of the EDIT_ORDERS_ADDITIONAL_ADDRESS_ROWS notification, which allows customizations to add additional content to those addresses.
Other than VAT4EU (https://www.zen-cart.com/downloads.php?do=file&id=2164), I'm not aware of other plugins that make use of that notification. I'm willing to work with authors of other plugins that use that notification, just post back here with details.
-
Re: Edit Orders v4.0 Support Thread
If the desire is to keep the same visual format, I'm sure a way could be figured out to make it all work for screen readers while maintaining that functionality. I need to dive a bit further into the plugin to see how it is working.
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
jsquared
If the desire is to keep the same visual format, I'm sure a way could be figured out to make it all work for screen readers while maintaining that functionality. I need to dive a bit further into the plugin to see how it is working.
Thanks for that extra set of eyes, @jsquared!
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
After editing the math getting messed , can you please help us please . zencart version is 157c and edit order version is 457
the total is not sum of others ( no code added , default edit order running)
Attachment 19553
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
diptimoy
After editing the math getting messed , can you please help us please . zencart version is 157c and edit order version is 457
the total is not sum of others ( no code added , default edit order running)
Attachment 19553
is your processing and handling fee taxable? edit orders says that it is not, while your sales tax module says that it is.
(175 x 1.08125) + 5.25 = 194.47
180.25 * .08125 = 14.65
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
diptimoy
After editing the math getting messed , can you please help us please . zencart version is 157c and edit order version is 457
the total is not sum of others ( no code added , default edit order running)
Attachment 19553
Where did that "Processing and Handling Fee" order-total come from? I'm guessing that it's the culprit in the miscalculation.
-
4 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Here I am going to outline everything that is going on with the math calculated for orders on our site. Ever since zencart was updated to v1.5.7, there have been serious issues with how totals are being calculated. Our site uses the Edit Orders plugin, which has also been updated to the latest version.
First, allow me to explain how the math is supposed to work:
Obviously, each item in the cart has a cost per item, and the quantity of that item times its cost, gives you the total for that item. Ie. itemA cost 5.00, and the customer has 5x of them in the cart, therefor the total for that item is 5x5 = $25.00. As of now this seems to be working fine.
The Subtotal is then calculated by adding up all of the item totals in the cart. Again, this is working fine. Once subtotal is calculated, shipping gets calculated. I know that shipping is calculated differently for international, vs domestic. For all intents and purposes, this is working fine.
Finally, we have a processing fee, which is supposed to be 3.5% x (subtotal + shipping). For the sake of clarity, I will say that at the moment this 3.5% is only being applied to the subtotal. However, we have someone who is working on this, and it isn’t a massive deal at this moment. Going forward, I am going to present examples as if this is working correct, for the sake of showing how sales tax, and total are calculated for unedited orders.
The calculation for sales tax is also pretty straight forward: (subtotal + shipping + fee) x 8.125% = SalesTax. For a default order without any edits, this appears to be working fine.
Finally, as you may have guessed: Total = Subtotal + Shipping + Fee + SalesTax. Simple.
If a customer is to use a coupon, the math should be: Total = (subtotal – discount) + shipping + Fee + Sales Tax
I will demonstrate that for a default, unedited order, this is working fine (minus the fee issue I mentioned earlier). However, once I try to edit any aspect of an order, or apply a coupon, things become very hairy.
Default Unedited Order:
Attachment 19558
Lets break down the math in the above screenshot. I will use this order going forward to show the effects of coupons and edits.
We have two items, TestItemA which costs $5.00 and TestItemB which costs $25.00. The order contains 5 each.
TotalA = 5 x $5.00 = $25.00
TotalB = 5 x $25.00 = $125.00
Subtotal = TotalA + TotalB:
$25.00 + $125.00 = $150.00
Shipping is then calculated for US & Canada (domestic), and we get $28.50
Next, the Processing fee is calculated. In this case:
3.5% x 150.00 = $5.25
Next, Tax gets calculated:
Tax = (Subtotal + Shipping + Fee) x 8.125% -
(150 + 28.5 + 5.25) * 8.125% = $14.93
Finally, lets calculate the total:
Total = Subtotal + Shipping + Fee + SalesTax
150 + 28.5 + 5.25 + 14.93 = 198.68
So to summarize, although the fee is being applied incorrectly (as previously mentioned) The subtotal, tax, shipping, and total are all being calculated correctly for an unedited order.
Now, lets make a simple change to this using the Edit Order plugin:
Attachment 19559
Attachment 19560
In this case, I have simply reduced the shipping from $28.50, to $10.00. Lets now take a look at how the math adds up.
So at first glance, our subtotal appears to be fine:
125 + 20 = 150
Since as of now the fee is only being applied to the subtotal, it is unchanged by this.
Lets move on to Tax. Oddly, you can see that after editing the order, tax gets broken down into NY Sales tax, and Shipping Tax. However, if you add them together, they should add up fine.
First, lets just calculate what the total tax should be:
Tax = (Subtotal + Shipping + Fee) x 8.125%
(150 + 10 + 5.25) x 8.125% = $13.43
So just to verify, lets add the “shipping tax” and “sales tax” together:
12.62 + 0.81 = $13.43
So evidently, tax is still being calculated correctly here. So last but not least, we add it all together to get the total:
Total = Subtotal + Shipping + Fee + SalesTax
150 + 10.00 + 13.43 = ……..$173.43
However, in the above screenshot, the total we are getting from zencart is $178.25
Lets get the difference for the sake of trying to debug this down the road. We’ll call this the “Error Difference”
Error Difference = (Total On Zencart) – (Total We Calculated ourselves):
178.25 – 173.43 = $4.28
So somehow, even after doing all the other math correct, when it comes time to add everything up, we’re getting an unexplained error difference of $4.28.
For redundancy, and to see how the “Error Difference” changes, I’m going to edit the shipping for this same order again. This time ill raise it to 25.00
Attachment 19561
For the sake of keeping this simple, I will simply tell you that I calculated sales tax and everything up until Total is being calculated correctly. So lets try to get the total:
Total = Subtotal + Shipping + Fee + SalesTax
150 + 25 + 5.25 + 14.65 = 194.90
However, as you can see, in zencart our total is 194.47
In this case the error difference is much smaller:
194.90 – 194.47 = $0.43
This is what makes this so confusing. It would be one thing if I could say “oh its not taking sales tax into account, or its messing up the subtotal” but in this case, its literally just doing the addition and spitting out an incorrect number seemingly at random. Its like its saying 2 + 2 = 3.43 and 2 + 1 = 6. I'm hoping someone here can help as this has been a serious issue ever since the latest update of zencart.
-
Re: Edit Orders v4.0 Support Thread
Im just noticing that diptimoy posted as well, I'd like to clarify that he works with us and this is the same issue he has posted.
-
Re: Edit Orders v4.0 Support Thread
@Spanky, just like my response to @diptimoy, where did the code for that Handling Fee come from? I'm guessing that it's got some serious play in the miscalculations.
Also, are you using manual- or automatic-calculations of pricing?
-
Re: Edit Orders v4.0 Support Thread
why don't you post the code for the Processing and Handling Fee module? and specifically the process method.
the problem is there.
has nothing to do with edit orders, although everyone likes to blame edit orders (me included!!)
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Here is the order total module that handles the fee: Attachment 19562
My knowledge of zencart is pretty limited, so please advise if you can what to do from here
Also, I can't see my last response to you for some reason so I don't know if I said this, but I have tried both manual and automatic pricing. But it is suppose to be set to automatic.
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
carlwhat
why don't you post the code for the Processing and Handling Fee module? and specifically the process method.
the problem is there.
has nothing to do with edit orders, although everyone likes to blame edit orders (me included!!)
Herehow to processing configuration looks
Attachment 19563
-
Re: Edit Orders v4.0 Support Thread
... and as @carlwhat requested, how about posting the code associated with that order-total's process method?
-
Re: Edit Orders v4.0 Support Thread
-
Re: Edit Orders v4.0 Support Thread
Its way to many characters to post here, should I put it in a google doc?
-
Re: Edit Orders v4.0 Support Thread
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
Spanky
not the right code....
looking for something around here:
includes/modules/order_total/ot_processing_and_handling.php
the name is probably different. but that's the file we need to see...
-
Re: Edit Orders v4.0 Support Thread
-
Re: Edit Orders v4.0 Support Thread
-
Re: Edit Orders v4.0 Support Thread
my guess is extraorderfee
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
carlwhat
my guess is extraorderfee
Actually, it turns out that any taxable order-total exhibits this issue. See https://github.com/lat9/edit_orders/issues/198 for the upcoming changes for EO v4.6.0.
Any site experiencing this issue can correct via edit to /YOUR_ADMIN/includes/functions/extra_functions/edit_order_functions.php, removing (or commenting out) the highlighted lines below:
Code:
function eo_update_database_order_totals($oID)
{
global $db, $order, $eo;
// Load required modules for order totals if enabled
if (defined('MODULE_ORDER_TOTAL_INSTALLED') && !empty(MODULE_ORDER_TOTAL_INSTALLED)) {
$eo->eoLog(PHP_EOL . 'eo_update_database_order_totals, taxes/totals on entry. ' . $eo->eoFormatTaxInfoForLog(true), 'tax');
$eo->tax_updated = false;
$order->info['shipping_tax'] = 0;
// Load order totals.
require_once DIR_FS_CATALOG . DIR_WS_CLASSES . 'order_total.php';
$GLOBALS['order_total_modules'] = new order_total();
// Load the shopping cart class into the session
eo_shopping_cart();
// -----
// Cycle through the order-totals to see if any are currently taxed. If so, remove the
// tax from the current order in preparation for its recalculation.
//
foreach ($order->totals as $current_total) {
if (in_array($current_total['class'], ['ot_subtotal', 'ot_tax', 'ot_shipping', 'ot_total', 'ot_misc_cost'])) {
continue;
}
$current_total_tax = $eo->eoGetOrderTotalTax($oID, $current_total['class']);
$order->info['tax'] -= $current_total_tax;
}
// Reset the final total (include tax if not already tax-inc)
// This code causes the order totals to be correctly calculated.
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$order->info['total'] = $order->info['subtotal'] + $order->info['shipping_cost'];
} else {
$order->info['total'] = $order->info['subtotal'] + $order->info['tax'] + $order->info['shipping_cost'];
}
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
diptimoy
Quote:
Originally Posted by
Spanky
PHP Code:
function process() {
global $order, $currencies;
if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE == 'true') {
$pass = true;
if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE > 0) {
// bof: check zone and add extra fee
global $db;
$pass = false;
$check_flag = false;
// based on Delivery zone $order->delivery to use Payment zone change to $order->billing in two places
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$pass = false;
} else {
$pass = true;
}
// eof: check zone and add extra fee
}
if ($pass == true) {
//echo 'TEST EXTRA CHARGE PASS!';
$tax_address = zen_get_tax_locations();
$tax = zen_get_tax_rate(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
$tax_description = zen_get_tax_description(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
// calculate from flat fee or percentage
if (substr(MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE, -1) == '%') {
//$extra_order_fee = (($order->info['subtotal']+$order->info['shipping_cost'])* (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
$extra_order_fee = ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
} else {
$extra_order_fee = MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE;
}
$order->info['tax'] += zen_calculate_tax($extra_order_fee, $tax);
$order->info['tax_groups']["$tax_description"] += zen_calculate_tax($extra_order_fee, $tax);
$order->info['total'] += $extra_order_fee + zen_calculate_tax($extra_order_fee, $tax);
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$extra_order_fee += zen_calculate_tax($extra_order_fee, $tax);
}
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($extra_order_fee, true, $order->info['currency'], $order->info['currency_value']),
'value' => $extra_order_fee);
} else {
//echo 'TEST EXTRA CHARGE NO PASS!';
}
}
}
-
Re: Edit Orders v4.0 Support Thread
I actually don't have that file in that directory. Might it be named something else, or go somewhere else?
-
Re: Edit Orders v4.0 Support Thread
@spanky
The file is
ot_extraorderfee.php
Code:
<?php
/**
* ot_total order-total module
*
* @package orderTotal
* @copyright Copyright 2003-2012 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: ot_extraorderfee.php 6101 2012-10-19 10:30:22Z ajeh $
*/
class ot_extraorderfee {
var $title, $output;
function ot_extraorderfee() {
$this->code = 'ot_extraorderfee';
$this->title = MODULE_ORDER_TOTAL_EXTRAORDERFEE_TITLE;
$this->description = MODULE_ORDER_TOTAL_EXTRAORDERFEE_DESCRIPTION;
$this->sort_order = MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER;
$this->output = array();
}
function process() {
global $order, $currencies;
if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE == 'true') {
$pass = true;
if (MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE > 0) {
// bof: check zone and add extra fee
global $db;
$pass = false;
$check_flag = false;
// based on Delivery zone $order->delivery to use Payment zone change to $order->billing in two places
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
$check->MoveNext();
}
if ($check_flag == false) {
$pass = false;
} else {
$pass = true;
}
// eof: check zone and add extra fee
}
if ($pass == true) {
//echo 'TEST EXTRA CHARGE PASS!';
$tax_address = zen_get_tax_locations();
$tax = zen_get_tax_rate(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
$tax_description = zen_get_tax_description(MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS, $tax_address['country_id'], $tax_address['zone_id']);
// calculate from flat fee or percentage
if (substr(MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE, -1) == '%') {
//$extra_order_fee = (($order->info['subtotal']+$order->info['shipping_cost'])* (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
$extra_order_fee = ($order->info['subtotal'] * (MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE/100));
} else {
$extra_order_fee = MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE;
}
$order->info['tax'] += zen_calculate_tax($extra_order_fee, $tax);
$order->info['tax_groups']["$tax_description"] += zen_calculate_tax($extra_order_fee, $tax);
$order->info['total'] += $extra_order_fee + zen_calculate_tax($extra_order_fee, $tax);
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$extra_order_fee += zen_calculate_tax($extra_order_fee, $tax);
}
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies->format($extra_order_fee, true, $order->info['currency'], $order->info['currency_value']),
'value' => $extra_order_fee);
} else {
//echo 'TEST EXTRA CHARGE NO PASS!';
}
}
}
function check() {
global $db;
if (!isset($this->_check)) {
$check_query = "select configuration_value
from " . TABLE_CONFIGURATION . "
where configuration_key = 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS'";
$check_query = $db->Execute($check_query);
$this->_check = $check_query->RecordCount();
}
return $this->_check;
}
function keys() {
return array('MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE');
}
function install() {
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_SORT_ORDER', '450', 'Sort order of display.', '6', '2', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Allow Extra Order Fee', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ORDER_FEE', 'false', 'Do you want to allow Extra order fees?', '6', '3', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Extra Order Fee', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_FEE', '5.00', 'For Percentage Calculation - include a % Example: 10%<br />For a flat amount just enter the amount - Example: 5 for $5.00', '6', '5', '', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_TAX_CLASS', '0', 'Use the following tax class on the Extra order fee.', '6', '7', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Extra Charge Zone', 'MODULE_ORDER_TOTAL_EXTRAORDERFEE_ZONE', '0', 'If a zone is selected, only enable this Extra charge for that zone.', '6', '0', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
}
function remove() {
global $db;
$db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key like 'MODULE\_ORDER\_TOTAL\_EXTRAORDERFEE\_%'");
}
}
-
Re: Edit Orders v4.0 Support Thread
The file that he's saying to edit is what I mean
-
Re: Edit Orders v4.0 Support Thread
@Spanky and @diptimoy, please refer to my response in post #1672.
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
-
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?
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
-
Re: Edit Orders v4.0 Support Thread
Ah ok, this appears to be working good now. Thank you so much for the help
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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
-
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.
-
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.
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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?
-
1 Attachment(s)
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
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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/b....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.
-
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.
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
-
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.
-
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
-
Re: Edit Orders v4.0 Support Thread
catalog/youradmin/includes/languages/english/edit_orders.php has the definitions, around line 76?
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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/b...ql#L2350-L2351
it looks like you have a bad install of ZC 157c...
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
carlwhat
How is it that they are showing up in the My Store menu though?
Attachment 19636
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
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.
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
wsworx
How is it that they are showing up in the My Store menu though?
Attachment 19636
Quote:
Originally Posted by
carlwhat
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?
-
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
wsworx
How is it that they are showing up in the My Store menu though?
Attachment 19636
a few items:
- in your posting of the debug logs above, did you *** all of that stuff, or did the board do that? if it was you, only change the admin directory. else i (and others) need to make guesses about what file we are looking at.
- line 79 of the guessed file above, looks to be actually line 78 in the repo. so something looks to be modified. (red herring, though...)
- your posted image proves nothing to me. other than there are config values that have the description associated with those constants.
- you need to look at the database and see what those values are. i changed mine and i still see the same image that you posted.
- the image below shows that i changed the config value by adding a _2 to it.
- what is in the database for the 2 items that you posted?
Attachment 19637
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
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?
Configuration :: My Store and select the Display Product with Tax doesn't exist
Did you mean Configuration :: My Store and select the Display Price with Tax
-
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
carlwhat
a few items:
- in your posting of the debug logs above, did you *** all of that stuff, or did the board do that? if it was you, only change the admin directory. else i (and others) need to make guesses about what file we are looking at.
- line 79 of the guessed file above, looks to be actually line 78 in the repo. so something looks to be modified. (red herring, though...)
- your posted image proves nothing to me. other than there are config values that have the description associated with those constants.
- you need to look at the database and see what those values are. i changed mine and i still see the same image that you posted.
- the image below shows that i changed the config value by adding a _2 to it.
- what is in the database for the 2 items that you posted?
Attachment 19637
Okay, that seems to be the issue as I cannot find those two configuration keys in the configuration table.
I will work on that issue first and get back.
Thank You for steering me in the right direction folks.