• Resolved mateuszsurma

    (@mateuszsurma)


    Hey.

    I have a category tree in my store. My problem is that not all categories are in the product type attribute. For example.

    – Cat 1
    – – Subcat 1
    – – – Sub Subcat 1
    – – – Sub Subcat 2
    – – – Sub Subcat 3

    Product is in the category Sub Subcat 1 and in my Product Category string can find only “Cat 1 > Subcat 1”. Only in one of 49 cases, the attribute is completed correctly.

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Hi @mateuszsurma,

    Sorry to hear you’re having issues. I did a quick test and could not replicate it so I have a few questions about the issue:

    1- Are you using the latest version of our plugin (1.12.2)? If not, please update and check again.
    2- Is the missing category showing up in the Category Mapping table on the Edit Feed page?
    3- Is this issue only with one specific category or are more categories having this issue?
    4- Is there anything special with this category (eg is it marked as a “Default” or is it configured by a third party plugin)

    Thread Starter mateuszsurma

    (@mateuszsurma)

    @michel-jongbloed thanks for repyl.

    1. Latest version.
    2. Yes
    3. Only 1 product have full patch of category.
    4. Yes, I use Yoast Seo Plugin, but when I deactive it, nothing happens.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    OK @mateuszsurma,

    Just to be able to replicate the exact situation you’re having, could you tell me the names of the categories that fail? Maybe there is something in the name of the category that is causing this issue.

    Thread Starter mateuszsurma

    (@mateuszsurma)

    Tabletki, ?ele, Spraye, Dla kobiet. They are so simple.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Might be simple for you, but not for the PHP language where our plugin has been written in. PHP standard works in UTF-8, but this is a different character set and I’m pretty sure the ? is causing the issue here.

    I had a lot if issues getting the Zbo?í.cz channel running because of its non-standard character set. In the end I was able to get it working, but it was not that simple.

    What language is this and if you know, what character set?

    Thread Starter mateuszsurma

    (@mateuszsurma)

    Polish and utf-8. It seems to me that this is not the way for two reasons. First of all, the situation is in the case of categories with only Latin characters too. In the feed there are categories with Polish characters, such as “Suplementy dla m??czyzn”.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    OK @mateuszsurma,

    I will perform some tests and see if I can find the cause of this issue. But unfortunately I won’t be able to do that today. I’ll start working on it first time tomorrow and report back to you.

    Thread Starter mateuszsurma

    (@mateuszsurma)

    Ok, I will wait.

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    @mateuszsurma, can you send me the link to the feed and tell me the name of one product that has the incorrect category string?

    Thread Starter mateuszsurma

    (@mateuszsurma)

    All products except the product with ID 6499 have erroneous categorizations. Feed: https://eropteka.pl/wp-content/uploads/wppfm-feeds/GMC.xml

    • This reply was modified 5 years, 10 months ago by mateuszsurma.
    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    OK, I wanted to replicate your situation by having one complete category string (like “Produkty > Suplementy dla m??czyzn > Opó?nienie wytrysku”). I now understand that the example you gave me (Tabletki, ?ele, Spraye, Dla kobiet) is not a complete category string but different categories you use?

    Could you check the following:
    – Open the feed in your browser and clear the browsers cache (usually done by pressing CNTRL-F5). Then check if the categories in the feed look OK.
    – If not, try to open the feed with another browser (Chrome, Firefox, Explorer) and check if the categories are OK there
    – If not, open the following folder on your server “wp-content/uploads/wppfm-feeds” and download the “GMC.xml” file. Open that file with a text editor like Notepad++ or Sublime Text and check again if the categories look OK.

    If these are all wrong, please send me a correct and complete category string as you are using it in the feed so that I can use that to make a new category on my test server and test that out.

    Thread Starter mateuszsurma

    (@mateuszsurma)

    No no no. For example take product with id 6558. In feed we have:

    <g:product_type>
    Produkty > Suplementy dla m??czyzn > Erekcja / potencja
    </g:product_type>

    Now, go to store: https://eropteka.pl/produkt/ero-tabs-1-kapsulka/ and look at breadcrumb. Category path in feed should be:
    Produkty > Suplementy dla m??czyzn > Erekcja / potencja > Tabletki

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Did several tests here and they all came out OK here.

    On thing I noticed on your linked store page is that the Kategory string = “Kategorie: Erekcja / potencja, Produkty, Suplementy dla m??czyzn, Tabletki”, which is the same as in the feed string.

    Are you a bit familiar with coding? If so, could you
    – install and activate the Black Bar plugin (https://www.ads-software.com/plugins/blackbar/) – Check if the product id of the 6558 is indeed 6558 (I don’t know if this code is the product_id or maybe the sku). You need the product_id for the code below.
    – Open the “wp-content/plugins/wp-product-feed-manager/includes/user-interface/class-feed-form.php” file in an editor
    – Then in line 22, add the following two lines:

    apply_filters( 'console', wp_get_post_terms( '6558', 'product_cat', array( 'taxonomy' => 'product_cat' ) ) );
    apply_filters( 'console', WPPFM_Taxonomies::make_shop_taxonomies_string( '6558' ) );

    where 6558 should be the product_id.
    – Then open the Feed Manager page and click on the Edit action. When the edit feed pages is loaded, you should see a Console(2) in the black bar on the bottom of the page. Click on that and copy the content of the console back to me.

    – After that remove the code from the file to restore everything to normal again.

    If you’re not familiar with coding, let me know.

    Thread Starter mateuszsurma

    (@mateuszsurma)

    If I add 2 lines I have blank page after click Edit Action. When I left only first of 2 lines, in console:

    Debug
    [wp-content/plugins/wp-product-feed-manager/includes/user-interface/class-feed-form.php:23] Array
    (
    [0] => stdClass Object
    (
    [term_id] => 78
    [name] => Erekcja / potencja
    [slug] => erekcja-potencja
    [term_group] => 0
    [term_taxonomy_id] => 78
    [taxonomy] => product_cat
    [description] =>
    [parent] => 74
    [count] => 15
    [filter] => raw
    [meta_value] => 0
    )

    [1] => stdClass Object
    (
    [term_id] => 73
    [name] => Produkty
    [slug] => produkty
    [term_group] => 0
    [term_taxonomy_id] => 73
    [taxonomy] => product_cat
    [description] =>
    [parent] => 0
    [count] => 48
    [filter] => raw
    [meta_value] => 0
    )

    [2] => stdClass Object
    (
    [term_id] => 74
    [name] => Suplementy dla m??czyzn
    [slug] => suplementy-dla-mezczyzn
    [term_group] => 0
    [term_taxonomy_id] => 74
    [taxonomy] => product_cat
    [description] =>
    [parent] => 73
    [count] => 24
    [filter] => raw
    [meta_value] => 0
    )

    [3] => stdClass Object
    (
    [term_id] => 79
    [name] => Tabletki
    [slug] => tabletki-erekcja-potencja
    [term_group] => 0
    [term_taxonomy_id] => 79
    [taxonomy] => product_cat
    [description] =>
    [parent] => 78
    [count] => 12
    [filter] => raw
    [meta_value] => 0
    )

    )

    Plugin Contributor Michel Jongbloed

    (@michel-jongbloed)

    Can you check if you have any error.log file?

    Could you check for any error logging files in the following places:
    1) On WooCommerce -> Status -> Logs
    2) In the root folder of your server
    3) In the “wp-content” folder on your server
    4) In the “wp-content/plugins/wp-product-feed-manager” folder

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Problem with product_type’ is closed to new replies.