Question

I have a store with two websites: B2C and B2B. In a product I setup a tier price fore the B2B website. This tier price shows up in the product page but not in cart.

If I set the tier price to all websites it works also in the cart. In catalog_product_index_tier_price and catalog_product_index_price it looks fine to me. Reindexing and clearing cache did not help.

How do I debug this?

Was it helpful?

Solution

I fixed this by changing the scope of the product attribute tier_price from globale to website.

Found this by debugging addTierPriceData() in app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php

If the attribute has global scope it ignores the webpage:

    /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */
    $attribute = $this->getAttribute('tier_price');
    if ($attribute->isScopeGlobal()) {
        $websiteId = 0;
    } else if ($this->getStoreId()) {
        $websiteId = Mage::app()->getStore($this->getStoreId())->getWebsiteId();
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top