Jump to content

Adding discount as amount (in BO) lead to error


Recommended Posts

Hi,

 

I use PS 1.5.6.2

I wanna edit the order of database in BO.

When add discount as percent, it will be fine.

When add discount as amount, it will throw error.

 

Tax is disabled in BO.

 

Here's the log file.

Array
(
[0] => Array
(
[file] => G:\wamp\www\prestashop\classes\Cart.php
[line] => 279
[function] => displayError
[class] => ToolsCore
[type] => ::
[args] => Array
(
)

)

[1] => Array
(
[file] => G:\wamp\www\prestashop\classes\order\Order.php
[line] => 660
[function] => getTaxesAverageUsed
[class] => CartCore
[type] => ::
[args] => Array
(
[0] => 829
)

)

[2] => Array
(
[file] => G:\wamp\www\prestashop\controllers\admin\AdminOrdersController.php
[line] => 1111
[function] => getTaxesAverageUsed
[class] => OrderCore
[object] => Order Object
(
[id_address_delivery] => 60
[id_address_invoice] => 60
[id_shop_group] => 1
[id_shop] => 1
[id_cart] => 829
[id_currency] => 1
[id_lang] => 1
[id_customer] => 221
[id_carrier] => 44
[current_state] => 5
[secure_key] => 7d9e654228cef23f8db5ee896a31e93e
[payment] => Bank Wire
[module] => bankwire
[conversion_rate] => 1.000000
[recyclable] => 0
[gift] => 0
[gift_message] =>
[mobile_theme] => 0
[shipping_number] =>
[total_discounts] => 26608.20
[total_discounts_tax_incl] => 26608.20
[total_discounts_tax_excl] => 26608.20
[total_paid] => 239473.80
[total_paid_tax_incl] => 239473.80
[total_paid_tax_excl] => 239473.80
[total_paid_real] => 532164.00
[total_products] => 250000.00
[total_products_wt] => 250000.00
[total_shipping] => 16082.00
[total_shipping_tax_incl] => 16082.00
[total_shipping_tax_excl] => 16082.00
[carrier_tax_rate] => 0.000
[total_wrapping] => 0.00
[total_wrapping_tax_incl] => 0.00
[total_wrapping_tax_excl] => 0.00
[invoice_number] => 6
[delivery_number] => 3
[invoice_date] => 2014-04-08 17:48:35
[delivery_date] => 2014-04-08 17:48:41
[valid] => 1
[date_add] => 2014-04-07 17:18:26
[date_upd] => 2014-07-14 20:08:21
[reference] => SGGZXGSON
[webserviceParameters:protected] => Array
(
[objectMethods] => Array
(
[add] => addWs
)

[_taxCalculationMethod:protected] => 0
[id] => 182
[id_shop_list] =>
[get_shop_from_context:protected] => 1
[table:protected] => orders
[identifier:protected] => id_order
[fieldsRequired:protected] => Array
(
[0] => id_address_delivery
[1] => id_address_invoice
[2] => id_cart
[3] => id_currency
[4] => id_lang
[5] => id_customer
[6] => id_carrier
[7] => payment
[8] => module
[9] => total_paid
[10] => total_paid_real
[11] => total_products
[12] => total_products_wt
[13] => conversion_rate
)

[fieldsSize:protected] => Array
(
)

[fieldsValidate:protected] => Array
(
[id_address_delivery] => isUnsignedId
[id_address_invoice] => isUnsignedId
[id_cart] => isUnsignedId
[id_currency] => isUnsignedId
[id_shop_group] => isUnsignedId
[id_shop] => isUnsignedId
[id_lang] => isUnsignedId
[id_customer] => isUnsignedId
[id_carrier] => isUnsignedId
[current_state] => isUnsignedId
[secure_key] => isMd5
[payment] => isGenericName
[module] => isModuleName
[recyclable] => isBool
[gift] => isBool
[gift_message] => isMessage
[mobile_theme] => isBool
[total_discounts] => isPrice
[total_discounts_tax_incl] => isPrice
[total_discounts_tax_excl] => isPrice
[total_paid] => isPrice
[total_paid_tax_incl] => isPrice
[total_paid_tax_excl] => isPrice
[total_paid_real] => isPrice
[total_products] => isPrice
[total_products_wt] => isPrice
[total_shipping] => isPrice
[total_shipping_tax_incl] => isPrice
[total_shipping_tax_excl] => isPrice
[carrier_tax_rate] => isFloat
[total_wrapping] => isPrice
[total_wrapping_tax_incl] => isPrice
[total_wrapping_tax_excl] => isPrice
[shipping_number] => isTrackingNumber
[conversion_rate] => isFloat
[date_add] => isDate
[date_upd] => isDate
)

[3] => Array
(
[file] => G:\wamp\www\prestashop\classes\controller\Controller.php
[line] => 158
[function] => postProcess
[class] => AdminOrdersControllerCore
[object] => AdminOrdersController Object
(
[toolbar_title] =>
[path] =>
[content] =>
[warnings] => Array
(
)

[informations] => Array
(
)

[confirmations] => Array
(
)

[shopShareDatas] => share_order
[_languages] => Array
(
)

[default_form_language] =>
[allow_employee_form_lang] =>
[layout] => layout.tpl
[meta_title:protected] =>
[template] => content.tpl
[table] => order
[list_id] => order
[identifier:protected] => id_order
[className] => Order
[tabAccess] => Array
(
[id_profile] => 1
[id_tab] => 31
[class_name] => AdminOrders
[view] => 1
[add] => 1
[edit] => 1
[delete] => 1
)

[id] => 31
[required_database] =>
[token] => 2505653ea9c5af162ca6cb67ae46c993
[shopLinkType] =>
[_defaultOrderBy:protected] => id_order
[_defaultOrderWay:protected] => ASC
[tpl_form_vars] => Array
(
)

[tpl_list_vars] => Array
(
)

[tpl_delete_link_vars] => Array
(
)

[tpl_option_vars] => Array
(
)

[tpl_view_vars] => Array
(
)

[tpl_required_fields_vars] => Array
(
)

[base_tpl_view] =>
[base_tpl_form] =>
[multiple_fieldsets] =>
[fields_value] =>
[errors] => Array
(
)

[list_simple_header:protected] =>
[fields_list:protected] => Array
(
[id_order] => Array
(
[title] => ID
[align] => center
[width] => 25
)

[reference] => Array
(
[title] => Reference
[align] => center
[width] => 65
)

[new] => Array
(
[title] => New
[width] => 25
[align] => center
[type] => bool
[tmpTableFilter] => 1
[icon] => Array
(
[0] => blank.gif
[1] => Array
(
[src] => note.png
[alt] => First customer order
)

)

[orderby] =>
)

[customer] => Array
(
[title] => Customer
[havingFilter] => 1
)

[total_paid_tax_incl] => Array
(
[title] => Total
[width] => 70
[align] => right
[prefix] =>
[suffix] => 
[type] => price
[currency] => 1
)

[payment] => Array
(
[title] => Payment:
[width] => 100
)

[osname] => Array
(
[title] => Status
[color] => color
[width] => 280
[type] => select
[list] => Array
(
[10] => Awaiting bank wire payment
[1] => Awaiting cheque payment
[11] => Awaiting PayPal payment
[6] => Canceled
[5] => Delivered
[13] => FastCheckout
[9] => On backorder
[2] => Payment accepted
[8] => Payment error
[12] => Payment remotely accepted
[3] => Preparation in progress
[7] => Refund
[4] => Shipped
[14] => Shipping blocked (Shopgate)
)

[filter_key] => os!id_order_state
[filter_type] => int
[order_key] => osname
)

[date_add] => Array
(
[title] => Date
[width] => 130
[align] => right
[type] => datetime
[filter_key] => a!date_add
)

[id_pdf] => Array
(
[title] => PDF
[width] => 35
[align] => center
[callback] => printPDFIcons
[orderby] =>
[search] =>
[remove_onclick] => 1
)

)

discount-error.zip

Edited by kyrios (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...