Unexpected getRebate() value
Posted: 05 Jul 2018, 11:28
I'm trying to get the rebate value of the variant of a selection product (its value is 5.00 in mshop_price) with :
Here's a part of the dump of my $product Object. Curiously the rebate is 0.00 (the returned value) in Aimeos\MShop\Price\Item\Standard but 5.00 (the expected value) in Aimeos\MShop\Common\Item\Base.
Is this a bug or do i miss something?
["values":"Aimeos\MShop\Price\Item\Standard":private]=> array(20) {
["price.id"]=> string(3) "213"
["price.siteid"]=> string(1) "1"
["price.typeid"]=> string(1) "3"
["price.currencyid"]=> string(3) "EUR"
["price.domain"]=> string(7) "product"
["price.label"]=> string(0) ""
["price.quantity"]=> string(1) "1"
["price.value"]=> string(4) "3.00"
["price.costs"]=> string(4) "1.00"
["price.rebate"]=> string(4) "0.00"
["price.taxrate"]=> string(4) "6.00"
["price.status"]=> string(1) "1"
["price.mtime"]=> string(19) "2018-06-27 18:40:02"
["price.editor"]=> string(22) "user"
["price.ctime"]=> string(19) "2018-05-26 00:20:50"
["price.type"]=> string(7) "default"
["price.typename"]=> string(8) "Standard"
["currencyid"]=> string(3) "EUR"
["price.taxflag"]=> int(0)
["price.tax"]=> string(6) "0.1800"
}
["bdata":"Aimeos\MShop\Common\Item\Base":private]=> array(19) {
["price.id"]=> string(3) "213"
["price.siteid"]=> string(1) "1"
["price.typeid"]=> string(1) "3"
["price.currencyid"]=> string(3) "EUR"
["price.domain"]=> string(7) "product"
["price.label"]=> string(0) ""
["price.quantity"]=> string(1) "1"
["price.value"]=> string(4) "3.00"
["price.costs"]=> string(4) "1.00"
["price.rebate"]=> string(4) "5.00"
["price.taxrate"]=> string(4) "6.00"
["price.status"]=> string(1) "1"
["price.mtime"]=> string(19) "2018-06-27 18:40:02"
["price.editor"]=> string(22) "user"
["price.ctime"]=> string(19) "2018-05-26 00:20:50"
["price.type"]=> string(7) "default"
["price.typename"]=> string(8) "Standard"
["currencyid"]=> string(3) "EUR"
["price.taxflag"]=> int(0)
}
Thank you a lot (as always)!
Code: Select all
$product->getPrice()->getRebate();
----
returned value : 0.00
Is this a bug or do i miss something?
["values":"Aimeos\MShop\Price\Item\Standard":private]=> array(20) {
["price.id"]=> string(3) "213"
["price.siteid"]=> string(1) "1"
["price.typeid"]=> string(1) "3"
["price.currencyid"]=> string(3) "EUR"
["price.domain"]=> string(7) "product"
["price.label"]=> string(0) ""
["price.quantity"]=> string(1) "1"
["price.value"]=> string(4) "3.00"
["price.costs"]=> string(4) "1.00"
["price.rebate"]=> string(4) "0.00"
["price.taxrate"]=> string(4) "6.00"
["price.status"]=> string(1) "1"
["price.mtime"]=> string(19) "2018-06-27 18:40:02"
["price.editor"]=> string(22) "user"
["price.ctime"]=> string(19) "2018-05-26 00:20:50"
["price.type"]=> string(7) "default"
["price.typename"]=> string(8) "Standard"
["currencyid"]=> string(3) "EUR"
["price.taxflag"]=> int(0)
["price.tax"]=> string(6) "0.1800"
}
["bdata":"Aimeos\MShop\Common\Item\Base":private]=> array(19) {
["price.id"]=> string(3) "213"
["price.siteid"]=> string(1) "1"
["price.typeid"]=> string(1) "3"
["price.currencyid"]=> string(3) "EUR"
["price.domain"]=> string(7) "product"
["price.label"]=> string(0) ""
["price.quantity"]=> string(1) "1"
["price.value"]=> string(4) "3.00"
["price.costs"]=> string(4) "1.00"
["price.rebate"]=> string(4) "5.00"
["price.taxrate"]=> string(4) "6.00"
["price.status"]=> string(1) "1"
["price.mtime"]=> string(19) "2018-06-27 18:40:02"
["price.editor"]=> string(22) "user"
["price.ctime"]=> string(19) "2018-05-26 00:20:50"
["price.type"]=> string(7) "default"
["price.typename"]=> string(8) "Standard"
["currencyid"]=> string(3) "EUR"
["price.taxflag"]=> int(0)
}
Thank you a lot (as always)!