opencart / opencart

A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.

Home Page:https://www.opencart.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repeated addition of option price in admin order section.

digicatech opened this issue · comments

What version of OpenCart are you reporting this for?
Version 4.0.2.3

Describe the bug
When you go into Order details in the admin panel and press the Refresh button, 'option price' is added back to the total price. If the Confirm button is pressed, it is recorded in the database with the increased price.
The error is caused by line 340 and 341 in the system/library/cart/cart.php file.

To Reproduce
Steps to reproduce the behavior:

  1. Create an order with additional option price.
  2. Go to 'Panel'
  3. Click on 'Orders'
  4. Click On 'Action','View' button.
  5. Scroll down to 'Refresh' button and click.
  6. Option price will be added to "Total" price.

Expected behavior
'option_price' should not be added to the total price

Screenshots / Screen recordings
image

image

image

image

Server / Test environment (please complete the following information):

  • Local development (Laragon)
  • Windows 11
  • PHP version : 8.1.10
  • Apache version 2.4.54
  • Browser(s) tested with Edge

I commented the code here. It seems to be working. I'm still trying. I'm checking to see if anywhere else is affected.

image