dw250100785 / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

Deleted templates #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We need to check for deleted templates during data import.

1. Check if a template was deleted.

2. Add a new control to config page to select a category for products with
deleted templates or none or DELETE product.

3. When a template is deleted act according to the selection in #2 for all
products linked to that template:
a) assign to the selected category
b) do nothing, but remove the link between the product and template so
there are no errors
c) delete the product
Reflect the action in the log  on the screen.

Original issue reported on code.google.com by zetapri...@gmail.com on 26 Jan 2010 at 7:54

GoogleCodeExporter commented 9 years ago
The dropdown label "For deleted templates:"
2 options at the top "Delete product" and "Ignore"
Then add an options group "Move to category:"
and list all categories below

You need to insert a check if the category exists before actually moving 
products. If
it doesn't you output a warning in the import log saying "Deleted template: 
category
doesn't exist. Check configuration."
If a product was deleted output "Deleted template: product deleted."
If a product was moved output "Deleted template: product moved to "+ 
categoryname.
If no action taken "Deleted template: product unchanged."

Original comment by zetapri...@gmail.com on 29 Jan 2010 at 8:01

GoogleCodeExporter commented 9 years ago

Original comment by zetapri...@gmail.com on 29 Jan 2010 at 10:43

GoogleCodeExporter commented 9 years ago

Original comment by Anatoly....@gmail.com on 4 Feb 2010 at 6:21

GoogleCodeExporter commented 9 years ago
New code is in 1.7.0.0beta4 (installed in magedev)

Original comment by Anatoly....@gmail.com on 4 Feb 2010 at 2:19

GoogleCodeExporter commented 9 years ago
Uploaded a new template and created a product for it. Checked to confirm that 
the
template works and went back to the w2p site and deleted it.
Ran the "Template sync" profile and got a msg at the bottom of the log saying:

# Template for product 70586DC6-991D-4A3C-A000-E9E29D8C9EBE was removed
# Product 70586DC6-991D-4A3C-A000-E9E29D8C9EBE-rename-me was removed

Template was removed from the catalog page in the store as well as the list of
products in the Admin. Config option for deletion was set to "delete products"

Repeated the step with the config option set to "Move to real estate ads 
category"
Got this in the log:
# Template for product 4952EE40-88E9-414C-9F4E-4DC7A96F24AC was removed
# Product 4952EE40-88E9-414C-9F4E-4DC7A96F24AC-rename-me was moved to category 
Real
estate ads
Template was removed from its original category and I see it in the "Real 
estate ads"
catalog in the store. Tried it and got the msg "There was an err in generating 
or
receiving preview image, try again".

Original comment by agur...@gmail.com on 4 Feb 2010 at 5:50

GoogleCodeExporter commented 9 years ago
Ran the "Template Sync" profile after changing the config to "Ignore". Log msg 
was:
# Template for product 4952EE40-88E9-414C-9F4E-4DC7A96F24AC was removed
# Product 4952EE40-88E9-414C-9F4E-4DC7A96F24AC-rename-me was unlinked from the 
template

Template was still visible in the catalog in the store but it leads to a page 
with no
fields and a placeholder preview image.

Original comment by agur...@gmail.com on 4 Feb 2010 at 5:56

Attachments:

GoogleCodeExporter commented 9 years ago
Should the deletion settings apply for all old deleted templates?

Ex: I created and then deleted the template. After the deletion, I run the 
profile
with the config set to "Ignore" - unlink the template but leave it.
If I try to re-run the profile after that with the config set to "delete", the
product is not deleted. Probably because it was "dealt with" during last 
profile run.

If we set the current config as the action for all old deleted templates, it 
will
delete the ones we chose to move to a category as well.
If we leave as is, templates will not be deleted this way after a profile ran 
through
them.
This comment is flagged "More Work" because of this issue. The rest of the 
feature
works fine.

Original comment by agur...@gmail.com on 4 Feb 2010 at 6:26

GoogleCodeExporter commented 9 years ago
I guess once it was UNLINKED from a template it's too late to delete it through 
our
ext. There can be all sorts of products once linked and then unlinked. Doesn't 
mean
they need to be deleted.

Original comment by zetapri...@gmail.com on 5 Feb 2010 at 6:49

GoogleCodeExporter commented 9 years ago
Unlink products regardless of the setting, remove all references to the 
template from
the DB. There is no point to keep the data.

Original comment by zetapri...@gmail.com on 5 Feb 2010 at 6:56

GoogleCodeExporter commented 9 years ago
Bug is fixed in 1.7.0.0beta6 (installed on magedev)

Original comment by Anatoly....@gmail.com on 7 Feb 2010 at 9:21

GoogleCodeExporter commented 9 years ago

Original comment by agur...@gmail.com on 8 Feb 2010 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by zetapri...@gmail.com on 9 Feb 2010 at 6:35