UMC1.9
UMC1.9 copied to clipboard
added support for database file storage
@tzyganu , we are making use of your UMC in our e-commerce company a lot. So first of all, thanks for creating this awesome and very helpful resource! Today, I will file some pull requests of contributions that we would like to offer from our time working with the extension. The first contribution is support for database file storage. We tested it in production and, for us, it worked fine!
@mikeschaekermann Thanks for the kind words and the pull requests. I will review them as soon as possible and merge them if I don't find any issues.
I already took a look at the mass copy to store view aciton and I think something is wrong (I'm not exactly sure, I just want to get this by you). Does the massCopyToStoreViewAction
get generated for all entities flat entities, or just for those that have a relation to the store views? It seams to me that it will be generated for all entities. please try to create an entity that has the flag Enable by stores
(See this wiki page for details) set to 'No' and see if the massCopyToStoreViewAction
gets generated. (sorry for the duplicate e-mail...I used the wrong github account to comment the first time)
@tzyganu thanks for looking into the pull request so quickly. You're right. The code is not cleanly encapsulated for FLAT + NOT TREE entities only. This is true for both the preview feature and the mass copy feature. In the umc_source.xml I was looking for depend statements that would help me to further specify for what kinds of entities individual changes should be applied. The ones I found were:
- is_flat
- is_eav
- is_tree
- not_is_tree
- store
- allow_comment_by_store
- allow_comment
I think I will need your assistance here. How can I distinguish between "Enable by stores: YES/NO" entities in umc_source.xml?
@mikeschaekermann At a first glance I think that what you are looking for is is_flat
, not_is_tree
and store
.
So if you add an other file the <depend>
tag should have as child nodes all 3 elements listed above.
@tzyganu thank you! This should be sufficient in order to restrict the mass copy to store view feature to entites of type FLAT + NOT TREE + ENABLED BY STORE. For the preview feature, I would like to have two different files for ENABLED BY STORE: YES and NO. Hence, my question: is there an inverse option of store
, maybe not_store
?
@tzyganu for the preview feature, I would like to have two different files for ENABLED BY STORE: YES and NO. Is there an inverse option of store, e.g. something like not_store?
You can add a new method in Ultimate_ModuleCreator_Model_Entity
like this:
public function getNotStore()
{
return !$this->getStore();
}
then you can use the condition in xml like <not_store />
Oh nice! Thanks for that hint!
Actually, there already seems to be a method fulfilling that purpose:
/**
* check if the entity is not store related
*
* @access public
* @return bool
* @author Marius Strajeru <[email protected]>
*/
public function getNoStore()
{
return !$this->getStore();
}