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

Product price displayed as 0 in category page #20975

Closed
unlocomqx opened this issue Sep 14, 2020 · 9 comments · Fixed by #20964
Closed

Product price displayed as 0 in category page #20975

unlocomqx opened this issue Sep 14, 2020 · 9 comments · Fixed by #20964
Assignees
Labels
1.7.6.7 Affects versions 1.7.7.x Branch Bug Type: Bug Fixed Resolution: issue closed because fixed FO Category: Front Office Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Multistore Label: Which BO under menu is concerned Old Products Page Concerns the old product page PR available Solution: issue is being addressed
Milestone

Comments

@unlocomqx
Copy link
Contributor

unlocomqx commented Sep 14, 2020

Describe the bug

The product price is displayed incorrectly on the category page
The original price is not 0 but the displayed price is 0

Expected behavior

The product price should be displayed correctly

Steps to Reproduce

Edit by Khouloud
Steps to reproduce the issue:

  1. Enable multishop context
  2. create a new store
  3. Create a standard product in all shops
  4. select shop1, edit the last product created => generate combinations,
  5. change the combination by default
  6. Go to FO > Category page
  7. see error

https://drive.google.com/file/d/11FmNrvoC4VHVErmTlyWJlW7SjHqvKbum/view?usp=sharing
Steps to reproduce the behavior:

  1. Enable multishop
  2. Add a second shop
  3. Switch to second shop
  4. Having a product with attributes, delete all its attributes (or make it a "Simple product")
  5. Open the product category page, the price will be displayed as 0

Screenshots

Expected
localhost_tests_ps_multishop_attribute_en_3-clothes

Actual
localhost_tests_ps_multishop_attribute_second_en_3-clothes

Additional information

  • PrestaShop version: 1.7.6.7
  • PHP version: N/A
@prestashop-issue-bot
Copy link

Thanks for opening this issue! We will help you to keep its state consistent

@khouloudbelguith
Copy link
Contributor

Hi @unlocomqx,

Thanks for your report.
When I try this step Having a product with attributes, delete all its attributes, I have an exception in the console.
It is similar to this ticket
I tried with a standard product but I did not manage to reproduce the issue with PS1.7.6.7.
I attached a screen record
https://drive.google.com/file/d/1rUmOWMwB6oiPTaSt2yJMND8Sepe2PRd9/view?usp=sharing
Thanks to check and feedback.

@khouloudbelguith khouloudbelguith added 1.7.6.7 Affects versions Bug Type: Bug FO Category: Front Office Multistore Label: Which BO under menu is concerned NMI Status: issue needs more information Old Products Page Concerns the old product page PR available Solution: issue is being addressed labels Sep 14, 2020
@unlocomqx
Copy link
Contributor Author

Thank you for looking into this.
Please try making the product a simple product then save (instead of manually deleting the attributes)
I will try to reproduce #9664 (comment)

@khouloudbelguith
Copy link
Contributor

@unlocomqx,

Please try making the product a simple product then save (instead of manually deleting the attributes)

Yes, I tried with simple product & it is ok as recorded here:
https://drive.google.com/file/d/1rUmOWMwB6oiPTaSt2yJMND8Sepe2PRd9/view?usp=sharing

Thanks to check it.

@unlocomqx
Copy link
Contributor Author

I checked the standard product, it works well. But it's not related to this bug at all.
This bug is only related to products having attributes on one shop and no attributes on another.
On the shop where they don't have attributes, the price is wrong in the category page.

@khouloudbelguith
Copy link
Contributor

@unlocomqx,

I create a product with attributes on one shop and no attributes on another.
It is ok in my case with PS1.7.6.7.
I attached a new screen record
https://drive.google.com/file/d/1MZPV91l79oQipe1OPrzG3CKr4WSWdwDp/view?usp=sharing

Thanks to check it.

@unlocomqx
Copy link
Contributor Author

Change the default attribute on the first shop and then view the category on the second shop, you will see the issue
I was able to reproduce it again
image

@khouloudbelguith
Copy link
Contributor

@unlocomqx, thanks for your feedback.
I manage to reproduce the issue with PS1.7.6.7 and PS1.7.7.0beta2.
Steps to reproduce the issue:

  1. Enable multishop context
  2. create a new store
  3. Create a standard product in all shops
  4. select shop1, edit the last product created => generate combinations,
  5. change the combination by default
  6. Go to FO > Category page
  7. see error
    https://drive.google.com/file/d/11FmNrvoC4VHVErmTlyWJlW7SjHqvKbum/view?usp=sharing
    I’ll add this to the debug roadmap.

Thanks!

@khouloudbelguith khouloudbelguith added Ready Status: Issue is ready to be worked on 1.7.7.x Branch Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification and removed NMI Status: issue needs more information labels Sep 14, 2020
@unlocomqx
Copy link
Contributor Author

Thank you for your effort to reproduce it.
I made a PR which fixes this issue. #20964

@prestashop-issue-bot prestashop-issue-bot bot removed the Ready Status: Issue is ready to be worked on label Sep 28, 2020
@Progi1984 Progi1984 added this to the 1.7.8.0 milestone Sep 28, 2020
@Progi1984 Progi1984 added this to Not ready in PrestaShop 1.7.8.0 via automation Sep 28, 2020
@Progi1984 Progi1984 moved this from Not ready to Done in PrestaShop 1.7.8.0 Sep 28, 2020
@prestashop-issue-bot prestashop-issue-bot bot added the Fixed Resolution: issue closed because fixed label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.6.7 Affects versions 1.7.7.x Branch Bug Type: Bug Fixed Resolution: issue closed because fixed FO Category: Front Office Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Multistore Label: Which BO under menu is concerned Old Products Page Concerns the old product page PR available Solution: issue is being addressed
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants