Products are being uploaded but ‘details’ missed…

Closed

Import WP Addon - WooCommerce Updated 2 weeks ago 29 Replies

Callum asked 1 month ago on September 14, 2024 at 8:10 pm

Hi again!

Plugin has been going fantastically so far with my sports website. Nearly 5,000 products, but there have been several anomalies, including 1 severe one which cost us our first sale on the site.

The products are being uploaded, title, image and base price correctly. However, I’ve noticed that some aren’t having their ‘stock management’ switched on, leaving them as unlimited in stock.

We have started to come across products every now and then which need editing manually to turn the tracking function on, however just to save hassle in future, what could be the issue here?

We’ve got ‘stock management’ as ‘yes’ by default in the template fields, so in theory all new products and existing should have it turned on by default. However, as mentioned above this isn’t always the case.

Any help would be much appreciated!

Many thanks,

Callum H.

J

James replied Support Agent

1 month ago on September 15, 2024 at 9:20 pm

Hi Callum,

To see what your setup is can you please export and attach your importer settings to this ticket by going to Tools > Import WP > Settings / Tools > Import / Export and select and export your importer as a JSON file.

Can you also find a product that has or had the wrong stock management setting set, and find the product id, then when viewing the importer, click on the history tab, view the lastest import history and search for the product id, and attach a screenshot of what the message says.

On the importer, can you make sure you do not have "Update records only when data has changed" checked, as this is the only reason i can think of why products would not have the stock management field updated.

A resolution to this would be to create an importer setting the stock management field to yes, and then running the importer with only the update permission field enabled, with "only the following fields" and only enabling the "Manage stock" field.

James

CH

Callum replied

4 weeks ago on September 27, 2024 at 8:24 pm

Hi James,

I'll take that onboard for future edits, as for now there's been no problems with new products being uploaded. Fingers crossed things are working fine.

I just have one other thing in regards to 'categories'. I've noticed that there's a lot of duplicates and so there are 'football-2' and 'football-3' categories being created.

Is there any way that I can manually edit these categories but make sure that the ImportWP doesn't update the product back to it's original category or will it not do that by default? Summary: original category 'football-3' so I change it to 'football', I don't want ImportWP to then change it back.

Many thanks!

J

James replied Support Agent

3 weeks ago on October 2, 2024 at 9:25 pm

Hi Callum,

With the slugs being football-2 and football-3, this suggests that you might have mulple categories with the same name.

If you were to remove duplicate categories, the importer should find and use the existing if you have setup the terms and term type field to search the correct part.

James

CH

Callum replied

2 weeks ago on October 5, 2024 at 12:11 pm

Hi James,

