prunycb / magento-w2p

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

Auto category creation #502

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I. Auto category creation
Problem:
Templates are sorted under catalogs in the w2p portal. A customer might have 2 
catalogs with 5 templates each. When these templates are imported into Magento, 
they are just piled up as 10 products. The customer needs to create the Magento 
categories and assign the products to them manually. This is a big problem for 
customers with lots of templates sorted under lots of catalogs.
Suggestions:
1. Add a feature to the "Product creation" profile to automatically create a 
Magento category and assign templates(products) in it. Category is named 
according to the Catalog name from which the template came.
2. Add a separate "Category creation" profile before the "Product creation" one 
to create the categories. Templates will be added to their corresponding 
categories as part of the "Product creation" profile.

II. Auto sub-category creation

Problem:
This is a sub-feature of feature I. In the w2p end, we also allow templates in 
catalogs to be grouped under categories.
Ex. 1 catalog has 6 templates and they are grouped in a category of 3 under the 
same catalog.
Solution:
W2p extension profiles also need to be able to create sub-categories.

Original issue reported on code.google.com by agur...@gmail.com on 29 Mar 2011 at 4:09

GoogleCodeExporter commented 9 years ago
I tend to favor "Product creation" profile to automatically create a Magento 
category and assign templates(products) in it.

Can this be configured through ZP admin tab?

Original comment by zetapri...@gmail.com on 30 Mar 2011 at 6:54

GoogleCodeExporter commented 9 years ago
Yes, it can.

Original comment by Anatoly....@gmail.com on 30 Mar 2011 at 7:21

GoogleCodeExporter commented 9 years ago
Anatoly, where is this at?
We have a site that is held up by this issue.

Original comment by ad...@zetaprints.com on 19 Jul 2011 at 8:10

GoogleCodeExporter commented 9 years ago
We just need to implement it. Do I have to implement it as a separate profile, 
like it's described in the text above?

Original comment by Anatoly....@gmail.com on 19 Jul 2011 at 11:12

GoogleCodeExporter commented 9 years ago
A profile is probably the quickest options. Any other suggestions?
Please, get on with it. 

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

GoogleCodeExporter commented 9 years ago
I need an sub-category example on ZP side. We don't support sub-category in our 
PHP API implementation at this moment.

Original comment by Anatoly....@gmail.com on 19 Jul 2011 at 4:25

GoogleCodeExporter commented 9 years ago
I divided the "Sample Stationary" catalog into 2 sub-categories on cname:
http://cname.zetaprints.com/?page=catalogue;CorporateID=F431141D-27EA-4A35-9B0A-
C10962CDC98C

Original comment by agur...@gmail.com on 19 Jul 2011 at 4:38

GoogleCodeExporter commented 9 years ago
Are products attached to sub-categories by keyword field?

Original comment by Anatoly....@gmail.com on 19 Jul 2011 at 8:20

GoogleCodeExporter commented 9 years ago
Probably.
Do you see them in the XML?
Can you post the snippet here?
Not sure which one you are looking at.

Original comment by xml....@paradise.net.nz on 19 Jul 2011 at 8:32

GoogleCodeExporter commented 9 years ago
OK, we can't do ZP subcategories at the moment.
They are not present in the dataset for API calls.

The source can only be the top ZP category, but it can map to a sub-category in 
Mage.

What are we going to do with ambiguous mapping?
There may be sub-categories with the same names in Mage. Unlikely, but not 
impossible.

Original comment by ad...@zetaprints.com on 20 Jul 2011 at 9:18

GoogleCodeExporter commented 9 years ago
Scratch out comment 10. We are sorted.

See at the end of the snippet. It's got to be this.
    <Tags>
        <Tag>Subcategory 01</Tag>
    </Tags>

Full XML.

<TemplateDetails TemplateID="9B8BB2CC-6036-4664-A6B6-9912BDCFB4FA" 
CorporateID="F431141D-27EA-4A35-9B0A-C10962CDC98C" Comments="This product has a 
description." GeneratePdf="1" Download="allow" 
AccessURL="http://cname.zetaprints.com/?page=template;TemplateID=9B8BB2CC-6036-4
664-A6B6-9912BDCFB4FA" ProductReference="" 
xmlns:f="http://xml.easyprints.co.nz/fields">
    <Pages>
        <Page Name="Page 1" PreviewImage="preview/99ea5509-ea9e-4a2c-8838-719258b8ccb7-0.jpg" ThumbImage="thumb/99ea5509-ea9e-4a2c-8838-719258b8ccb7-0.jpg" Page2BoxX="" Page2BoxY="" Page2BoxW="" Page2BoxH="">
            <Shapes>
                <Shape Name="Name" X1="0.500039" Y1="0.500421" X2="0.500852" Y2="0.500709" AnchorX="" AnchorY=""/>
                <Shape Name="Role" X1="0.500299" Y1="0.500123" X2="0.500851" Y2="0.500163" AnchorX="" AnchorY=""/>
                <Shape Name="City" X1="0.500536" Y1="0.500058" X2="0.500847" Y2="0.500108" AnchorX="" AnchorY=""/>
                <Shape Name="Email" X1="0.500349" Y1="0.499827" X2="0.500849" Y2="0.499869" AnchorX="" AnchorY=""/>
                <Shape Name="Contact" X1="0.500038" Y1="0.49971" X2="0.500851" Y2="0.499932" AnchorX="" AnchorY=""/>
                <Shape Name="Postal Address" X1="0.499152" Y1="0.499705" X2="0.499771" Y2="0.499873" AnchorX="" AnchorY=""/>
                <Shape Name="Website" X1="0.499302" Y1="0.499531" X2="0.499765" Y2="0.499574" AnchorX="" AnchorY=""/>
            </Shapes>
        </Page>
        <Page Name="Page 2" PreviewImage="preview/99ea5509-ea9e-4a2c-8838-719258b8ccb7-1.jpg" ThumbImage="thumb/99ea5509-ea9e-4a2c-8838-719258b8ccb7-1.jpg" Page2BoxX="" Page2BoxY="" Page2BoxW="" Page2BoxH="">
            <Shapes>
                <Shape Name="Name" X1="0.499435" Y1="0.500254" X2="0.500565" Y2="0.500514" AnchorX="" AnchorY=""/>
                <Shape Name="Role" X1="0.499724" Y1="0.499984" X2="0.500276" Y2="0.500025" AnchorX="" AnchorY=""/>
                <Shape Name="Slogan" X1="0.499177" Y1="0.499804" X2="0.500827" Y2="0.500097" AnchorX="" AnchorY=""/>
            </Shapes>
        </Page>
    </Pages>
    <Images/>
    <Fields>
        <Field FieldName="Name" Page="1" Hint="Enter your name in English or Russian."/>
        <Field FieldName="Role" Page="1" Hint=""/>
        <Field FieldName="City" Page="1" Hint="" Value="1 city"/>
        <Field FieldName="Email" Page="1" Hint=""/>
        <Field FieldName="Contact" Page="1" Multiline="1" Hint=""/>
        <Field FieldName="Postal Address" Page="1" Multiline="1" Hint=""/>
        <Field FieldName="Website" Page="1" Hint=""/>
        <Field FieldName="Slogan" Page="2" Multiline="1" Hint=""/>
    </Fields>
    <Fonts>
        <Font FontFileName="AKZIDGROCFFEX.OTF"/>
        <Font FontFileName="FRUTIGERLTSTD-ROMAN.OTF"/>
    </Fonts>
    <Tags>
        <Tag>Subcategory 01</Tag>
    </Tags>
</TemplateDetails>

Original comment by ad...@zetaprints.com on 20 Jul 2011 at 9:49

GoogleCodeExporter commented 9 years ago
The latest changes to the product creation profile involve auto creating a "New 
templates" category for all new templates. If we're about to introduce a 
"Category creation" profile, this is no longer needed.
In order for admins to have their templates show in the front end right away 
they 
1. sync templates, 
2. create categories and 
3. create products 
using the dataflow profiles.

Just to be on the safe side, comment out the part of the code that creates the 
"New templates" category instead of removing it completely.

Original comment by agur...@gmail.com on 20 Jul 2011 at 11:52

GoogleCodeExporter commented 9 years ago
I will leave it as a latest way to create a category if others won't work.

