Closed ghost closed 4 years ago
Maybe we could create some sample data of our own? Just 2 or 3 of each type (simple, variable, grouped) with more up to date products like Bluray discs instead of vinyl records, something downloadable, the latest ccPhone, or whatever. Nice little job for somebody 😃.
I've been playing around with making new images and now have a new set of sample data (csv). This pulls images from a download folder at classiccommerce.cc. Haven't worked out how to do the xml version yet.
The file is here: https://classiccommerce.cc/wp-content/downloads/wc-product-export-29-9-2020-1601372824458.csv
Note that when you export products, it puts a prefix of wc on the file. Might be nice to change that to cc at some stage.
If you are testing this, you should end up with 15 products as shown on this page: https://classiccommerce.cc/docs/installation-and-setup/importing-sample-data/
No rush on this. Not thinking this will make it into 1.0.0 so it is a work in progress.
There are supposed to be two ways to import the sample data. Using "Import via Classic Commerce Products" or using "Import via ClassicPress Importer". (the first is recommended).
If I try the second process I see this under Tools > Import
Why does it say Wordpress? And it doesn't seem to handle products anyway. The CC import method listed above only wants the csv file. But that can be done easily from Products > Import.
I'm not understanding how to make up an xml file that it can use. Maybe we should just drop the xml import option completely?
@simplycomputing I used an online resource to convert what csv you shared to xml. Please test this. convertcsv.xml.zip
I tried converting online too and it didn't work. But I will try yours.
I think we should drop the whole xml thing. The recommended procedure is to use the csv through CC. It's simple and works perfectly. Why also add another clunky option?
Same result:
Import WordPress
9:17 Specification mandate value for attribute featured
9:17 attributes construct error
9:17 Couldn't find end of Start Tag Is line 9
9:25 expected '>'
9:25 Opening and ending tag mismatch: row line 3 and Is
10:20 Specification mandate value for attribute in
10:20 attributes construct error
10:20 Couldn't find end of Start Tag Visibility line 10
10:48 expected '>'
10:48 Opening and ending tag mismatch: root line 2 and Visibility
10:48 Extra content at the end of the document
There was an error when reading this WXR file
Details are shown above. The importer will now try again with a different parser...
Sorry, there has been an error.
This does not appear to be a WXR file, missing/invalid WXR version number
I exported the products as xml from another site and was able to then upload to a new site.
This one works, but I can't see where it is pulling the images from. sample_products.zip
This one works, but I can't see where it is pulling the images from. Wonderful!
sample_products.zip I see locations
https://simplycomputing.work/wp-content/uploads/2020/09/cc-single-2.png
https://classiccommerce.cc/wp-content/uploads/2020/08/classiccommerce-icon-100x100.png
https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2017/08/single.jpg
https://demo.woothemes.com/woocommerce/wp-content/uploads/sites/56/2017/08/album.jpg
Only those two below are outside the cc.cc domain.
Yes, they are the downloadable product urls.
I want to pull product images from a downloads folder on cc site. It was easy with csv. I just changed the url.
But in the xml where is it getting the image for scarf, or cap?
I'm lost here.
The current xml file has this for the cap product image:
<guid isPermaLink="false">https://woocommercecore.mystagingwebsite.com/?product=cap</guid>
My xml has this:
<guid isPermaLink="false">https://classiccommerce.cc/product/import-placeholder-for-747/</guid>
I don't know how this works.
Let's focus on the CSV and txt which are CC recommended.
"Let's focus on the CSV and txt which are CC recommended."
That's what I'm thinking
Yes, the xml approach is actually useless. I just deleted the dummy products from the classiccommerce.cc site and then tried uploading dummy data to a new CC site. The product info came through OK but NO IMAGES.
So, to be able to serve images from an xml file it seems that we need to keep a dummy shop alive and it has to be available forever.
I think the WP importer is pretty rubbish at importing images. I've seen plenty of comments to that effect over the years and it's also been my experience.
One of the problems - I think - is that it uses _thumbnail_id
in the XML file. That's the ID of the image on the source website. So when you come to import into a new site, _thumbnail_id
will be completely useless. Hence, no images.
Personally, I'd forget the WP importer and just focus on the tools available in CC - that's what they're there for. The WP importer just makes life unnecessarily difficult but if we do find there's a compelling reason to make it work, we can revisit it in a later release.
Great job btw! And yes, it'd be nice to get this into 1.0.0 even if it means delaying by a few days or until you're ready Alan.
Is your feature request related to a problem? Please describe. The sample data import csv pulls images from Woocommerce servers and includes a Woo-related image.
Describe the solution you'd like Ideally the image should be changed to something more appropriate. In fact, all the images could be hosted on our server and then we can supply images we want.
Additional context No urgency for this but just noting it as something to look at down the track.
Current image:
Suggested replacement image: