Multiple products

Closed

Import WP Addon - Content Egg Updated 2 weeks ago 174 Replies

Matúš asked 4 months ago on January 8, 2024 at 1:57 pm

Hello! 

I have 2 questions.

1) I’m importing products from feed which contains clothings, so every size is different GTIN but the same SKU. How could I import only one product instead of all?

2) When I’m selecting fields for price in Content Egg fields. I choose “offer price” as sale price and “offer old price” as price. Which works fine only for products which are on sale. In case the products is not on sale the field is blank and there isnt show any price. How could I fix it?

Thank you for answer 🙂

 

J

James replied Support Agent

4 months ago on January 8, 2024 at 10:01 pm

Hi Matúš,

1) How would you want this to work? How would you select the single product to be imported out of all the sizes?

2) You could add a custom php function to your theme / custom plugin that would check if the value is empty, if it was then it would output the other value. e.g.

function iwp_if_not_empty($input = '', $alternative = ''){

    if(empty($input)){
        return $alternative;
    }

    return $input;
}

In your importer field you would use it as follows put [iwp_if_not_empty("{0}","{1}")] , replacing {0} with the selector for sale price, and {1} with the selector for offer old price,

Then the function if sale price is empty then it would return the offer old price

James

MP

Matúš replied

4 months ago on January 9, 2024 at 1:14 pm

1) I dont really know thats why im asking you if you dont have some experience, like somebody had this same problem with multiple products and how did he figured it out. But I can figure it out with deleting same products with plugin.

 

2) I add this in theme editor. function iwp_if_not_empty($input = '{/sale_price}', $alternative = '{/price}'){

 

    if(empty($input)){

        return $alternative;

    }

 

    return $input;

}

But where to put second code you sent in importer? As xparth or in which field?  Also the first code which I had to put in theme editor wasnt filled in, have I filled in correctly? Thank you

J

James replied Support Agent

4 months ago on January 9, 2024 at 1:36 pm

1) I think my response might have not been as clear as it could have been, what i am trying to say is there are many ways for this to be done, It is unique to your xml / csv feed and the data it contains. So if you can go through your feed and find a way to correctly identify which product should be updated over the others with the same sku (based xml nodes or csv columns), then we can take this information and filter out what is being imported/updated.

2) Please reverts the function back to what it was as the values will be populated in the importer. Once you have the code added to your theme you can use it in the importer. Using the 2 attached screenshots, you can see that 01-default shows a csv selector {130} without using the custom function which the preview is showing as having a value of 30.

Using the custom function in this field as shown in 02-custom-method where we have moved the existing {130} selector to the first argument of the function, and set the fallback value (second  argument of the function) to {132} selector. (these will be different in your setup)

e.g. [iwp_if_not_empty("{130}", "{132}")]

Example A - If first value is empty:
{130}  = 0
{132} = 10
the output of the custom method will be 10

Example B - If first value is not empty:
{130} = 30
{132} = 10
the output of the custom method will be 30

MP

Matúš replied

4 months ago on January 9, 2024 at 8:41 pm

1) I use regular CJ feed in XML format. It would be enough just to upload one product from each SKU. Just random one. I think thats least complicated.

 

2) I changed the code in theme editor back to default. And used the right code in template field for price. Sending screenshots. But when the products uplods, products not in sale are still blank. With no price :/ 

Thank you for answer.

J

James replied Support Agent

4 months ago on January 9, 2024 at 8:54 pm

2) The offer price in the screenshot shows that the custom function is working as expected as it is returning the first value.

Maybe the issue is due to the EUR at the end of the price? can you try manually entering 63.99 into the offer price, and 75.00 into the offer old price field, and running the importer limiting it to 1 record, then you can confirm if it works without the EUR suffix.

MP

Matúš replied

4 months ago on January 9, 2024 at 9:22 pm

2) Look what I found out. I did what you told me and the price was hidden. Until I clicked on the product. The price is there, but is showing up only on the product page. Not if you are browsing in catalog or in wordpress product page.

So I uploaded few products as before with the same code. It also did the same thing. Some prices arent shown but if you click on the product ,here they are. I dont understand it.  Also some products upload with images and some only with the front one.

Sending screenshots for better understanding

J

James replied Support Agent

4 months ago on January 9, 2024 at 9:39 pm

The price in the "Price-empty" screenshot, this is the woocommerce regular price, not the content egg price, this can be set via the regular price field.

Can you confirm that you have populated the product gallery field?

 

MP

Matúš replied

4 months ago on January 9, 2024 at 9:51 pm

Now i checked and every price is shown. Maybe is just take time. Weird. 

Yes the field is filled in. 

J

James replied Support Agent

4 months ago on January 9, 2024 at 9:55 pm

Looks like row 2/3 of the attachment section is a duplicate.

Can you look at the importer history tab for the last import taht was ran, and see if there are any errors when fetching the images.

MP

Matúš replied

4 months ago on January 9, 2024 at 10:52 pm

Yes they they are duplicated. Because if you look the rows have the same name but different image link.

and only errors are invalid or duplicated SKU. 

J

James replied Support Agent

4 months ago on January 9, 2024 at 11:17 pm

{/additional_image_link} will select all 5 image that you have there, you can select specific images by {/additional_image_link[1]}, replacing 1 with the row number.

Can you confirm that these 5 images are accessible to your website, as all return error 404 not authorized.?

https://static.ftshp.digital/img/p/4/2/5/O/3/2/425032-cropped.jpg
https://static.ftshp.digital/img/p/4/2/5/O/4/7/425047-cropped.jpg

When the first image under image_link works correctly: https://static.ftshp.digital/img/p/4/2/4/9/9/3/424993-cropped.jpg and i can view without issue

 

MP

Matúš replied

4 months ago on January 10, 2024 at 10:55 am

I tried to view images. But it works fine. It open images that are uplaoded to wp-content. Thank you for the clarification, I set [1] and the preview shows it works. Let's get back to the multiple products problem. So how could I upload only one product per SKU? Thank youu

J

James replied Support Agent

4 months ago on January 10, 2024 at 10:36 pm

Stripping back your problem to the basics, this is what i understand it to be.

1. You have an xml file that has multiple SKU that are duplicates, and you only want to import the first record for each sku and ignore the rest.

In the screenshot 01-xml-file , you can see there are 3 records in my stripped down xml file, the first two have the same sku attribute "sku01" , and the third has "sku03", running this in the importer you would see something like shown in screenshot 02-import-basic , records 1 & 2 update the same object, id #7 which has the sku "sku01", and record 3 updates the object id #24 which has the sku "sku03".

2. To solve this issue and skip the second record and any other duplicate sku records from being updated, you need to install and activate the attached iwp-custom.zip plugin, within this plugin there are two variables that you need to change, this shown in the screenshot 04-code-variables:

2A) importer_id shown as value 22 has to be your importer id (this can be fetched from the url when you are editing the importer: shown in screenshot 05-importer-id)

2B) the selector, the the screenshot this is referencing the attribute which is why it is prefixed with an @, you can get this value from clicking on "File Settings" tab, and under the record xml preview section, if you hover over the value you would like, a tooltip should appear showing the selector (hovering over the name in the screenshot 06-selector you can see the tooltip shows {/name}

3. With these variables updated, if you were to now run the same import, you would see the results shown in screenshot 03-import-unique where the second record has been skipped.

MP

Matúš replied

4 months ago on January 11, 2024 at 2:54 pm

Thanks for such a detailed tutorial how to do it! But I'm stuck. How can I change those plugin variables? I installed and activated the plugin but where to change those variables? Should I edit it some PHP editor and then install the plugin? Thank you

MP

Matúš replied

4 months ago on January 11, 2024 at 3:04 pm

Okay I found the file in File manager 

MP

Matúš replied

4 months ago on January 11, 2024 at 3:17 pm

I changed the values correctly? Should it be with @ or without @ ? I saved it and ran the importer but same problem.  Duplicated SKU. 

J

James replied Support Agent

4 months ago on January 11, 2024 at 3:22 pm

Based on your preview it should be without @

What is the error you are seeing, can you attach a screenshot

MP

Matúš replied

4 months ago on January 11, 2024 at 3:26 pm

Yes I did it without @ and it works like charm! Milions thank you. 

MP

Matúš replied

4 months ago on January 11, 2024 at 3:42 pm

But before you close this ticket. I would like to ask about XPATH. All I need to do is to put the code like this .//*[@itemprop='price']/@content into the template field?

J

James replied Support Agent

4 months ago on January 11, 2024 at 3:50 pm

You can use xpath within the importer by adding it inside of curly braces:

For example fetching the category node that has the "domain" attribute that equals "category"

{/category[@domain="category"]}

This would fetch "Cat 1" from the following xml.

<meta>
    <category domain="post_tag">Tag 1</category>
    <category domain="category">Cat 1</category>
</meta>

 

MP

Matúš replied

4 months ago on January 11, 2024 at 3:57 pm

I wanted to use it like a price update. Can it update price not by the XML but from the origin website? Or for price update I have to upload new XML everytime ? Thankyou

J

James replied Support Agent

4 months ago on January 11, 2024 at 4:07 pm

If you click on the select file tab, and chose remote url to that of the website where the feed is coming from (that way you dont need to manually upload the file each time)

MP

Matúš replied

4 months ago on January 11, 2024 at 5:59 pm

Thank you for info! And to update prices I just check update in permission? 

MP

Matúš replied

4 months ago on January 14, 2024 at 9:47 am

Hi. And how can I add GTIN to the importer? I really tried to find it but cant anywhere. In inventory is only SKU.

J

James replied Support Agent

4 months ago on January 14, 2024 at 4:47 pm

By default woocommerce doesn't have a GTIN field, can you let me know what plugin is used to add this field (a screenshot of where the field is ) and i can tell you how to set it on the importer

MP

Matúš replied

4 months ago on January 14, 2024 at 8:44 pm

It can be only seen in the product page. Not in the list of all products. So I dont know if it would work. But I though I can maybe use GTIN as product ID in the template field in the importer. Would it work?

MP

Matúš replied

4 months ago on January 14, 2024 at 8:44 pm

In the screenshot I used content egg plugin which adds these feeds.

J

James replied Support Agent

4 months ago on January 14, 2024 at 9:50 pm

The product ID field in the importer is form matching products based on the wordpress product id, and you cant change this id or insert it, this is just used as a reference.

You could save the GTIN as a custom field on the product, and then reference that custom field.

In your screenshot how do you change the GTIN/EAN for the highlighted product?

MP

Matúš replied

4 months ago on January 21, 2024 at 8:59 pm

Sorry I didnt respond for so long. I cant really change the GTIN as Im aware. How I could set a custom field please? I tried but I couldnt. Thank you

J

James replied Support Agent

4 months ago on January 21, 2024 at 9:06 pm

To know how to set a custom field, i need to know how you added teh custom field onto the product, was this with a plugin such as "Advanced custom fields", or "JetEngine", "Toolset Types" ?

MP

Matúš replied

4 months ago on January 21, 2024 at 9:09 pm

Oh none of those. I only tried to add it in importer. Couldnt I do it that way? If gtin is in the feed

J

James replied Support Agent

4 months ago on January 21, 2024 at 9:11 pm

Yes if, if you create type a name of a custom field in the importer e.g. "_gtin", it will import that value into the post meta table with the name "_gtin" and the value you have selected.

MP

Matúš replied

4 months ago on January 21, 2024 at 10:24 pm

like this? field type "text" is fine? 

J

James replied Support Agent

4 months ago on January 22, 2024 at 9:50 pm

Just to confirm that you have set the custom field "name", you can do this manually by checking the "Enable Text Field" button underneath the field.

MP

Matúš replied

4 months ago on January 23, 2024 at 9:03 pm

I started uploading. It take so long. And If im right it only work when the tab is open. That wouldnt be a problem because I opened it on laptop but I got this error. What does it mean?

J

James replied Support Agent

4 months ago on January 23, 2024 at 9:13 pm

Hi Matúš,

Can you make sure you have the latest version of ImportWP (v2.11.5) installed: https://wordpress.org/plugins/jc-importer/ , this version has a fix for this.

James

MP

Matúš replied

4 months ago on January 23, 2024 at 9:22 pm

Updated it right now! I hope it works. Thanks

1.And I really have to have open tab when uploading? 

2. How to set to not upload products twice. Now I dont know what product what last but when I select only to create it happen to create same product once again.,

Thank you

J

James replied Support Agent

4 months ago on January 23, 2024 at 9:27 pm

1. You could schedule your importer to run, this way it would run in the background: https://www.importwp.com/docs/how-to-schedule-an-importer/

2. On the permissions step what do you have setup as the unique identifier? as this will be used to dermine if a record should be inserted or updated.

MP

Matúš replied

4 months ago on January 23, 2024 at 9:40 pm

1. thank you.

2. I dont have anything as Unique identifier as Im just uploading products for first time. Should I also allow update and create at the same time? And set identifier for _sku

J

James replied Support Agent

4 months ago on January 23, 2024 at 9:53 pm

are you using the sku field in the importer, does each product have a unique sku value?, if so i would set the unique identifier to _sku

If you only want to insert new products, i would just have the insert permission enabled, as it will skip products that are going to be updated.

MP

Matúš replied

4 months ago on January 23, 2024 at 10:12 pm

Yes every product have unique SKU. So if i want to continue uploading just set "create" and leave unique identifier empty? Sorry im kinda lost

J

James replied Support Agent

4 months ago on January 23, 2024 at 10:25 pm

If every product has a unique sku, and you have set a value for the sku in the "3. Template Fields" step. 

Then i would recommend selecting _sku as the unique identifier in the "4. Permissions" step.

If you only want to insert new products and not update existing records, then only have the insert permission enabled before running the importer.

MP

Matúš replied

4 months ago on January 23, 2024 at 10:31 pm

By insert permission you mean CREATE, right?

J

James replied Support Agent

4 months ago on January 23, 2024 at 10:34 pm

Sorry, yes i meant Create.

If you then run the importer, limiting the number of rows (via the "Number of rows" field on teh "5. Run import" step) to the first couple of records to confirm that these are not being recreated, before running it on the full file

MP

Matúš replied

4 months ago on January 23, 2024 at 10:38 pm

But the problem is I dont know which row was the last one because of the error :/

J

James replied Support Agent

4 months ago on January 23, 2024 at 10:40 pm

If you start it from the start, it will skip records that already exist because you only have the create permission enabled.

J

James replied Support Agent

4 months ago on January 23, 2024 at 10:40 pm

If you click on the history tab, of the importer is there no logs for the importer that errored?

MP

Matúš replied

4 months ago on January 23, 2024 at 10:43 pm

Oh "record" mean a row I suppose. If thats correct i know where it ended.

MP

Matúš replied

4 months ago on January 23, 2024 at 10:48 pm

Tried to schedule import but got error once again 

J

James replied Support Agent

4 months ago on January 23, 2024 at 10:51 pm

Did you update the importer to version 2.11.5 ? as that error suggests that the old code is still there?

MP

Matúš replied

4 months ago on January 23, 2024 at 11:00 pm

Yes i did. But WP Importer Pro is still not updated. cant be a problem that custom plugin you sent me?

J

James replied Support Agent

4 months ago on January 23, 2024 at 11:07 pm

Instead of scheduling are you able to "run now" and see if the error is triggered, or if it is due to you using an outdated version of importwp pro (The lastest version on codecanyon of ImportWP Pro is v2.9.8).

If the error does still appear, can you deactivate, and remove the files for the "Import WP" plugin, then re download and activate it, making sure that all the "import wp" addons are still active.

 

MP

Matúš replied

4 months ago on January 23, 2024 at 11:43 pm

I run now and it works. But schedule still dont. As soon as I hit save and schedule it says import cancelled.

J

James replied Support Agent

4 months ago on January 24, 2024 at 9:08 am

Please update to the lastest version (which can be downloaded via codecanyon) of ImportWP Pro is v2.9.8

MP

Matúš replied

4 months ago on January 24, 2024 at 1:00 pm

I dont have codecanyon acces as i bought rehub bundle and import wp was included in it.

J

James replied Support Agent

4 months ago on January 24, 2024 at 1:02 pm

If you cant get access to the latest build, i would recommend just running the import manually.

MP

Matúš replied

4 months ago on February 1, 2024 at 8:55 pm

Hello! I don't know if I set the importer correctly but I have a problem with number of pictures that are created.

There are 20.000 media files. That should be correct because one product contains of 3 pictures. But why are there 270.000 inodes? Did I set up something wrong? As I know 1 media should be 1 inode :/

Could you help me please? many thanks

J

James replied Support Agent

4 months ago on February 1, 2024 at 9:05 pm

Hi,

If you have set the attachment settings to "Search media library before downloading new files", then you should not have duplicate images.

Do you know how many image sizes your theme has registered? then the total number of files would be 20k x number of image sizes.

James

MP

Matúš replied

4 months ago on February 2, 2024 at 12:56 am

Where can I find that setting? "Search media library before downloading new files"

I googled the theme register 3 sizes. But from numbers from media and inodes it looks like it generates 13 sizes.

J

James replied Support Agent

3 months ago on February 4, 2024 at 9:52 pm

Hi Matúš,

The "Search media library before downloading new files" field is found on the importer template step labelled "permission", under the attachment settings panel. This permission field makes sure each attachment is only downloaded once, and attachments shared between records will be reused.

James

MP

Matúš replied

3 months ago on February 9, 2024 at 4:25 pm

I already have that checked. and do you think this plugin is bad idea? https://wordpress.org/plugins/image-sizes/ 

To reduce inodes. Or if I will have this enabled and importing via Import WP there would be a problem?

Thank you so much

J

James replied Support Agent

3 months ago on February 9, 2024 at 10:16 pm

If the goal is to reduce the number of files in your media library, then this plugin might help, All ImportWP does is add the media file to the media library, after that it is up to your website to do what it whats, which in the default case of wordpress is to generate all the image sizes for your theme / plugins.

MP

Matúš replied

3 months ago on February 11, 2024 at 2:53 pm

Hello. I set GTIN so save to the products as this. Where is it saved? Thank you

J

James replied Support Agent

3 months ago on February 11, 2024 at 3:54 pm

Hi Matúš,

Custom fields are stored in the postmeta table, if you name the custom field "gtin" instead of {/gtin}, and keep the value as {/gtin}.

More information on custom fields can be found here on how to view them: https://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/#customfieldsintro

James

MP

Matúš replied

3 months ago on February 16, 2024 at 5:13 am

okay it works now! But another feed dont have the SKU so thats why I added the GTIN option to every product. But what should I fill in to the unique identifier? Because in uploading the feed I added the GTIN like this (attachment) Like you said to me. Thanks for help 

J

James replied Support Agent

3 months ago on February 16, 2024 at 7:06 am

You would choose the template field option: https://www.importwp.com/docs/permissions/#use-a-template-field-as-the-unique-identifier and select gtin if it exists, or if it doesnt exist in the dropdown you need to type it in the template field dropdown:

gtin

MP

Matúš replied

3 months ago on February 16, 2024 at 4:15 pm

Perfect. It seems working. But lot of products are unique. When I have in unique identifier "gtin" and check create and update. Would it create products for those unique ones? And if it not unique it would just update. Because im worried it would create duplicates.

Thank you

J

James replied Support Agent

3 months ago on February 16, 2024 at 5:58 pm

If you have selected to use a template field as the unique identifier and that template field is the guid , then when the importer runs it will search to see if the gtin exists, if it does not then it will create a new record, otherwise it will update the record that has the matching guid.

To make sure this is behaving as expected i would always recommend backing up your sites database and files, and running the import on a reduced dataset to confirm its working as expected.

MP

Matúš replied

3 months ago on February 16, 2024 at 6:30 pm

Thank you for clarifcation! But as Im uploading new feeds. (all from CJ) I have a error. Its the exactly same URL so it should be problem. Other feed works normal. Even when I put the link directly in the browser it will open s othe URL should be OK. :/ Could you help me please?

J

James replied Support Agent

3 months ago on February 16, 2024 at 6:48 pm

The 401 response code refers to this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401#:~:text=The%20HyperText%20Transfer%20Protocol%20(HTTP,credentials%20for%20the%20requested%20resource. , which means the remote server is saying you cant access it.

MP

Matúš replied

3 months ago on February 16, 2024 at 6:58 pm

Oh sorry I sent wrong screenshot. First time I had wrong url this is the correct one but still wont work.

J

James replied Support Agent

3 months ago on February 16, 2024 at 7:18 pm

The reques to download the file is taking longer than the time allowed +30 seconds, an example of increasing the timeout value can be found here: https://wordpress.stackexchange.com/a/346236

MP

Matúš replied

3 months ago on February 17, 2024 at 10:01 am

Heyy. im dealing with the hosting support. The timeout value was already set for many more than 30 seconds. But they recommended to split XML file to smaller files. Do you think its good idea? Because the feed have 200.000 products and is 0.3 GB large. Have you ever deal with file of this size? Thank you

MP

Matúš replied

3 months ago on February 17, 2024 at 11:08 am

okay its working with CSV feed. No need to help.

MP

Matúš replied

3 months ago on February 23, 2024 at 1:17 am

Hello! I uploaded 11.000 products and now im trying to update these products with another feed. In template field I left ID Field empty. In permission I set Unique identifier to _sku. But I get error - not enought permission to create a record. please help. This settings worked last time. I tried to update the plugin to newer version but still.

Thanks

J

James replied Support Agent

3 months ago on February 23, 2024 at 8:50 am

The not enough permissions to create a record, means that the unique identifier has not been found on existing products, so it wants to create a new record but cant.

Can you enable debug log via Tools > ImportWP > Tools/Settings > Enable Debug log.

Then run the importer, and once ran, at the bottom right of the screen there is a show debug, that opens up a panel, and click on download log, and attach that here.

MP

Matúš replied

3 months ago on February 23, 2024 at 1:41 pm

Here is the debug. I also have that you sen me to skip same SKUs.

J

James replied Support Agent

3 months ago on February 23, 2024 at 1:58 pm

Thanks, so using the first record from the import which has the sku of BA7589 , can you confirm a product exists on your website with that sku?

MP

Matúš replied

3 months ago on February 23, 2024 at 2:08 pm

No,not that one in particular. Many products are unique and dont share the SKU. I im looking at previous import (a week ago)when it updated succesfuly. That also say Not enough permission. But when it found match it updated. Now it say this. Im sending attachment. Old importer and error which I get now. How to fix it? Thanks

J

James replied Support Agent

3 months ago on February 23, 2024 at 2:13 pm

The image that shows the error message:

 Record is not unique: _sku, Matching ids: (228000, 224267, 223083)

This error means that the _sku used to find an existing record to update, was expecting to find a single result when instead if found 3 matches.

/wp-admin/post.php?post=228000&action=edit
/wp-admin/post.php?post=224267&action=edit
/wp-admin/post.php?post=223083&action=edit

MP

Matúš replied

3 months ago on February 23, 2024 at 3:25 pm

Oh thank you. Maybe when I uploaded last time I checked identifier to _sku to avoid uploading same SKU.

MP

Matúš replied

3 months ago on February 23, 2024 at 4:47 pm

Hey. I deleted duplicated SKU and now im seeing this in the log. Its true, in product fields I left Product Name empty. But thats because It changed the title of already TITLED product. How can I avoid this? Because when it updated the product it became from "Nike shoes"  to "Nike shoes Nike shoes" (for exemple)

MP

Matúš replied

3 months ago on February 23, 2024 at 4:49 pm

okay this should work. no need to help

MP

Matúš replied

3 months ago on February 23, 2024 at 5:43 pm

Hello! How could I only upload tge first part of the title? It devided by "-" I suppose it possible by field map but have no clue how. Thanks

J

James replied Support Agent

3 months ago on February 23, 2024 at 6:04 pm

You could get this using a custom function:

function iwp_hd_get_part($input = '', $part_no = 0, $sep = '-', $fallback = '')
{
    $parts = explode($sep, $input);
    if (isset($parts[$part_no])) {
        return $parts[$part_no];
    }

    return $fallback;
}

To use  get the first part of the title you would use it like so (changing "{1}" to the selector you need):

[iwp_hd_get_part("{1}", "0")]

MP

Matúš replied

3 months ago on February 23, 2024 at 6:11 pm

so I should put that code to functions.php

and then instead of product name where I put {/title} I should put this code [iwp_hd_get_part("{1}", "0")] ?

But i dont understand what to change. Change 1 for what please?

 

J

James replied Support Agent

3 months ago on February 23, 2024 at 6:19 pm

To add code to your website i would recommend adding it to a custom plugin: https://www.importwp.com/docs/using-code-snippets-in-wordpress/ , which i have done for you and attached.

Once installed and activated you can use it by replacing the product name where you have put {/title} and instead put:

[iwp_hd_get_part("{/title}", "0")]

 

MP

Matúš replied

3 months ago on February 23, 2024 at 6:24 pm

Oh thank you, you are the best! 

MP

Matúš replied

3 months ago on February 24, 2024 at 5:05 pm

Hello! Im updating prices of the products. But instead of updating the price it creates new content egg offer. Even when the log says it only updated the price. I have your custom plugin to skip same SKU. Im also trying to send a log but I get an error. Thanks for help.

J

James replied Support Agent

3 months ago on February 24, 2024 at 5:12 pm

Hi Matúš,

Since you are using the rehub importwp addon to import to content egg and not the one that we created, i cant really help you with this, the best i can do is have a look at their addon to see how they are handling permissions, if you are able to send over the following:

1.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.
2. Attach a copy of the csv/xml file being used
3. Attach a copy of the rehub theme and its importwp rehub addon

James

MP

Matúš replied

3 months ago on February 24, 2024 at 6:54 pm

im also sending the plugin. for sku

MP

Matúš replied

3 months ago on February 26, 2024 at 12:20 pm

heyyy any updates?

J

James replied Support Agent

3 months ago on February 26, 2024 at 1:18 pm

Hi Matúš,

I will let you know when i have an update.

James

J

James replied Support Agent

3 months ago on February 27, 2024 at 10:09 pm

I have updated he importwp-rhaddon and included the latest development build of the importer to add a new section to the permissions settings (screenshot attached).

MP

Matúš replied

3 months ago on February 28, 2024 at 2:29 pm

Thanks for files! But when I try to install the jc-importer-v2.12.1 it gets stuck and whole import-wp get corrupted so I had to backup my site. 

J

James replied Support Agent

3 months ago on February 28, 2024 at 2:33 pm

In your corruped.png screenshot, was there anything after the "Destination folder already exists"?

 

if this fails i would recommend extracting the jc-importer folder from the zip file and manually uploading it to your websites wp-content/plugins folder overwriting the existing jc-importer folder.

MP

Matúš replied

3 months ago on February 28, 2024 at 2:35 pm

No there was nothing after. It just get stuck like that. I waited like 15 minutes. And still nothing.

Okay I will try it like that and let you know if it works. 

MP

Matúš replied

3 months ago on February 28, 2024 at 3:32 pm

Plugin is succesfully uploaded. So I should not check the regular and sale price?

 

J

James replied Support Agent

3 months ago on February 28, 2024 at 3:34 pm

What are you trying to do?

What dropdown is selected for the update permissions?

MP

Matúš replied

3 months ago on February 28, 2024 at 3:39 pm

Just update prices. I've tried to only check Content Egg Fields but once again it also created new offer.

MP

Matúš replied

3 months ago on February 28, 2024 at 3:40 pm

Update is selected

J

James replied Support Agent

3 months ago on February 28, 2024 at 3:41 pm

What dropdown is selected for the update permissions? https://www.importwp.com/docs/permissions/#restrict-which-fields-can-be-imported

MP

Matúš replied

3 months ago on February 28, 2024 at 3:42 pm

MP

Matúš replied

3 months ago on February 28, 2024 at 3:43 pm

First time I ran it it created new offers. But second time it only updates the new one.

J

James replied Support Agent

3 months ago on February 28, 2024 at 3:43 pm

Can you show me what the dropdown at the top of the fields is set to?
https://www.importwp.com/docs/permissions/#restrict-which-fields-can-be-imported

MP

Matúš replied

3 months ago on February 28, 2024 at 4:08 pm

Only the following fields

J

James replied Support Agent

3 months ago on February 28, 2024 at 4:11 pm

So if you have it set to "only the following fields", then you would not want any of the rehub checkboxes checked (offer fields, content egg fields, review fields), otherwise this rehub/offer fields will be updated.

MP

Matúš replied

3 months ago on February 28, 2024 at 4:18 pm

Yes I want them updated. But the problem is there is already one field but it creates another one.  When I click update once again it updates the one which is already created. So thats good. But I would want to update just the old one.

J

James replied Support Agent

3 months ago on February 28, 2024 at 4:55 pm

Ok, looking into the plugin, the value set for the field: "Offer URL (required)" is used to generate a unique id based of this url, which is then used to either create a new offer or update an existing.

If this is not working for you, you can enable the "Unique Offer ID" , and set this to a value that wont change.

MP

Matúš replied

3 months ago on February 28, 2024 at 5:07 pm

Okay so its okay to put mpn as the Unique offer id?

And probably I have to re-generate all the products because they already got their ID from the URL am I right?

J

James replied Support Agent

3 months ago on February 28, 2024 at 6:34 pm

I am not that familier with content egg but i presume so.

if you change from the auto generated "unique offer ID" to a custom one then, yes you will need to regenerate them as the exiting offer will not get updated as it will have a miss matching id.

MP

Matúš replied

3 months ago on February 28, 2024 at 8:47 pm

Im uploading once again and it seems to be working. I tested first 100 product and it updated succesfully without creating any additional one. I'm so glad for your help! I will try to finish this on my own. But once again I really appriecate every plugin you did and every advice you said! 

Thank you

J

James replied Support Agent

3 months ago on February 28, 2024 at 8:52 pm

Hi Matúš,

Glad its working, if you need any more help just let me know.

I would really appreciate it if you could help us by leaving a review (https://wordpress.org/support/plugin/jc-importer/reviews/) , to help our growth and others to find this plugin.

Thanks

James

MP

Matúš replied

3 months ago on March 1, 2024 at 3:14 pm

Hello! I have little bit of issue. When I want to add the offer to the existing product, instead of adding it, the importer overwrites the original one. Now im trying to fix it by updating it by the first importer. But still, I dont know how to add more offer to product :/ Any help please?

J

James replied Support Agent

3 months ago on March 1, 2024 at 3:18 pm

Is this in regards to using the mpn as the unique offer id?

MP

Matúš replied

3 months ago on March 1, 2024 at 3:21 pm

probably it is. It makes sense because these two offers have same identifier.

J

James replied Support Agent

3 months ago on March 1, 2024 at 3:23 pm

Without using the mpn as the unique offer id, by default it uses a hash of the offer url, which allows each multiple offers to be set, so if a new url is present then it is classed as a new offer.

MP

Matúš replied

2 months ago on March 7, 2024 at 3:00 pm

Hi James! Hope you are good. Could you help me with what to add to field to show only the last part? I assume some code to the and put some shortcode to the field? Thank you so much

J

James replied Support Agent

2 months ago on March 8, 2024 at 9:10 pm

Hi Matúš,

Based on getting the information after the last ":" , this can be done with the following function:

function iwp_hd_extract_end($input = '')
{

    if (preg_match('/:\s+([^:]+)$/', $input, $matches) === 1) {

        return $matches[1];
    }

    return $input;
}

Using it:

[iwp_hd_extract_end("{/selector}")]

 

MP

Matúš replied

2 months ago on March 9, 2024 at 5:06 pm

Hi! Thanks for code! I put it into php in plugin folder but it doesnt seems to work.  :(

J

James replied Support Agent

2 months ago on March 10, 2024 at 3:07 pm

The image showing the Short description field suggests that the custom plugin has not been activated, as the function should not appear in the preview text.

MP

Matúš replied

2 months ago on March 10, 2024 at 10:12 pm

You were right! I forgot to activate it 😅. Thank you so much for the code.

 

MP

Matúš replied

2 months ago on March 18, 2024 at 3:57 pm

Hi James!

If you remember you sent me plugin to skip duplicate SKU and only post it once. I would like it to apply for multiple importers. So should I duplicate a plugin, rewrite the values and activate it or is there better solution? I'm sending the plugin in attachment. Maybe it's possible to work with different values in same .php ? Thank you

 

J

James replied Support Agent

2 months ago on March 18, 2024 at 4:20 pm

I have changed the code to look for a list of importer ids instead of a single id, e.g. 135431 or 1234 (as shown on line 15, you can add others by seperating with a comma e.g. $iwp_hd430_importer_id = [135431, 1234, 12345];

MP

Matúš replied

2 months ago on March 18, 2024 at 4:58 pm

Thank you. And one importer is from different network and it doesnt have /mpn but something different. For that one should I create another plugin ?

MP

Matúš replied

2 months ago on March 18, 2024 at 5:17 pm

It doesnt seems to work. And I checked its activated. To be sure I deleted the plugin. Uploaded it again and activated it.

J

James replied Support Agent

2 months ago on March 18, 2024 at 5:27 pm

it has been update and should be working, i had flipped one of the if statements.

To allow for multiple selectors i have updated the array to sepecify and id and its selector e.g.

$iwp_hd430_importer_id = [
    135431 => '{/mpn}',
    1234 => '{/mpn}'
];
MP

Matúš replied

2 months ago on March 18, 2024 at 5:42 pm

Perferct! It was missing "," at the end and was giving syntax error but with comma its working!

Thank you so much you are perfect!

MP

Matúš replied

2 months ago on March 19, 2024 at 1:25 pm

hi. I recently migrated to another hostinger and since then the scheduled import dont work. What should i set up or change? I set up real cron job and set it to run every 30 seconds i think.

thank you for help

J

James replied Support Agent

2 months ago on March 19, 2024 at 1:32 pm

When you view the importer what notification is displayed, can you send a screenshot: https://www.importwp.com/docs/how-to-schedule-an-importer/#understanding-scheduled-notifications

MP

Matúš replied

2 months ago on March 19, 2024 at 1:36 pm

I set it up yesterday about 10PM to run in 8 AM it didnt run at all as you can see in logs. Now I changed it (new settings.png) and it , to run in 5 minutes but it says import complete.

J

James replied Support Agent

2 months ago on March 19, 2024 at 1:40 pm

From now, how long is it till March 19th 2024 7:00am?

MP

Matúš replied

2 months ago on March 19, 2024 at 1:52 pm

It's 14:50 now. I set it to run at morning but it didnt. Now I set it at 14:40 and also it would not start.

J

James replied Support Agent

2 months ago on March 19, 2024 at 1:57 pm

Are you able to provide me with wp-admin access to the website?

Is this the only importer on the website or are there other scheduled importers?

MP

Matúš replied privately

2 months ago on March 19, 2024 at 2:04 pm

MP

Matúš replied

2 months ago on March 19, 2024 at 4:18 pm

Do you see the message? I sent the details.

J

James replied Support Agent

2 months ago on March 19, 2024 at 4:27 pm

Hi, 

Yes i did, and i have been waiting for the import to run to confirm.

Based on your website you are running a very old version of ImportWP Pro that was not compatiable with the latest version of ImportWP, which is why the scheduling was not working.

I have updated your version and rescheduled your imports and they seem to trigger, however your cron is running every 5 minutes, not every 30 seconds.

James

MP

Matúš replied

2 months ago on March 19, 2024 at 4:31 pm

Should I set cron for every 30 seconds? It only means it run the cron 5 minutes later right? 

J

James replied Support Agent

2 months ago on March 19, 2024 at 5:46 pm

Hi,

The wordpress cron is incharge of running many actions for wordpress and all active theme/plugins, each time the cron is ran it will attempt run as many of these tasks as possible, but depending on how much work is required and how much time is available all tasks that are not complete will be ran the next time the cron runs, repeating this process.

The interval between cron jobs being triggered will effect how long the import takes to complete, as the import is not run constantly from the scheduled date, instead it is only resumed and stopped during the available cron processing window when your cron is triggered. So if your cron is set to run every 5 minutes, the importer should import some records and then stop when the cron job ends, and will then resume the import again the next time the cron job is ran, repeating this until all records are imported.

James

MP

Matúš replied

2 months ago on March 19, 2024 at 7:14 pm

Thank you so much. I will probably leave it as it is if its working. Dont wanna mess it up.

I would like to ask if its possible to export size value from same SKU to one product? like an attribute. Many feeds have it like this and I dont know what do. Would be possible if importer is set for skipping duplicates SKU? 

Thank you

J

James replied Support Agent

2 months ago on March 19, 2024 at 8:15 pm

Can you give me a full example of what you mean? and what you have tried so far.

MP

Matúš replied

2 months ago on March 19, 2024 at 8:24 pm

To add size value. But the feed has only one size per product. Different GTIN but same SKU. Because every size is a different link. I've already wrote to network about this but they said it not possible to customize feed.

I've tried only this (attachment) but it only import one size not all avaible ones.

MP

Matúš replied

2 months ago on March 19, 2024 at 8:26 pm

I want to that all same SKUs would merge the size value to one product. 

MP

Matúš replied

2 months ago on March 19, 2024 at 8:35 pm

this is better exemple because the first one that i sent,i dont know even how to set it up because there are multiple parameters and [1] wont work. 

The screenshot Ive sent now have excluded size value and even show item group id, which is the same as SKU so same thing.

J

James replied Support Agent

2 months ago on March 19, 2024 at 8:41 pm

Using that as an example are you saying that you want to create a variable product with a size dropdown?

e.g. the variable product would be he product "BA7589" and the size for the visible product in your screenshot would be "37 1/3", and there would be multiple sizes each with an "item_group_id" of "BA7589"?

MP

Matúš replied

2 months ago on March 19, 2024 at 8:52 pm

it doesnt have to be variable product. only one product with multiple size attributes.

for exemple 'sku" BA7589 have 6 different products each with different size attribute.

I would like to merge all size attributes from BA7589  to only one product.

J

James replied Support Agent

2 months ago on March 20, 2024 at 11:21 pm

My only thoughts would be to create an importer that uses the column with the value "BA7589" as a unique identifier, and setting a size attribute that will append values  each time the record is updated. Hoever this would work the same for every product in the import file.

MP

Matúš replied

2 months ago on March 21, 2024 at 1:12 am

But I would have to turn off to skip duplicate SKU plugin right? And also that would create duplicate offer because my current importer have unique identifier set as link.
And the importer cant delete value. So if a size would be out of stock, it would be still writen as attribute right?

MP

Matúš replied

2 months ago on March 22, 2024 at 5:21 pm

It updates if I create another importer. But I have a problem with another importer because it creates multiple offers because I set unique offer as link. and the link changes overtime so new offer is created. Now I changed it but how to delete already created offer by that importer? thank you

J

James replied Support Agent

2 months ago on March 24, 2024 at 10:15 pm

To delete all items previously imported by an importer, you need to enable the delete permission and then you can set the max rows to 0, this means no records will be imported so the importer will delete everything.

MP

Matúš replied

2 months ago on March 25, 2024 at 1:53 am

But that delete whole product or only offer? 

J

James replied Support Agent

2 months ago on March 25, 2024 at 9:32 pm

If you do not want to delete the product completly then i do not have a solution for you, could you maybe not import those offers with on the other importer (using a filter or something), and only import them with the importer you want

MP

Matúš replied

2 months ago on March 27, 2024 at 9:18 pm

But they will not be updated, or overwrited. Because the unique identifier is different and no longer exist. As the link no longer exist.

But im trying to delete all import, but log says not enough permission. please help

J

James replied Support Agent

2 months ago on March 28, 2024 at 8:42 am

Did you set the max rows to 0, so that it would not attempt to import and go straight to the delete stage, if not it will run through the import file and say it doesnt have enough permissions for each action like it says in your screenshot, then when it reaches the delete stage it will remove them.?

 

MP

Matúš replied

2 months ago on March 28, 2024 at 10:51 am

Okay it works when i have 0. Didnt know about this. Thanks

J

James replied Support Agent

2 months ago on March 30, 2024 at 12:08 pm

Thank you for letting me know.

MP

Matúš replied

2 months ago on March 30, 2024 at 12:20 pm

Hi. The reason why it was uploading duplicates product is, when some size from product sold out, it automatically uploaded new offer. Now I set unique identifier for ID, but my question is. If I remove the unique identifier from fields and then hit update. Would it also create new offer? Or how to avoid this kind of situation? 

Thank you so much

J

James replied Support Agent

2 months ago on March 30, 2024 at 3:13 pm

WHen you are talking about unique id do you mean the "importer unique id" (https://www.importwp.com/docs/permissions/#unique-identifier) or the "Unique Offer ID" in the rehub content egg plugin

MP

Matúš replied

2 months ago on March 30, 2024 at 3:24 pm

Unique offer id

J

James replied Support Agent

2 months ago on March 30, 2024 at 3:28 pm

Sorry i am not sure (as i am not the plugin author, as it is built and maintained by rehub), i would recommend backing up your database and trying it.

All i know is that field is the unique offer id is used to update existing offers or create new ones.

MP

Matúš replied

2 months ago on April 2, 2024 at 5:56 pm

Thanks for info.

Hi. Could you please tell me if the stock status is setup correctly? 

J

James replied Support Agent

2 months ago on April 2, 2024 at 6:07 pm

This depends on what your {/availablity} field returns?

MP

Matúš replied

2 months ago on April 2, 2024 at 6:17 pm

its this 

  • <availability>
    • in stock
    </availability>
  •  
J

James replied Support Agent

2 months ago on April 2, 2024 at 6:20 pm

You will need to map the values from availablity to:

instock
outofstock
onbackorder

MP

Matúš replied

2 months ago on April 2, 2024 at 6:29 pm

oooh thanks,

like this?

J

James replied Support Agent

2 months ago on April 2, 2024 at 6:30 pm

That looks like it should do it, i would recommend running a small import of the first record to confirm

MP

Matúš replied

2 months ago on April 2, 2024 at 6:43 pm

im checkfing through xml viewer and the "out of stock" is nowhere to be found. So probably the feed deletes the out of stock product.

J

James replied Support Agent

1 month ago on April 17, 2024 at 8:50 pm

Hi Matúš,

I am closing this ticket since i havent heard back in over two weeks, replying to the ticket will re-open it if required.

Thanks
James

MP

Matúš replied

4 weeks ago on April 23, 2024 at 6:50 pm

Hi! Is it possible in the description field show attribute? For example I have product which have size attribute: 46,42,41. I want to show that in the description field. Is that possible?

Thank you so much

J

James replied Support Agent

4 weeks ago on April 23, 2024 at 7:47 pm

Each product variation has there own descriptions so you could append the size value into the description text during import, or you could modify the description output in by your theme using some woocommerce template filters.

MP

Matúš replied

2 weeks ago on May 3, 2024 at 11:40 am

Thanks for info. I have one problem. How can I set up this field? When I put {/PARAM/VAL} its upload also size and color because the problem is the PARAM value is there multiple times. Thank you for help

J

James replied Support Agent

2 weeks ago on May 3, 2024 at 12:26 pm

If you want to target only the first you can change it to:

{/PARAM[0]/VAL}

or the second

{/PARAM[1]/VAL}

MP

Matúš replied

2 weeks ago on May 3, 2024 at 3:54 pm

thank you so much