Multiple products

Closed

Import WP Addon - Content Egg Updated 3 months ago 221 Replies

Matúš asked 1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year ago on January 11, 2024 at 3:04 pm

Okay I found the file in File manager 

MP

Matúš replied

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

1 year 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

12 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

12 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

12 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

12 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

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

like this? field type "text" is fine? 

J

James replied Support Agent

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

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

By insert permission you mean CREATE, right?

J

James replied Support Agent

12 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

12 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

12 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

12 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

12 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

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

Tried to schedule import but got error once again 

J

James replied Support Agent

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

12 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

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

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

MP

Matúš replied

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

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

okay this should work. no need to help

MP

Matúš replied

11 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

11 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

11 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

11 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

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

Oh thank you, you are the best! 

MP

Matúš replied

11 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

11 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

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

im also sending the plugin. for sku

MP

Matúš replied

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

heyyy any updates?

J

James replied Support Agent

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

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

Update is selected

J

James replied Support Agent

11 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

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

MP

Matúš replied

11 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

11 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

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

Only the following fields

J

James replied Support Agent

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

MP

Matúš replied

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

Do you see the message? I sent the details.

J

James replied Support Agent

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

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

But that delete whole product or only offer? 

J

James replied Support Agent

10 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

10 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

10 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

10 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

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

Thank you for letting me know.

MP

Matúš replied

10 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

10 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

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

Unique offer id

J

James replied Support Agent

10 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

10 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

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

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

MP

Matúš replied

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

its this 

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

James replied Support Agent

10 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

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

oooh thanks,

like this?

J

James replied Support Agent

10 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

10 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months 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

9 months ago on May 3, 2024 at 3:54 pm

thank you so much

MP

Matúš replied

8 months ago on May 30, 2024 at 6:21 am

Hey James. 

I have a problem, when importing the importing get stuck. Its fault in every importer but everytime it different. sometimes it can procces 20 000/80 000 and sometimes only 5000. Also when I try to download a large feed it cant. Do you think both problems are caused by same thing?

Thank you so much 

J

James replied Support Agent

8 months ago on May 30, 2024 at 7:55 am

Hi Matus,

The downloading of large files can be fixed by increasing the wordpress remote get (from the error message it is set to 30seconds, you can increase that with the following code snippet).

function custom_timeout_extend( $time )
{
    return 60;
}

add_filter( 'http_request_timeout', 'custom_timeout_extend' );

With the streets importer, is this ran via a cron or is it a manual import? if you click on the history tab, and go into the latest one at the top, what status does it say?

James

MP

Matúš replied

8 months ago on May 30, 2024 at 8:09 am

Should I add it as custom plugin?

It says DEBUG cron. But I noticed it didnt get stuck. Now its on 7242/24702. 

J

James replied Support Agent

8 months ago on May 30, 2024 at 8:16 am

The importer runs for as long as it can when the wordpress cron is ran, and then will repeat the process until complete, so the speed is determined by how often your wordpress cron is triggered by your server (also depending on your site it may not be triggered every cron due to other tasks wordpress has to perform): https://www.importwp.com/docs/how-to-schedule-an-importer/

If you are comfertable with creating a custom plugin then that might be the best way to keep it all seperate: https://www.importwp.com/docs/using-code-snippets-in-wordpress/

MP

Matúš replied

8 months ago on May 30, 2024 at 8:29 am

Thanks for info!

But the code isnt working :(

I activated the plugin. Maybe there is problem somewhere else

J

James replied Support Agent

8 months ago on May 30, 2024 at 8:31 am

What is your servers timeouts? 

Can you try changing the code to increase its priority:

function custom_timeout_extend( $time )
{
    return 60;
}

add_filter( 'http_request_timeout', 'custom_timeout_extend', 999999 );
MP

Matúš replied

8 months ago on May 30, 2024 at 8:40 am

I've tried it. Still the same error. 

Is servers timeout maxExecutionTime""? In host setting i have it set to 360. 

J

James replied Support Agent

8 months ago on May 30, 2024 at 8:57 am

Can you try the following code instead:

add_filter('http_request_args', function ($args) {
    $args['timeout'] =  60;
    return $args;
});
MP

Matúš replied

8 months ago on May 30, 2024 at 10:09 am

It said timed out after 60 seconds. So I change it to 180 and now it says critical error. 

J

James replied Support Agent

8 months ago on May 30, 2024 at 10:12 am

does your server have an error log to find what the error is?

MP

Matúš replied

8 months ago on May 30, 2024 at 1:24 pm

I enabled error_log but it doesnt create any file. Ive read it only make a log avout php error. Is this php error?

J

James replied Support Agent

8 months ago on May 30, 2024 at 1:27 pm

Yes, the error is a php error, if you enable debug mode in wordpress and debug log (updating or adding the constants to your wp-config file), it should generate a log file in /wp-content/debug.log

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true );

More info on debugging wordpress: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/

MP

Matúš replied

8 months ago on May 30, 2024 at 6:24 pm

I activated it and now on top of the screen I have some notice.

J

James replied Support Agent

8 months ago on May 30, 2024 at 6:26 pm

yes, thats debug mode, it shows everything.

if you want to hide them and only show them in the debug log add these to your wp-config

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
MP

Matúš replied

8 months ago on May 30, 2024 at 6:59 pm

thank you. 

I checked the debug log and it said the same error as on the top of the website. But it says different error on the website.

MP

Matúš replied

8 months ago on May 30, 2024 at 6:59 pm

Error: <!DOCTYPE html> <html style="height:100%"> <head> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title> 503 Service Unavailable </title><style>@media (prefers-color-scheme:dark){body{background-color:#000!important}}</style></head> <body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;"> <div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;"> <h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">503</h1> <h2 style="margin-top:20px;font-size: 30px;">Service Unavailable </h2> <p>The server is temporarily busy, try again later!</p> </div></div></body></html> , Error Code: 503, Error Status Text: error

 

J

James replied Support Agent

8 months ago on May 30, 2024 at 7:06 pm

When is this error triggered, when it is downloading a csv/xml file?

MP

Matúš replied

8 months ago on May 31, 2024 at 10:40 am

I changed the file to XML and now it says increase connection timeout. I increased it to 300 seconds in the code you sent by it still say this :/

J

James replied Support Agent

8 months ago on May 31, 2024 at 10:42 am

This means that the 300 seconds limit you changed it to, was to long for your server to handle and you will need to change your servers: max_execution_time and possibly other settings.

MP

Matúš replied

8 months ago on May 31, 2024 at 11:14 am

when i change it to 120 seconds it say this.

cURL error 28: Operation timed out after 120000 milliseconds with 107626099 out of 139013906 bytes received

so i changed it to only to 121 seconds and i got an error

Error: <html><head><title>500 Internal Server Error</title><style>@media (prefers-color-scheme:dark){body{background-color:#000!important}}</style></head><body> <h2>Request Timeout</h2> <p>This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'. </p> </body></html> , Error Code: 500, Error Status Text: error

 

J

James replied Support Agent

8 months ago on May 31, 2024 at 11:16 am

Yes, thats the same error of your server timinig out before the file is downloaded.

MP

Matúš replied

8 months ago on May 31, 2024 at 11:22 am

Oh okay. I tried even turn off the timeout limit in .htacces with code but it still doesnt work. what else could i do please?

RewriteEngine On

RewriteRule .* - [E=noabort:1]
RewriteRule .* - [E=noconntimeout:1] 
J

James replied Support Agent

8 months ago on May 31, 2024 at 11:25 am

Sorry, i am not very familier with server setups.

https://www.php.net/manual/en/info.configuration.php

MP

Matúš replied

8 months ago on May 31, 2024 at 11:28 am

No problem you helped very much in everything im very thankful for that!

MP

Matúš replied

6 months ago on July 14, 2024 at 11:29 pm

Hi! I had some problems with woocommerce filters and subcategories. I updated wordpress, all the plugins. Problem is gone but now is problem with importer. Instead of price of the product it creates crazy numbers. I have version 2.9.5 of the import wp pro. could it cause the problem? many thanks

J

James replied Support Agent

6 months ago on July 15, 2024 at 8:18 am

Hi Matus,

What does the feed data look like for that record? are you able to provide it?

Can you also 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.

James

MP

Matúš replied

6 months ago on July 15, 2024 at 11:07 am

Hi! I dont know what you mean feed data will copy my XML preview. Its regular CJ feed. also attaching screenshot how price fields are filled in.

  • <record>
    • <entry>
      • <program_name>
        • Footshop.sk
        </program_name>
      • <program_url>
        • https://www.footshop.sk
        </program_url>
      • <catalog_name>
        • FootshopSK_google_all
        </catalog_name>
      • <last_updated>
        • 2024-07-08T03:38:30.368-07:00
        </last_updated>
      • <id>
        • 329896_Universal
        </id>
      • <title>
        • Šiltovka New Era Los Angeles Dodgers 9Forty Trucker Terracotta/ White Universal
        </title>
      • <description>
        • Šiltovka New Era Los Angeles Dodgers 9Forty Trucker Terracotta/ White Universal si môžete vybrať vo Footshope len za 31 €. Značka: New Era, Farba: Terracotta/ White Dostupné veľkosti: Universal
        </description>
      • <link>
        • https://www.kqzyfj.com/click-100389376-13502360?url=https%3A%2F%2Fwww.footshop.sk%2Fsk%2Fsiltovky%2F329896-new-era-los-angeles-dodgers-9forty-trucker-terracotta-white.html%23%2F73
        </link>
      • <impression_url>
        • https://www.ftjcfx.com/image-100389376-13502360
        </impression_url>
      • <image_link>
        • https://static.ftshp.digital/img/p/1/1/3/2/7/5/0/1132750-cropped.jpg
        </image_link>
      • <additional_image_link>
        • https://static.ftshp.digital/img/p/1/1/3/2/7/5/3/1132753-cropped.jpg
        </additional_image_link>
      • <availability>
        • in stock
        </availability>
      • <price>
        • 31.00 EUR
        </price>
      • <google_product_category>
        • 166
        </google_product_category>
      • <google_product_category_name>
        • Oblečení a doplňky
        </google_product_category_name>
      • <product_type>
        • Šiltovky
        </product_type>
      • <brand>
        • New Era
        </brand>
      • <gtin>
        • 197882853739
        </gtin>
      • <mpn>
        • 60503397
        </mpn>
      • <identifier_exists>
        • yes
        </identifier_exists>
      • <condition>
        • new
        </condition>
      • <age_group>
        • adult
        </age_group>
      • <color>
        • Terracotta
        </color>
      • <color>
        • White
        </color>
      • <gender>
        • unisex
        </gender>
      • <size>
        • Universal
        </size>
      • <size_system>
        • EU
        </size_system>
      • <item_group_id>
        • 329896
        </item_group_id>
      • <custom_label_0>
        • discount5
        </custom_label_0>
      • <product_highlight>
        • []
        </product_highlight>
      • <shipping>
        • <price>
          • 5.00 EUR
          </price>
        • <country>
          • SK
          </country>
        </shipping>
      </entry>
    • <entry>
      • <program_name>
        • Footshop.sk
        </program_name>
      • <program_url>
        • https://www.footshop.sk
        </program_url>
      • <catalog_name>
        • FootshopSK_google_all
        </catalog_name>
      • <last_updated>
        • 2024-07-08T03:38:30.371-07:00
        </last_updated>
      • <id>
        • 261478_9
        </id>
      • <title></title>
      • Tenisky Vans Vault OG SK8-Hi LX Table Scraps Brown EUR 42
      </entry>
    • <description>
      • Tenisky Vans Vault OG SK8-Hi LX Table Scraps Brown EUR 42 si môžete vybrať vo Footshope len za 53.49 €. Značka: Vans, Farba: Table Scraps Brown Dostupné veľkosti: 40,41,42,42.5
      </description>
    • <link></link>
    </record>
J

James replied Support Agent

6 months ago on July 16, 2024 at 8:43 am

Hi Matuus,

To test if the importer is breaking your prices, i would recommend on the importer, creating a custom field e.g. _iwp_test_price, and set this to the same value/selector as the price being set for your product.

Then once the import has been ran, compare the custom field "_iwp_test_price" against the broken price and see if these two match.

If you can let me know how this goes.

The only other thing i noticed is your price in the feed end with "EUR" (e.g. "31.00 EUR"), is this being removed before the price is imported or is the rhaddon doing this for you.

James

MP

Matúš replied

6 months ago on July 16, 2024 at 12:10 pm

I put the code to the description field. Instead of just number it generated whole code. Maybe the plugin which is code connected to is not working with new version of woocomerce and wordpress? 

I fill in the offer currency field to EUR. When the offer is generated its without the word "EUR". The EUR is in different bracket.

I also ran in another problem when trying to schedule import. It wont start because it says it has invalid url. If i click run now it works. So url is definitely valid. 

MP

Matúš replied

6 months ago on July 16, 2024 at 12:13 pm

Now i see another importing is working even on schedule. i dont understand.

J

James replied Support Agent

6 months ago on July 16, 2024 at 12:39 pm

Thanks, that being entered into the description suggests that the iwp_if_not_empty custom method is missing from your website and you should add this back in.

If you are having issues with the cron, i would recommend updating to the latest version of import wp pro (v2.11.0) and import wp (v2.14.0).

MP

Matúš replied privately

6 months ago on July 16, 2024 at 1:06 pm

J

James replied Support Agent

6 months ago on July 16, 2024 at 1:17 pm

Glad its working, 

The only license codes i can check are those of import wp pro, so i would recommend downgrading your version of importwp to the one you previously had working. you can do that by accessing the advanced tab on the wordpress.org plugins page and at the bottom select the version you want from the dropdown and clicking download: https://wordpress.org/plugins/jc-importer/advanced/

MP

Matúš replied

6 months ago on July 16, 2024 at 9:31 pm

i downgraded. hope it will work :) thank you

MP

Matúš replied privately

5 months ago on August 7, 2024 at 8:09 pm

J

James replied Support Agent

5 months ago on August 11, 2024 at 9:42 pm

Hi Matúš,

I have been able to replicate this issue, and will update you when an alternative solution is available.

The issue is with php and its ftp extension, the importer checks to see if the file on the ftp server exists by checking its file size, for large files the ftp extension returns a size of -1 which normally means that the file does not exist.

James

J

James replied Support Agent

5 months ago on August 12, 2024 at 9:41 pm

Hi Matúš,

A fix has been released in v2.14.2 (https://wordpress.org/plugins/jc-importer/), where you can now disable the filesize check when fetching ftp files by adding the following code snippet to your website:

add_filter('iwp/ftp/disable_size_check', '__return_true');

This should allow your large xml file to be downloaded (you might need to remove the final / on your ftp url tho):

James

MP

Matúš replied

5 months ago on August 13, 2024 at 4:14 pm

Hi! Thanks for update and code snippet. But now it loads and at the end I get error :(

Error: <html><head><title>500 Internal Server Error</title><style>@media (prefers-color-scheme:dark){body{background-color:#000!important}}</style></head><body> <h2>Request Timeout</h2> <p>This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'. </p> </body></html> , Error Code: 500, Error Status Text: error

 

J

James replied Support Agent

5 months ago on August 13, 2024 at 4:16 pm

Hi,

This error suggests you need to extend your servers timeout: https://stackoverflow.com/questions/3829403/how-to-increase-the-execution-timeout-in-php to allow the downloading of the file.

You might need to check your server error log for more information if it is just the timeout issue or something else.

James

MP

Matúš replied

5 months ago on August 13, 2024 at 4:43 pm

I increase values in .htaccess and it works! Thank you very much you are the best 

MP

Matúš replied

4 months ago on October 4, 2024 at 1:20 am

Hi. Since the update the FTP links are working good but the other URL wont update. 

It says A valid URL was not provided.

thanks for help

J

James replied Support Agent

4 months ago on October 4, 2024 at 8:15 am

Hi Matúš,

Can you paste in the url?

James

MP

Matúš replied privately

3 months ago on October 8, 2024 at 10:27 am

J

James replied Support Agent

3 months ago on October 8, 2024 at 10:40 am

That error suggests that the datasource is no longer working, can you confirm the xml/csv feeds exist, and if so can you go into the importer, under step 1 click on download, and see if the feed can be downloaded, if not then the server is having issues fetching the feed.

MP

Matúš replied privately

3 months ago on October 8, 2024 at 10:18 pm

J

James replied Support Agent

3 months ago on October 9, 2024 at 9:14 pm

Hi,

I have found the issue, the url is now flagged as unsafe via wordpress reject_unsafe_urls filter, to bypass this you can add the following code to your website:

// FIX: A valid URL was not provided
function iwphd440_allow_unsafe_url($parsed_args)
{
    remove_filter('http_request_args', 'iwphd440_allow_unsafe_url');
    $parsed_args['reject_unsafe_urls'] = false;
    return $parsed_args;
}

add_filter('iwp/importer/datasource/remote', function ($source) {
    add_filter('http_request_args', 'iwphd440_allow_unsafe_url');
    return $source;
});
MP

Matúš replied

3 months ago on October 10, 2024 at 11:16 am

thank you so much james! now when i click download it says new file added! so it should be okay. you are very good man thank you.