magento-configurable-simple icon indicating copy to clipboard operation
magento-configurable-simple copied to clipboard

Multistore special price issue

Open apantaleo opened this issue 8 years ago • 2 comments

Hello i've a multistore site on 1.9.2 if i put special price on admin storeid 0 it works correctly if i add special price only on single site it doesn't work on configurable product, i check the file /app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Product/Type/Configurable/Price.php and i think the problem is in it, it don't filter the storeid in collection. Can someone help me?

apantaleo avatar May 10 '16 10:05 apantaleo

i fix it

public function getChildProductWithLowestPrice($product, $priceType, $checkSalable=true)
{
    $childProducts = $this->getChildProducts($product, $checkSalable);
    if (count($childProducts) == 0) { #If config product has no children
        return false;
    }
    $minPrice = PHP_INT_MAX;
    $minProd = false;
    foreach($childProducts as $childProduct) {
            $pro=Mage::getModel('catalog/product')->load($childProduct->getId());
        if ($priceType == "finalPrice") {
            $thisPrice = $pro->getFinalPrice();
        } else {
            $thisPrice = $pro->getPrice();
        }
        if($thisPrice < $minPrice) {
            $minPrice = $thisPrice;
            $minProd = $pro;
        }
    }
    return $minProd;
}

apantaleo avatar May 10 '16 11:05 apantaleo

thank you so much, I very very need it

anhdung307 avatar Oct 02 '16 02:10 anhdung307