Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable price is not updated after adding a variant #9657

Closed
1 task done
ronaldmeran opened this issue Apr 15, 2024 · 4 comments
Closed
1 task done

Configurable price is not updated after adding a variant #9657

ronaldmeran opened this issue Apr 15, 2024 · 4 comments

Comments

@ronaldmeran
Copy link

ronaldmeran commented Apr 15, 2024

Terms

  • Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected

2.1.0

Issue Description

During the creation of a configurable product, after adding a variant the configurable price was not updated in the product_price_index. Only when you added a stock on the variant the configurable price in product_price_index is updated.

I believe the minimum/maximum price must be set in the configurable as long as you have created a variant not only when you added a stock.

Preconditions

  • We utilise only guest checkout, no user sign-in
  • We exclude products with zero prices in the listing page by checking if there's a guest price

Steps to reproduce

  1. Go to Catalog
  2. Click on Create Product
  3. Create a product with 2 variants
  4. The product is not shown in the FE
  5. The price is not updated in the table (see below screenshot)

Expected Result

The minimum/maximum price must be set in the configurable as long as you have created a variant not only when you added a stock.

Actual Result

There are no prices for the configurable after adding a variant.

Screenshots

Product Price Index table

Screenshot 2024-04-12 at 11 28 48 AM

Admin > Catalog screenshot

Screenshot 2024-04-15 at 11 56 49 AM

Additional context

I saw a similar problem here: #7216, but it seems like this is already fixed in a new version.

@ronaldmeran ronaldmeran added the Bug Something isn't working. label Apr 15, 2024
@ashishkumar-webkul ashishkumar-webkul added the In Testing When PR in testing. label Apr 15, 2024
@ashishkumar-webkul ashishkumar-webkul self-assigned this Apr 15, 2024
@ashishkumar-webkul
Copy link
Collaborator

@ronaldmeran

Thank you for your concern and query; we truly appreciate your efforts towards Bagisto.

I would love to learn more about the concern you've raised.

From what I understand, when creating a configurable product with variants, those variants are added with prices but not with inventory. As a result, on the shop front, we are unable to see the price. You are addressing this as an issue.

In case you have more information on the same subject, can you please help us with more in-depth details?

Thank You

@ashishkumar-webkul ashishkumar-webkul removed the In Testing When PR in testing. label Apr 16, 2024
@ronaldmeran
Copy link
Author

@ronaldmeran

Thank you for your concern and query; we truly appreciate your efforts towards Bagisto.

I would love to learn more about the concern you've raised.

From what I understand, when creating a configurable product with variants, those variants are added with prices but not with inventory. As a result, on the shop front, we are unable to see the price. You are addressing this as an issue.

In case you have more information on the same subject, can you please help us with more in-depth details?

Thank You

Hi ashishkumar-webkul,

Yes you are correct after adding variants on a configurable product, those variants are added with prices but not with inventory.

Context: on our shop front, we don’t show the configurable product with a zero price, that’s a filter we added on our product listing page. After creating those configurable products, we still show them in the listing page even if it is out of stock but it cannot be checked out in product detail page.

However those configurable products are not showing because they have zero price. And this is where I investigated on the database level and I observed that configurable product prices are only updated when you added a stock.

@ashishkumar-webkul ashishkumar-webkul added the Discussion When need discussion on some execution. label Apr 25, 2024
@ronaldmeran
Copy link
Author

Hi @ashishkumar-webkul, do you have any update on this one? do you need more details on this one?

@jitendra-webkul
Copy link
Member

jitendra-webkul commented May 8, 2024

@ronaldmeran Since the two variants lack inventories, they are not considered saleable. Therefore, we exclude them from calculating the prices of Configurable Products. Including non-saleable variants in these calculations can lead to numerous issues and confusion.

For example, imagine a configurable product with two variants priced at $10 and $9, respectively. If one of the $9 products is non-saleable, the configurable product's price should theoretically be $9. However, this isn't the case because you cannot purchase the $9 product.

On the Category Page, the product price will display as $9 for the Configurable product, while on the product page, it will show as $10.

@jitendra-webkul jitendra-webkul removed the Bug Something isn't working. label May 8, 2024
@devansh-webkul devansh-webkul removed the Discussion When need discussion on some execution. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants