Timeline for Grouped Product Display a sum of all associated products stock
Current License: CC BY-SA 4.0
37 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Aug 21, 2019 at 14:36 | history | mod moved comments to chat | |||
| S Aug 21, 2019 at 14:36 | comment | added | Amit Bera♦ | Comments are not for extended discussion; this conversation has been moved to chat. | |
| Aug 21, 2019 at 12:22 | vote | accept | Ciprian Poiana | ||
| Aug 21, 2019 at 12:16 | comment | added | Enzo Perrotta | Solution updated | |
| Aug 21, 2019 at 12:15 | history | edited | Enzo Perrotta | CC BY-SA 4.0 | Completed the answer with solution for grouped and configurable products |
| Aug 21, 2019 at 12:02 | comment | added | Ciprian Poiana | hmm... it's a good idea and i do so, but... now in the grouped product for total stock is displayed corectly, but when do you enter to see the simple product (example click on the first one from list, same link) the simple product now it have also 999 stock. So in not quite a solution. --== :)) yes is a grouped product. | |
| Aug 21, 2019 at 12:01 | comment | added | Enzo Perrotta | Ok, I got it why it's not working.. That product is not a configurable one, it's a Grouped one. Give me a moment to rework the fix... | |
| Aug 21, 2019 at 11:57 | comment | added | Enzo Perrotta | Can you try writing an arbitrary text as the value of $productStock? Place something like <?php $productStock = 999; ?> Just above <?php if ($_product->isAvailable()): ?> and check if it's displayed | |
| Aug 21, 2019 at 11:52 | comment | added | Ciprian Poiana | hmm.. i dont know what to say, in this moment i use your code... and is no diference (Please see example at: magazinulupeste.ro/fir-guta-nylon-pescuit/…) | |
| Aug 21, 2019 at 11:44 | history | edited | Enzo Perrotta | CC BY-SA 4.0 | deleted 1744 characters in body. |
| Aug 21, 2019 at 11:44 | comment | added | Enzo Perrotta | Got it, however, I am going to remove your additions to my answer. I tested it locally and it works as expected. | |
| S Aug 21, 2019 at 11:42 | history | suggested | Ciprian Poiana | CC BY-SA 4.0 | the diferences is the word product from prouduct in the lines 4 - 5 |
| Aug 21, 2019 at 11:38 | review | Suggested edits | |||
| S Aug 21, 2019 at 11:42 | |||||
| Aug 21, 2019 at 11:31 | comment | added | Ciprian Poiana | i add the new code on your initial sugestion, because in can't add in a comment or inital post edit. | |
| S Aug 21, 2019 at 11:20 | history | suggested | Ciprian Poiana | CC BY-SA 4.0 | edited code |
| Aug 21, 2019 at 11:02 | review | Suggested edits | |||
| S Aug 21, 2019 at 11:20 | |||||
| Aug 21, 2019 at 10:50 | review | Suggested edits | |||
| Aug 21, 2019 at 10:54 | |||||
| Aug 21, 2019 at 10:46 | comment | added | Enzo Perrotta | You should be able to edit your question and add there the new code.. | |
| Aug 21, 2019 at 10:44 | comment | added | Ciprian Poiana | i cannot answer you with the full code... is another way to can talk with you, like messenger or team viewer? | |
| Aug 21, 2019 at 10:41 | comment | added | Ciprian Poiana | <?php if($_product->isSaleable()): ?> <br></br> <?php if ($this->displayProductStockStatus() && ($_product-> getTypeId() != Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)): ?> <?php if ($_product->isAvailable()): ?> | |
| Aug 21, 2019 at 10:34 | comment | added | Enzo Perrotta | Can you post the code you implemented after all my advices? | |
| Aug 21, 2019 at 10:33 | comment | added | Ciprian Poiana | i cannot... because they ask me 20 reputation to talk in chat... :))) and i'm new on network :( | |
| Aug 21, 2019 at 10:20 | comment | added | Enzo Perrotta | Let's continue in chat | |
| Aug 21, 2019 at 9:44 | comment | added | Ciprian Poiana | yes, i clear the magento cache and also the browser cache! :) | |
| Aug 21, 2019 at 9:34 | comment | added | Enzo Perrotta | Did you clear the cache? | |
| Aug 21, 2019 at 8:48 | comment | added | Ciprian Poiana | No, i'm sorry but still not work. The code is accepted, but don't modify nothing. | |
| Aug 20, 2019 at 14:14 | history | edited | Enzo Perrotta | CC BY-SA 4.0 | deleted 9 characters in body |
| Aug 20, 2019 at 14:13 | comment | added | Enzo Perrotta | I am sorry: $_product->getProductType() must be $_product->getTypeId() for both the solutions.. | |
| Aug 20, 2019 at 14:03 | comment | added | Ciprian Poiana | no, is not work. i try it both solutions and no change. Hmm... or i do something wrong... | |
| Aug 20, 2019 at 13:57 | comment | added | Enzo Perrotta | Also, the second snippet of code contained a mistake...I apologize, now it's fixed. Have a look if it works as intended | |
| Aug 20, 2019 at 13:56 | history | edited | Enzo Perrotta | CC BY-SA 4.0 | deleted 71 characters in body |
| Aug 20, 2019 at 13:54 | comment | added | Ciprian Poiana | i replace the code and is accepted by theme, but don't change anything. Is like in my initial photo. Any other idea? | |
| Aug 20, 2019 at 13:50 | history | edited | Enzo Perrotta | CC BY-SA 4.0 | added 25 characters in body |
| Aug 20, 2019 at 13:47 | comment | added | Enzo Perrotta | My fault. Try hiding the stock status by replacing <?php if ($this->displayProductStockStatus()): ?> with <?php if ($this->displayProductStockStatus() && ($_product->getProductType() != Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)): ?> | |
| Aug 20, 2019 at 13:44 | comment | added | Ciprian Poiana | also Enzo Perrotta, if i use the second code - nothing happen, it's like begin, no change. | |
| Aug 20, 2019 at 13:40 | comment | added | Ciprian Poiana | Enzo Perrotta - if i use: <?php if($_product->isSaleable() && ($_product->getProductType() != Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE): ?> the i will broke my theme, because disapear all butons and righr bar. | |
| Aug 20, 2019 at 13:35 | history | answered | Enzo Perrotta | CC BY-SA 4.0 |