Magento Forum - UK Magento Forum (Unofficial)

An unofficial but dedicated Magento Forum for Magento Users, Designers and Developers

in which file can control total price on magento2

A forum to discuss Magento development and coding

in which file can control total price on magento2

Postby daniel_w » Wed Jan 04, 2017 11:43 am

if the product is 1th-100th , each price of the product is 190€
if the product is 101th-150th , each price of the product is 250€
if the product is 151th-175th , each price of the product is 500€
if the product is 176th-200th , each price of the product is 1000€

the max-stock is: 200 , and if customer want to buy 120 products
the current total price should be: 20*190 + 50*250 + 25*500 + 25*1000 = 53800
and the unit price should be: 53800/120 = 448.3333333 ≈ 448.33

after doing the dev on Quote\Model\Quote\Address\Total\Subtotal.php protected function _initItem($address, $item)
the unit price is ok , but the total price still not ok , it becomes to 448.33*120=53799.60 , right algorithm should be :
20*190 + 50*250 + 25*500 + 25*1000 = 53800

but i can't find the file which to change this functionality , is any one can help me?

thank you for your reply.
Attachments
2.jpg
2.jpg (21.66 KiB) Viewed 265 times
1.jpg
1.jpg (8.64 KiB) Viewed 265 times
daniel_w
 
Posts: 1
Joined: Wed Jan 04, 2017 11:40 am

Return to Magento Developers

cron