Comments (10)
Thanks for your useful feedback. Indeed, the tagged version is quite old. I would accept a pull request with such a change. Afterwards, I would tag a new version. Mind that we switched the namespace from Spranks
to CustomGento
though.
from customgento_configurabletierprices.
Great, one pull request coming up! :)
We're aware of the changed namespace, btw...
from customgento_configurabletierprices.
In the observer on line 58...
if ($item->getParentItem()) {
continue;
}
Is that used to filter out non-configurable products?
If so, isn't that already covered by...
if (Mage::registry('current_product') || !$product->isConfigurable()) {
return $this;
}
If not, please explain :)
from customgento_configurabletierprices.
It's been a while since I wrote this code :-)
Mind that we iterate over all visible quote items and then filter by $item->getParentItem()
. This has nothing to do with the current product. Hence, I guess both filters make sense.
from customgento_configurabletierprices.
Correct, I realized that right after posting my comment :)
I'm still a bit confused, though.
I have one simple product and two configurable products (t-shirts - medium and large).
I would have expected that for the two t-shirts, $item->getParentItem()
would return the parent configurable product, but then the code wouldn't work of course...
So I think my question is, what scenario is the if
statement covering? Bundled products?
(Hope I'm making sense)
from customgento_configurabletierprices.
Mind that $item->getParentItem()
returns a quote item and not a product. If you add a configurable product to the cart, there are two quote items - a parent and a child item. Simply add a configurable product to the cart and check the quote item table. This should make things a bit clearer.
from customgento_configurabletierprices.
Aha, makes sense, tnx!
from customgento_configurabletierprices.
Actually, checking for $item->getParentItem()
is not necessary since you're using getAllVisibleItems()
...
It's already being filtered out in Mage_Sales_Model_Quote
...
public function getAllVisibleItems()
{
$items = array();
foreach ($this->getItemsCollection() as $item) {
if (!$item->isDeleted() && !$item->getParentItemId()) {
$items[] = $item;
}
}
return $items;
}
You agree?
from customgento_configurabletierprices.
I think you should be right :-)
from customgento_configurabletierprices.
This will be fixed with #34.
from customgento_configurabletierprices.
Related Issues (20)
- Wrong Price Display On Detail Page
- Configurable Tier Prices with different prices HOT 4
- Get Error When clicking on "Configurable Tier Prices" HOT 7
- Tier Prices on Configurable Product Page HOT 1
- Options with Fixed Price Producing Wrong Unit Price HOT 5
- Module not working HOT 2
- Configurable products HOT 7
- My Magento store ignore this extension! HOT 1
- Group Pricing HOT 5
- Module not working with currency switch for configurable tier price product HOT 15
- Bad cart total HOT 1
- only simple products are taken in account HOT 2
- Configurable Prices Do Not Work in Admin HOT 6
- Ability to Use Simple Price and Not Configurable HOT 2
- Configurable Tier Price HOT 6
- Doesn't work for 1.9.3.2 HOT 3
- If I am on the cart and save a product in the admin that is in cart, I get a nested loop HOT 3
- Implement Test Methods For Admin Pricing
- Mage_Core_Exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customgento_configurabletierprices.