some error

Closed
autoRoyal - Automotive WordPress Theme autoRoyal - Automotive WordPress Theme August 06, 2019
Login to reply
Ivano Cardassi
4 years ago

Hello Alex.

It's me again. :)

Is there any possibility that I can make the import of images work outside of serialization?

Well, I noticed this:

the wordpress theme only accepts serialization linked with the id.

example:

a:2:{s:3: "url";s:73: "https://dealeronfire.it/wp-content/uploads/2020/11/honda_jazz_top_ant.png";s:2: "id";s:3: "310";}

ok.

Instead of the url, I have to put this:

{images[1]/image[2]/large[1]}

because inside this xml array, there is a link to the image.

I tried everything... but I couldn't link the serialization of the image with the code

for example:

a:1:{s:5:"image";a:1:{s:3:"big";s:80:"{images[1]/image[2]/large[1]}";}}


Even if I had to pay for it to work, this is ok.

As long as I can implement the images.

I'll leave you the xml link if you want to take a look:

http://xml.gestionaleauto.com/autoenoi/export_gestionaleauto.php

please.... please... please... :=)

Translated with www.DeepL.com/Translator (free version)

Alex Gurghis Support Agent
4 years ago

Hey Ivano,

We didn't work on wp all import plugin compatiblity.

// Alex

Ivano Cardassi
4 years ago

Hi Alex.

a year has passed since the last one. Have you managed to integrate wp all import into the theme? Remember? can't import car images. Because I want to use your theme and not more motors. Let me know, thanks

Alex Gurghis Support Agent
5 years ago

Hey Ivano,

Still working on it. I will let you know when I will have the fix.

Regards,

Alex

Ivano Cardassi
5 years ago

hi, Alex. Have you some news for me? :) thanks my friend

Alex Gurghis Support Agent
5 years ago

Thank you,

I will work on it.

Ivano Cardassi
5 years ago

and this: http://www.wpallimport.com/documentation/addon-dev/image-fields/

Now i installed full version on website

Ivano Cardassi
5 years ago
they give me only this link: http://www.wpallimport.com/documentation/images/overview/
Ivano Cardassi
5 years ago
this is full licensed
Ivano Cardassi
5 years ago
no, but they asked for $99 just to check in.ahahahhaha
Alex Gurghis Support Agent
5 years ago

Hey Ivano,

Yes, please can you send the wp all import zip. Didn't they say what exactly is misspelled?

Ivano Cardassi
5 years ago

If we can integrate wp all import, your site sales may also increase. Many dealers are looking for sites with Wp-all import integration. And that's why motors is so popular... :)

Ivano Cardassi
5 years ago

Hi ALex.

I see. I wrote to the programmers of wp all import since I have the original version. they tell me that the code is misspelled. and that's what by mistake. If you want, I'll send you the original wp-all import zip

Alex Gurghis Support Agent
5 years ago

Hey Ivano,


I tried on your website and it doesn't work. It returns the error: "Your server terminated the import process".


I created a function that is run after the car is imported to add attached images into an array.


/*-----------------------------------------------------------------------------------*/
/* Update Vehicle Images After WP All Import
/*-----------------------------------------------------------------------------------*/
add_action('pmxi_saved_post', 'post_saved', 10, 1);
function post_saved($id) {
 $vehicle_image_gallery_import_status = "start";
    $args = array(
  'post_type' => 'attachment',
  'numberposts' => -1,
  'post_status' => 'any',
  'post_parent' => $id,
 );
 $attachments = get_posts( $args );
 $current = 0;
 $vehicle_image_gallery = "";
 if ( $attachments ) {
  foreach ( $attachments as $attachment ) {
   $current++;
   $vehicle_image_gallery[$current]['id'] = $attachment->ID;
   $vehicle_image_gallery[$current]['url'] = wp_get_attachment_url( $attachment->ID );
  }
 }
 $vehicle_image_gallery_import_status .= " - imported " . $current . " images";
    
    update_post_meta($id, 'vehicle_image_gallery', $vehicle_image_gallery);
    update_post_meta($id, 'vehicle_image_gallery_import_status', $vehicle_image_gallery_import_status);

I added this function to your website but I can't test it as it wp all import doesn't work.

Ivano Cardassi
5 years ago
To make wp all import work, in the screen of the cars, you have to choose the item "car" - Then you have to insert the custom fields and the taxonomy... Otherwise it will always give error. The first upload, the one I did, is the correct one. Maybe it's better to work on that?
Ivano Cardassi
5 years ago

Yeah, i see.

this happens if you don't know wp all import well. In fact I see that it does not matter anything, but not for the server, but because it has nothing to import ... in fact says 1 items only. Actually there are 21 items. The first file I made, loads correctly .... I only have this problem of images... If you can tell me how you thought to solve it, maybe I can help you...

Alex Gurghis Support Agent
5 years ago

Hey Ivano,

We have a solution but we don't have the pro version of the wp all  import plugin to test it and on your server it stops the import.

Kind Regards,

Alex

Ivano Cardassi
5 years ago

Hi Alex, have you some news for me? :) thanks

Ivano Cardassi
5 years ago

Hi, Alex. Sorry for the late response. I got back from vacation at the office today. I'm attaching the XML file for importing cars. I remind you that you can't import the images of the cars. With other themes, however, these problems are not there. Thank you

Alex Gurghis Support Agent
5 years ago

Hey Ivano,

1. As I can see there are some issue with the import. The year of the cars doesn't look right "2015" and this is breaking the filter.

2. Fixed the error.

3. Can you send me the xml file to try to import the vehicles with WP-all import plugin.

Regards,

Alex

Ivano Cardassi
5 years ago

Hi, I'm experiencing several problems in the topic.
1) In Inventory, the filter does not work. Every time I click search, it always takes me to the home. I've tried different types of filters, but none of them work.

2) Always in the inventory gives me this error: Warning
Invalid argument supplied for foreach() in
/home/c4plan78/public_html/citroengraziani/wp-content/plugins/autoroyal/includes/autoroyal-core-functions.php
on line 8685

3) I can't import car images from xml files with the Wp-all import plugin. Both with Motors and with Carspot I have never had any of these problems.

link: https://www.citroengraziani.4plan.it/?page_id=1984