I am creating a fixtures yaml file to create a sample product for my unit tests - using the EcomDev phpunit plugin for Magento.

The issue is that I need to set store specific values for price. I have managed to get this working fine for website specific values like so:

    - entity_id: 1
      type_id: simple
      sku: book
      name: Book
      short_description: Book
      description: Book
      url_key: book
      price: 12.99
      tax_class_id: 2
      status: 1
        uk: # this is the website code
          price: 12.99

However when I try with stores instead of websites at the bottom, the store specific values are not being set:

  artista_uk: # this store does exist in the database
    price: 16.99

The way I have tested this is by viewing the catalog_product_entity_decimal table and seeing if a price value appears next to the relevant store id.

The documentation can be found here:
Which does say you can interchange websites with stores

Any ideas would be great.


  • 1
    Are you sure that artista_uk is code of store not store_group? This should work – kuba_ceg Feb 4 '14 at 8:59

I don't think you can accomplish to do that because price in Magento is limited to global or website scope.

As far as I know, no different prices can be set on same product for different store views belonging to same website.

Kind regards

  • Additionally you have to set the config value to use the website scope, if you don't do this, the website price is ignored! See \Mage_Catalog_Model_Product_Attribute_Backend_Price::setScope – Fabian Blechschmidt Feb 12 '14 at 22:57
  • To Fabian's point, you can also set this inside the fixture: config: default/catalog/price/scope: 1 # Set price scope to website – Ariel Allon Nov 12 '14 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.