Original comment by Anatoly....@gmail.com on 20 Jul 2011 at 4:17

GoogleCodeExporter commented 9 years ago
@13 - does it mean it will actually create that default category anyway if 
nothing else worked?

You may be right.

Original comment by ad...@zetaprints.com on 20 Jul 2011 at 10:19

GoogleCodeExporter commented 9 years ago
Diffs:

 * http://code.google.com/p/magento-w2p/source/detail?r=1748
 * http://code.google.com/p/magento-w2p/source/detail?r=1749
 * http://code.google.com/p/magento-w2p/source/detail?r=1750
 * http://code.google.com/p/magento-w2p/source/detail?r=1751

Original comment by Anatoly....@gmail.com on 24 Jul 2011 at 3:32

GoogleCodeExporter commented 9 years ago
Please, use 1.9.1.0alpha15 release for testing

Original comment by Anatoly....@gmail.com on 24 Jul 2011 at 3:39

GoogleCodeExporter commented 9 years ago
Tested on:
http://d1.zetaprints.com/magedev/
M. ver. 1.5.1.0
web_to_print_store_incl_theme   1.9.1.0alpha15 (alpha)

Original comment by agur...@gmail.com on 26 Jul 2011 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
I don't know why, but this didn't work on a clients account. Only a few 
templates get assigned to the right category, the rest are all placed in the 
"new templates" category.

I tried different variations
- re-sync and re-create products
- delete all products and re-sync re-create
- delete all products, select "refresh all templates" to hopefuly reset the 
template database...
- at the end, I even tried it on a fresh /mageimage/ (no possible database)

The customer in question has 2000+ templates in 21 catalogs. Current 
/mageimage/ is set to their account. You can spot the proeblem there.

Original comment by agur...@gmail.com on 28 Jul 2011 at 7:08

GoogleCodeExporter commented 9 years ago
No go. I don't know why, but this didn't work on a clients account. Only a few 
templates get assigned to the right category, the rest are all placed in the 
"new templates" category.

I tried different variations
- re-sync and re-create products
- delete all products and re-sync re-create
- delete all products, select "refresh all templates" to hopefuly reset the 
template databse...
- at the end, I even tried it on a fresh /mageimage/ (no possible database)

The customer in question has 2000+ templates in 21 catalogs. Current 
/mageimage/ is set to their account. You can spot the proeblem there.

Original comment by agur...@gmail.com on 28 Jul 2011 at 7:13

GoogleCodeExporter commented 9 years ago
/mageimage/ is M. 1.6

Are you sure that our ext works OK on 1.6? 

Original comment by Anatoly....@gmail.com on 28 Jul 2011 at 9:48

GoogleCodeExporter commented 9 years ago
The customer site is 1.5.0.1, doesn't work there either.

Original comment by agur...@gmail.com on 29 Jul 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Actually, I just tried the extension on 1.6 /mageimage/ using cname
works fine.

Original comment by agur...@gmail.com on 29 Jul 2011 at 7:44

GoogleCodeExporter commented 9 years ago
I can't think why it would work on one and not on the other.
The data feeds should be same.

Original comment by ad...@zetaprints.com on 29 Jul 2011 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by Anatoly....@gmail.com on 1 Aug 2011 at 10:39

GoogleCodeExporter commented 9 years ago

Original comment by Anatoly....@gmail.com on 1 Aug 2011 at 10:44

GoogleCodeExporter commented 9 years ago
Please, re-test it with 1.9.1.0alpha16 release.

Original comment by Anatoly....@gmail.com on 10 Aug 2011 at 9:23

GoogleCodeExporter commented 9 years ago
Tested on
/mageimage/ ver. 1.6.0.0-rc2
web_to_print_store_incl_theme 1.9.1.0alpha16 (alpha)

Test OK

Original comment by agur...@gmail.com on 11 Aug 2011 at 1:20

GoogleCodeExporter commented 9 years ago
http://www.zetaprints.com/magentohelp/auto-category-creation/

Original comment by agur...@gmail.com on 24 Aug 2011 at 5:30

GoogleCodeExporter commented 9 years ago

Original comment by agur...@gmail.com on 25 Aug 2011 at 8:13