0
votes

I just installed a fresh Magento 1.8.0.0 with sample data.

Now I create a "Catalog price rule" with ALL websites and customer groups, and add a SKU condition, and give it 50% discount.

The price does not work.

If I remove the condition, the price works perfect.

I have checked with $collection->count and this gives me 1, so the collection of rules are found, but not applied.

I have

  • pushed the "Apply rules" button several times.
  • Removed /var/cache* and cleared the cache in magento administration
  • Run reindex

But nothing works.

And as this is a totally fresh magento 1.8 no extensions are installed

[Edit] Added some images to show how the rule looks like http://imgur.com/a/4Ydq7

2

2 Answers

2
votes

It's a bug/feature in 1.8, Catalog Rules with conditions for attributes with Global scope do not work correcty. Took me days to figure it out.

This repository contains an workaround (which I haven't tried) and some more detail on the issue.

0
votes

If you're unfamiliar with bitbucket (as I was), here's the fix:

On line 95/96 of the file...

app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php

Change this

$productValues  = isset($this->_entityAttributeValues[$object->getId()])
            ? $this->_entityAttributeValues[$object->getId()] : array();

to this

$productValues  = isset($this->_entityAttributeValues[$object->getId()])
            ? $this->_entityAttributeValues[$object->getId()] : array($defaultStoreId => $object->getData($this->getAttribute()));

Fixed my issue in v1.8.1.