bagisto / bagisto

Free and open source laravel eCommerce platform
https://bagisto.com
Open Software License 3.0
14.52k stars 2.15k forks source link

price does not change when options changed at configurable product with variant #9719

Closed digicatech closed 4 months ago

digicatech commented 5 months ago

Terms

Bagisto Version(s) affected

2.1.2

Issue Description

For products with more than one options (configurable product with variant), the correct price appears when the options are first selected. However, the price does not change when the options are changed.

Preconditions

Windows 11 Laragon 6 PHP 8.1.10 Apache 2.4.54 Mysql 8.0.30 and Linux 4.19.286-203.ELK.el7.x86_64 Apache 2.4.59 Mysql 5.7.23-23

Steps to reproduce

  1. Go to admin and add product with variants. Options should be two or more. And set prices different each other.
  2. Go to front and product page and select options. You will see price is true for selected options.
  3. Then change any option except the first option.
  4. You will see that the price is either not calculated or calculated incorrectly.

Expected Result

The warrant price selected in accordance with the options appears on the screen.

Actual Result

You will see that the price is either not calculated or calculated incorrectly.

Screenshots

image image image

Additional context

No response

digicatech commented 4 months ago

The problem is in the JavaScript code in this file packages\Webkul\Shop\src\Resources\views\products\view\types\configurable.blade.php

image

image

digicatech commented 4 months ago

The solution below works fine. But you should still take a look. (@ashishkumar-webkul )

image

ashishkumar-webkul commented 4 months ago

@digicatech I have checked and found that the issue is indeed appearing. Kindly review the video and confirm whether you are concerned about this case.

Video

https://github.com/bagisto/bagisto/assets/92721837/a8673944-180a-48e4-bd86-beb48bfc15cb

digicatech commented 4 months ago

@ashishkumar-webkul

Yes, this is exactly the problem. I mentioned the solution suggestion above.