I have added the screenshots for easier understanding. As you can see it creates duplicates of an already named category. In this instance, 'football league'. 1 product that's been imported has decided it needs a separate category but named the same as 'football league' so there's now two (hence 'football-league-2'.

I have also screenshotted the taxonomies section of my importer to show what I'm pulling out from the data into Woocommerce, but it looks fine? Or can it be tweaked a little to save hassle like duplicates in future?

I've also added a screenshot showing how it's pulling data but merging a 'what should have been a' separated category and places a '|' instead of breaking and created sub levels.

Is this a common issue?

Many thanks.

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 12:28 pm

Hi,

Is there anyway you can share/attach the csv / xml record that is creating the duplicate "Footbal League"?

Can you send a screenshot of the "Settings panel" displayed when you click on "show settings".

To change the delimiter from "," to "|", code can be found here: https://www.importwp.com/docs/how-to-import-wordpress-taxonomies-onto-a-post-type/#taxonomy-value-delimiter

James

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 12:43 pm

Or there is a field in the taxonomy settings where you can set the delimiter to |

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 12:52 pm

I have been trying to repliate this locally, thinking that white space might be causing it, but i have been unsuccessful.

If you were yo delete the "football-league-2" category, and then re-run the import, would it get recreated with the exact same results with a single product attached to it, while the other 35 are attached to the existing "football-league" category?

CH

Callum replied privately

2 weeks ago on October 5, 2024 at 12:57 pm

CH

Callum replied

2 weeks ago on October 5, 2024 at 1:00 pm

I have attached the screenshot of the advanced settings of taxonomies for both 'categories' and 'brands'. The delimiter was set because I saw that the '>' was being used to separate categories that had sub levels - according to the suppliers XML instructions document.

I just followed what they told me by using the delimiter they use to separate categories that belong to sub-category of the main one.

Not sure if this is what's causing the issues.

Many thanks,

Callum H.

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 3:12 pm

The duplicate football league is caused by the missing | delimiter in the product brand settings.

for example:

Football>Football League>Sunderland AFC

then it breaks and creates a duplicate on the following brands due to it thinking a single brand is "SoccerStarz|Football" and nesting football league under it:

Football>SoccerStarz|Football>Football League>Swansea City AFC

James

 

CH

Callum replied

2 weeks ago on October 5, 2024 at 3:20 pm

Hi James,

Thank you for that! So should I delete all categories and allow the import to redo them again? Will the importer run and redo them without any more tweaks to the settings?

And if I wanted to edit the categories and their structure (to make it easier or match my website branding structure) how do I make sure the importer doesn't redo them again and try to create new categories?

I feel like the more I uncover problems it turns into a huge butterfly effect.

Many thanks!

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 3:23 pm

You will need to delete all the product brands and re-run the import.

Because the importer is importing a hierarchy, it will always try to match that hierarchy and if you change any of them it will recreate them.

CH

Callum replied

2 weeks ago on October 5, 2024 at 4:42 pm

So to solve the issue with the multiple and weird category/brand assignments, I need to include '|' as the delimiter and then '>' as the heirarchy character.

Everything else should be left and it'll be okay - fingers crossed.Is the following a possible workaround in this case?

- Allow the importer to create new categories and brands as normal.

- Change part of the settings so that existing fields aren't updated, i.e. categories and brand fields. So when the importer checks over the unique identifier it will update everything else apart from the category/brand it's assigned to?

- Only problem I will have is I'll need to manually check that new products imported are assigned properly or perhaps an easier solution would be to assign new imports as uncategorised and manually go through them.

Finally, the connect last term and connect all terms, is this something I need to get right as well? I'm not quite sure of what exactly this field does. Just in case this is also causing an issue. My categories are set to 'all terms' and brands set to 'last term'.

Thanks again James, couldn't be more appreciative of your help.

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 5:24 pm

A possible solution could be to create a replacement map, where it would search and replace the brand strings from the datafeed, replacing them your desired datapath.

e.g.

"American Sports>NBA" => "USA NBA"

And this would take All sub categories under the "NBA", and instead of nesting it under "American sports" and "NBA", it would be under a top level category "USA NBA" (before and after screenshots).

function brand_map($input = '')
{
    $parts = array_values(array_filter(array_map('trim', explode('|', $input))));

    // list of maps: "search" => "replace"
    $map = [
        'American Sports>NBA' => 'USA NBA',
        'American Sports>NFL' => 'USA NFL',
        // TODO: Add extra maps below
    ];

    $output = [];
    foreach ($parts as $part) {
        $tmp = $part;

        foreach ($map as $map_key => $map_val) {
            if (strpos($tmp, $map_key) === 0) {
                $tmp = $map_val . substr($tmp, strlen($map_key));
                break;
            }
        }

        $output[] = $tmp;
    }

    return implode('|', $output);
}
CH

Callum replied

2 weeks ago on October 5, 2024 at 8:21 pm

Hi James,

So after adding the delimiter as '|' for the importer to add the categories properly it has not worked unfortunately.

Instead the brand categories haven't been created and instead left out completely and only a few have been added.

I attached the documentation that the supplier provides which explains how their data works when using for importing. They mention that...

"The hierarchical brands of the product on Taylors, parent terms are separated with “>”. Product will only be assigned to a single Product team brand hierarchy. e.g. “Football>Premier League>Liverpool FC".

Is it best to leave out the '|' delimiter but replace it with a space instead?

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 8:23 pm

Just to confirm, is the brand data that looks like this?:

Football>SoccerStarz|Football>Football League>Swansea City AFC
CH

Callum replied

2 weeks ago on October 5, 2024 at 8:35 pm

That's correct yes, although the majority are just singular. Yet, I included the delimiter as '|' yet it didn't create any categories. The only one that got populated was 'football' but I left that in (didn't delete it).

Very strange indeed.

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 8:41 pm

Did you delete all brands before running the importer?

Make sure you have the "Update records only when data has changed" toggled to off.

As setting the delimiter to | would change it from:

Football
|- SoccerStarz|Football
    |- Football League
        |- Swansea City AFC

To:

Football
|- SoccerStarz
|- Football League
    |- Swansea City AFC

CH

Callum replied

2 weeks ago on October 5, 2024 at 8:51 pm

That's probably where I'm going wrong. I had 'update records' toggled ON.

I've started importing again with it OFF, I'll update back if it's done anything or not.

CH

Callum replied

2 weeks ago on October 5, 2024 at 10:18 pm

Hi James,

I have delimiter set as '|'.

I have 'update records' toggled OFF.

I've set it as connect all terms rather than last term.

And now no product brands are being created when running the import.

Pulling my hair out over this 😂

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 10:20 pm

Are you able to provide me a login to see what is going on?

CH

Callum replied privately

2 weeks ago on October 5, 2024 at 10:21 pm

J

James replied privately Support Agent

2 weeks ago on October 5, 2024 at 10:25 pm

CH

Callum replied privately

2 weeks ago on October 5, 2024 at 10:33 pm

J

James replied Support Agent

2 weeks ago on October 5, 2024 at 10:37 pm

Looking at both your importers, the permissions step is not allowing the update of brands or categories.

CH

Callum replied

2 weeks ago on October 5, 2024 at 10:39 pm

One of the importers is purely just to update the stock levels. So I've made it so it only updates those fields.

The main importer which checks for new products I've made the permissions so that it only updates title and few other fields, incase I want to edit the description or add other stuff and it doesn't get overwritten on next update.

It's weird that because it imported before just fine when those permissions were set.

CH

Callum replied

2 weeks ago on October 5, 2024 at 11:44 pm

The permissions were stopping the import from creating the categories, my hair remains for now.

Although my next problem is that the categories are being created as singular terms rather than a heirarchy. So instead of following the 'Football>Aresenal FC' it's doing 'Football' and 'Arsenal FC' as separate single terms.

Am I missing an option I've toggled or forgot to turn off?

I'll be off your back James once this is finished lol, I'm so sorry for pestering you about this.

J

James replied Support Agent

2 weeks ago on October 6, 2024 at 9:02 am

Have you enabled hierarchy on the brand taxonomy, looking at the add new brand field there is no parent field which suggests it is not enabled.

CH

Callum replied

2 weeks ago on October 6, 2024 at 10:42 am

Which is so strange because I could've sworn it worked and had the option before, unless I was seeing things.

However, I understand now and was right under my nose why it wasn't working. I believe the plugin was custom made specific to the theme I have for the website.

I'll have to contact their support to find solutions to get it enabled.