Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

product->entity relation not saved #138

Open
arosenhagen opened this issue Oct 25, 2017 · 2 comments
Open

product->entity relation not saved #138

arosenhagen opened this issue Oct 25, 2017 · 2 comments

Comments

@arosenhagen
Copy link

arosenhagen commented Oct 25, 2017

I've created an extension with one entity and a relation to a product.

  1. When saving the product with a newly assigned entity the relation doesn't show up on the entity edit page under "Associated Products".
  2. When saving the entity with an "Associated Product" the relation show up on the product detail page in the corresponding attribute dropdown.

Anything I'm missing here?

@tzyganu
Copy link
Owner

tzyganu commented Nov 1, 2017

@arosenhagen Please send me the generated extension file at ultimate.module.creator@gmail.com THe file should be in var/modulecreator/package and it should be named as your module Namespace_Module.xml.
This will help me recreate your extension on my side and see what's wrong.
And sorry for the late response. I'm overbooked for now. Will try to answer as fast as I can.

@arosenhagen
Copy link
Author

no problem :-) I found the issue by myself.
The thing is, that the generation with UMC doesn't include the logic that properly saves the relationship between product and product-attribute (and vice versa).
Especially public function save{{Entity}}Relation(${{entity}}, $data)was problematic in that the product attribute wasn't set when saving the entity. I solved it by manually call Mage::getSingleton('catalog/product_action')->updateAttributes(...)in this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants