uujgii / magento-w2p

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

Product creation defaults #568

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
One needs a degree in CS from MIT to configure a product in mage. It got to be 
simpler.

We can use defaults for most of the required fields.

Descriptions: leave blank
Price: zero
Tax: none
Website: assign to default if there is only 1 site and leave blank if there are 
multiple sites
Visibility: Catalog/Search
Enabled: true
Category: match to catalog name in w2p or leave blank

We have 2 profiles - do it for both.

Are there any other required attributes I missed?

Original issue reported on code.google.com by ad...@zetaprints.com on 30 May 2011 at 4:12

GoogleCodeExporter commented 9 years ago
So you go to a product you like and click copy - and you have it configured the 
way you like it.

Original comment by jamb...@gmail.com on 30 May 2011 at 5:44

GoogleCodeExporter commented 9 years ago
When you duplicate a product, you only need to fill in: sku, inventory data. 
Also you have to set status to enabled.

You can't be 100% certain which are required attributes, there might be 
extensions that add some more of them.

Original comment by jamb...@gmail.com on 30 May 2011 at 5:58

GoogleCodeExporter commented 9 years ago
OK, here is an alternative.
Can we specify a product to copy settings from?

Ideally, it would need to be specified somewhere in the profile, but not by XML 
editing.

Original comment by ad...@zetaprints.com on 30 May 2011 at 6:04

GoogleCodeExporter commented 9 years ago
Sorry I missed something, what profile? And the entire issue, you want to make 
product creation where exactly?

To duplicate a product you go to edit that product and click Duplicate button.

Original comment by jamb...@gmail.com on 30 May 2011 at 6:07

Attachments:

GoogleCodeExporter commented 9 years ago
We are talking about product creation profile for imported w2p templates.

Let's try adding a link/button to w2p tab in product details that sets the 
profile to copy all attributes, including custom attributes from this one and 
takes the user directly to the profile execution page. All they need to do is 
press that "Run profile in a pop-up" button.

w2p attributes should not be copied, I guess. Everything else - should.

Any better ideas?

Original comment by ad...@zetaprints.com on 30 May 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Everything else is a bit wide term - there are around 50 product attributes 
including images, custom layouts, special prices etc. Are you sure you want to 
copy all of them? Also w2p, fq and uploader attributes would also be present if 
extensions are installed.
So would be any other extensions attributes. I would prefer white list strategy 
on this instead.

Original comment by jamb...@gmail.com on 1 Jun 2011 at 7:27

GoogleCodeExporter commented 9 years ago
How about this for interface within w2p product tab?

Original comment by jamb...@gmail.com on 1 Jun 2011 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
A generic solution is preferred in this case.
Instead of copying all the attributes, why don't you duplicate a product and 
then change the w2p attributes?
They got to be written anyway.

Original comment by ad...@zetaprints.com on 1 Jun 2011 at 10:25

GoogleCodeExporter commented 9 years ago
that is possible, but we have 2  creation profiles - simple and virtual 
products. which one to use?

Original comment by jamb...@gmail.com on 1 Jun 2011 at 11:42

GoogleCodeExporter commented 9 years ago
We don't have 2 creation profiles, there's a general piece of code with 
parameter for product type.

Original comment by Anatoly....@gmail.com on 1 Jun 2011 at 12:16

GoogleCodeExporter commented 9 years ago
I mean we don't have a separate code for simple and virtual products :-)

Original comment by Anatoly....@gmail.com on 1 Jun 2011 at 12:22

GoogleCodeExporter commented 9 years ago
Yeah but you can run one or the other - so for this we need to decide which 
one. The code is the same but not the xml profile.

Original comment by jamb...@gmail.com on 1 Jun 2011 at 12:22

GoogleCodeExporter commented 9 years ago
I think implementation of solution is more important right now then choosing a 
profile :-) Pick up your favourite one :-)

Original comment by Anatoly....@gmail.com on 1 Jun 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Re. which profile - read the line before last in the initial issue post.

Original comment by ad...@zetaprints.com on 1 Jun 2011 at 6:25

GoogleCodeExporter commented 9 years ago
well I can't do it for both unless I use 2 buttons/links

Original comment by jamb...@gmail.com on 1 Jun 2011 at 6:56

GoogleCodeExporter commented 9 years ago
Can't you tell the type of the product and choose the corresponding profile?

Original comment by ad...@zetaprints.com on 1 Jun 2011 at 7:07

GoogleCodeExporter commented 9 years ago
Initial implementation is done.
Diffs:
http://code.google.com/p/magento-w2p/source/diff?spec=svn1665&old=1606&r=1665&fo
rmat=side&path=%2Fbranches%2Fw2p_petar%2Fapp%2Fcode%2Fcommunity%2FZetaPrints%2FW
ebToPrint%2FModel%2FConvert%2FMapper%2FProduct%2FCreating.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1661&r=1661&format=side
&path=/branches/w2p_petar/app/code/community/ZetaPrints/WebToPrint/Block/Catalog
/Product/Edit/Tab/Templates.php
http://code.google.com/p/magento-w2p/source/diff?spec=svn1661&r=1661&format=side
&path=/branches/w2p_petar/app/code/community/ZetaPrints/WebToPrint/Helper/Data.p
hp
http://code.google.com/p/magento-w2p/source/diff?spec=svn1661&r=1661&format=side
&path=/branches/w2p_petar/app/code/community/ZetaPrints/WebToPrint/controllers/C
atalog/ProductController.php

Changes are added locally to /mageimage
Usage:
After w2p templates are imported you can use any existing products as base 
product for dataflow product creation.
1. Go to details page of product of choice.
2. Go to web to print templates tab.
3. Click on 'Use this product as source' button. This will look up product type 
- simple, virtual etc. and try to load a profile with matching name 'ZetaPrints 
%s products creation' (%s is replaced with product type). Currently there are 
simple and virtual profiles so no other type of products can be used as base.
After loading the profile, its xml is modified and attribute src is added with 
value ID of base product. Profile is saved and browser redirected to profile 
page.
4. Go to Run profile tab and click 'Run profile in popup'
As before if product for a w2p template exists the loop skips and no product is 
created again.
If there is no src attribute then products are created as they were till now.
From base product are copied all attributes besides 'url_key', 'stock_item' and 
of course product id.
Also to allow for FQ and/or tier prices to be copied, original data has to be 
reset.

Features to test:
1. That profiles work with default settings.
2. That 'Use this product as source' button appears on 'Web-to-print templates' 
tab for simple and virtual products.
3. That 'Use this product as source' button does not appear on any other 
product type.
4. That clicking 'Use this product as source' button will end up on correct 
profile page and there will be 'src' attribute added to profile XML
5. That running profile with src attribute with valid product ID value will 
create products with exactly same attributes as base product excluding: Name, 
Description, Short Description, SKU, inventory settings (unless base product 
has same inventory settings), web to print template.
6. That running profile with src attribute with unvalid product ID will create 
products as if profile is ran without src attribute at all.

Original comment by jamb...@gmail.com on 2 Jun 2011 at 1:31

GoogleCodeExporter commented 9 years ago

Original comment by jamb...@gmail.com on 2 Jun 2011 at 1:31

GoogleCodeExporter commented 9 years ago
We overlooked the defaults for the case when there is no source product.

Use defaults for required attributes so that the newly created product is 
showing in the frontend anyway.

Multiple stores - don't use defaults
Multiple sites - don't use defaults

Category default - create a child "New templates" of root if there is one root 
or do not assign to a category at all if there are multiple roots.

Post a new issue about w2p admin config for using defaults (on by default).
Can we have a msg showing on upgrade to draw their attention to new features? 
Sounds like a totally separate issue. Post it and we'll look into it separate.

Probably post all this as new issues and leave this one to test. They are not 
holding up what;s been done by now.

Original comment by ad...@zetaprints.com on 7 Jun 2011 at 9:51

GoogleCodeExporter commented 9 years ago
Features from comment 19 added as separate issues #576 #577 #578

Original comment by jamb...@gmail.com on 8 Jun 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Hm.. I had to reinstall /mageimage/ during testing of other issues and just 
realized that you noted "Changes are added locally to /mageimage". 
Can you include this in a beta/alpha? Or just add the changes locally again so 
that I can test.

Original comment by agur...@gmail.com on 8 Jun 2011 at 2:30

GoogleCodeExporter commented 9 years ago
I don't want to mess with w2p releases, will include it first thing tomorrow. 

Original comment by jamb...@gmail.com on 8 Jun 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Added to mageimage. My account is not there so I cannot see if all works as I 
expect.
See if functionality described here works (copy from base product)

Original comment by jamb...@gmail.com on 10 Jun 2011 at 9:47

GoogleCodeExporter commented 9 years ago
Tested on /mageimage/
Magento ver. 1.5.0.1
web_to_print_store_incl_theme   1.9.1.0beta3 (beta)

1. 
- Deleted 3 products from the list of products
- Assigned one of the active products as a source product
- ran the profile
- got the three deleted products back with their attributes populated
- "Description" and "Short description" are left blank, as I see they should be 
from the issue description.
- Products do not appear in the front-end, though.

I still have to open each product and save it, without changing anything (if 
descriptions are already in there), just save to make it appear in the front 
end.

2. Products are missing preview images on category page (product_image.png).

Original comment by agur...@gmail.com on 10 Jun 2011 at 12:38

Attachments:

GoogleCodeExporter commented 9 years ago
Description and short description depend on template - as it is with default 
profile behavior. If there is corresponding data in template it will be used, 
if not they are blank.
The fact that they do not appear n front end is bad. Can you check if I have 
any sort of account on mageimage?

Do preview images appear in admin? This part should still be handled by 
templates.

Original comment by jamb...@gmail.com on 10 Jun 2011 at 1:00

GoogleCodeExporter commented 9 years ago
I just created your "jamby" admin account

Original comment by agur...@gmail.com on 10 Jun 2011 at 1:04

GoogleCodeExporter commented 9 years ago
Apparently for products to show in frontend they have to have all required 
attributes - such as description and short description. It seems that from 10 
products that are created with default values, only 2 have those.
Can you find a few templates with description and try to create them from base 
product?
Also the reason why templates with all attributes do not get displayed are 
indexes. I  should probably add this in the end of profile execution so that 
after products are created, the indexes are refreshed.
So if you create a few complete templates, could you go to index management and 
refresh them to see if I am right that product will appear after that?
Also since all other attributes are copied from base product, if base product 
image settings are not correct, then created products will have incorrect image 
settings too.
Image relations are not set in the profile, so I am not sure exactly how image 
relation works, but it can be investigated. 

Original comment by jamb...@gmail.com on 10 Jun 2011 at 1:41

GoogleCodeExporter commented 9 years ago
1. Added product descriptions to 2 of the products I used for testing. This 
doesn't seem to be the problem, though. From what I know about Magento, "Descr" 
and "Short descr." are required but are not show stoppers. Using the workaround 
(bulk editing products) one can make products available in the front-end 
without those two attributes.

Tried re-indexing, didn't help. Product appears if I open and just hit "Save" 
on prod details page. Ran the re-indexing to all indexes twice. Looks like 
something else is causing this.

2. Default preview images are not showing and we do need to find the problem 
there. Please investigate.

Original comment by agur...@gmail.com on 10 Jun 2011 at 3:08

GoogleCodeExporter commented 9 years ago
Guys, make sure we test on mage in PRODUCTION MODE, not dev mode again.

Original comment by ad...@zetaprints.com on 10 Jun 2011 at 10:27

GoogleCodeExporter commented 9 years ago
@atanas did you reindex after running the profile?

Original comment by jamb...@gmail.com on 13 Jun 2011 at 7:20

GoogleCodeExporter commented 9 years ago
@ com. 30:
Yes, twice.

Original comment by agur...@gmail.com on 20 Jun 2011 at 11:25

GoogleCodeExporter commented 9 years ago

Original comment by ad...@zetaprints.com on 5 Jul 2011 at 11:19

GoogleCodeExporter commented 9 years ago
Atanas, can we close this one or is there some unfinished business?

Original comment by ad...@zetaprints.com on 9 Nov 2011 at 12:13

GoogleCodeExporter commented 9 years ago
I've reinstalled /mageimage/ many times after the last update on this issue. 
Product creation defaults worked for me.

I would test again just for the sake of closing the issue but need to reinstall 
/mageimage/ for this. Whats the deal with our alpha releases on MagentoConnect? 
The last one in there id alpha10 and we're at alpha15.
How do I install the extension myself?

Original comment by agur...@gmail.com on 9 Nov 2011 at 12:53

GoogleCodeExporter commented 9 years ago
I uploaded latest beta and I was able to install it on /mageimage/ throw m-c

Original comment by Anatoly....@gmail.com on 9 Nov 2011 at 7:27

GoogleCodeExporter commented 9 years ago

Original comment by Anatoly....@gmail.com on 9 Nov 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Tested on /mageimage/
web_to_print_store_incl_theme   1.9.2.0beta15 (beta)

Original comment by agur...@gmail.com on 10 Nov 2011 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by ad...@zetaprints.com on 10 Nov 2011 at 6:13