Export Aliexpress Product Store URL and Product URL

Emmanuel

New Member
Is there a way to export the products including the product URL and store URL? Regular export doesn't include these fields, I wonder if there is a special field or someone has the SQL that will enable me export it through php or the database from the back-end

upload_2017-7-25_17-53-49.png
 

NicolasLagios

New Member
Hello friend, for the link you can use WP ALL EXPORT or similar plugin that gives you the ability to export custom xml with custom php functions:
Export Type: Custom XML
XML:
<?xml version="1.0" encoding="UTF-8"?>
<data>
    <!-- BEGIN LOOP -->
    <post>
        <ID>{ID}</ID>
        <Title>{Title}</Title>
        <Sku>{Sku}</Sku>
        <AliUrl>https://www.aliexpress.com/item/[replaceurlstr({Title})]/{Sku}.html</AliUrl>
    </post>
    <!-- END LOOP -->
</data>

And also insert and save the following php function:
PHP:
<?php
function replaceurlstr($Title){
    $Title = preg_replace('/\s+/', '-', $Title);
    return $Title;
}
?>

As a result you get the working aliexpress link for all of your products (maybe somelinks is special and not working, but you can do a quick check with excel vba function and fix it manually):
Screenshot_1.png

Best Regards, Nicolas ;)
 

NicolasLagios

New Member
This is for the product url only
Extra:
if for some reason the export stuck, do not use php code at all and change
Code:
<AliUrl>https://www.aliexpress.com/item/[replaceurlstr({Title})]/{Sku}.html</AliUrl>
to
Code:
<AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>

after that open excel and:
1. check the entire column "aliurl"
2. open search and replace dialog and replace spaces with "-"

After that you will se that the 90% of the urls working and you can visit to make whatever you want, also if you want a specific job, eg to categorize your already imported products, you can use a vba macro that automatically visit link by link and copy/paste categories.

of course this is an example, you can use the product type custom field if you want to categorize your products....

I am writing a macro for that, I will post it in the near future....

cheers ;)
 
Last edited:

Raff

Active Member
This is for the product url only
Extra:
if for some reason the export stuck, do not use php code at all and change
Code:
<AliUrl>https://www.aliexpress.com/item/[replaceurlstr({Title})]/{Sku}.html</AliUrl>
to
Code:
<AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>

after that open excel and:
1. check the entire column "aliurl"
2. open search and replace dialog and replace spaces with "-"

After that you will se that the 90% of the urls working and you can visit to make whatever you want, also if you want a specific job, eg to categorize your already imported products, you can use a vba macro that automatically visit link by link and copy/paste categories.

of course this is an example, you can use the product type custom field if you want to categorize your products....

I am writing a macro for that, I will post it in the near future....

cheers ;)

Hi! I tried your code on WP All Export but i can't make it work right. Upon PREVIEW, i receive multiple result for the same product but only the first result has SKU value.

Can i have your full code to export your products? Thanks!
 

NicolasLagios

New Member
Hi! I tried your code on WP All Export but i can't make it work right. Upon PREVIEW, i receive multiple result for the same product but only the first result has SKU value.

Can i have your full code to export your products? Thanks!

Thas is because the preview function only shows you 10 products and your first product has 9 more variations but only the main product has sku.

I believe that is the problem.

Forget the php code and use only this on xml (between <post></post> tags):
Code:
<AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>
after that open excel and:
1. check the entire column "aliurl"
2. open search and replace dialog and replace spaces with "-"

you will see that the 90% of the urls working and you can visit to make whatever you want ;)


extra!!!
If you want also to export variations of your products use:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<data>
    <!-- BEGIN LOOP -->
    <post>
        <id>{ID}</id>
        <Title>{Title}</Title>
        <Sku>{Sku}</Sku>
        <AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>
        <ProductAttributes>{Product Attributes}</ProductAttributes>
    </post>
    <!-- END LOOP -->
</data>

after that open excel check the entire variation column and open "Search and Replace" dialog
if you want eg the brand name and the cell values it's like this:
Code:
a:7:{s:10:"brand-name";a:6:{s:4:"name";s:10:"Brand Name";s:5:"value";s:9:"HUAMIANLI";s:8:"position";i:0;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:9:"item-type";a:6:{s:4:"name";s:9:"Item Type";s:5:"value";s:10:"Toothpaste";s:8:"position";i:1;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:10:"ingredient";a:6:{s:4:"name";s:10:"Ingredient";s:5:"value";s:9:"maquiagem";s:8:"position";i:2;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:6:"net-wt";a:6:{s:4:"name";s:6:"NET WT";s:5:"value";s:4:"100g";s:8:"position";i:3;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:8:"quantity";a:6:{s:4:"name";s:8:"Quantity";s:5:"value";s:10:"toothpaste";s:8:"position";i:4;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:9:"age-group";a:6:{s:4:"name";s:9:"Age Group";s:5:"value";s:6:"Adults";s:8:"position";i:5;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:12:"model-number";a:6:{s:4:"name";s:12:"Model Number";s:5:"value";s:15:"diagnostic-tool";s:8:"position";i:6;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}}

you can delete everything before "Brand Name"
search for: *"Brand Name"
replace with: "Brand Name"

then you must delete everything after: "HUAMIANLI"
and how you can do that????
search for: *;s:
replace with nothing

be careful, some cells may be different, so you will have 2 use search and replace 2 times, just think a clever way and you will have your results.

cheers to everybody ;)
 

Raff

Active Member
Thas is because the preview function only shows you 10 products and your first product has 9 more variations but only the main product has sku.

I believe that is the problem.

Forget the php code and use only this on xml (between <post></post> tags):
Code:
<AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>
after that open excel and:
1. check the entire column "aliurl"
2. open search and replace dialog and replace spaces with "-"

you will see that the 90% of the urls working and you can visit to make whatever you want ;)


extra!!!
If you want also to export variations of your products use:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<data>
    <!-- BEGIN LOOP -->
    <post>
        <id>{ID}</id>
        <Title>{Title}</Title>
        <Sku>{Sku}</Sku>
        <AliUrl>https://www.aliexpress.com/item/{Title}/{Sku}.html</AliUrl>
        <ProductAttributes>{Product Attributes}</ProductAttributes>
    </post>
    <!-- END LOOP -->
</data>

after that open excel check the entire variation column and open "Search and Replace" dialog
if you want eg the brand name and the cell values it's like this:
Code:
a:7:{s:10:"brand-name";a:6:{s:4:"name";s:10:"Brand Name";s:5:"value";s:9:"HUAMIANLI";s:8:"position";i:0;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:9:"item-type";a:6:{s:4:"name";s:9:"Item Type";s:5:"value";s:10:"Toothpaste";s:8:"position";i:1;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:10:"ingredient";a:6:{s:4:"name";s:10:"Ingredient";s:5:"value";s:9:"maquiagem";s:8:"position";i:2;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:6:"net-wt";a:6:{s:4:"name";s:6:"NET WT";s:5:"value";s:4:"100g";s:8:"position";i:3;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:8:"quantity";a:6:{s:4:"name";s:8:"Quantity";s:5:"value";s:10:"toothpaste";s:8:"position";i:4;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:9:"age-group";a:6:{s:4:"name";s:9:"Age Group";s:5:"value";s:6:"Adults";s:8:"position";i:5;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}s:12:"model-number";a:6:{s:4:"name";s:12:"Model Number";s:5:"value";s:15:"diagnostic-tool";s:8:"position";i:6;s:10:"is_visible";i:1;s:12:"is_variation";i:0;s:11:"is_taxonomy";i:0;}}

you can delete everything before "Brand Name"
search for: *"Brand Name"
replace with: "Brand Name"

then you must delete everything after: "HUAMIANLI"
and how you can do that????
search for: *;s:
replace with nothing

be careful, some cells may be different, so you will have 2 use search and replace 2 times, just think a clever way and you will have your results.

cheers to everybody ;)
Actually i tried your xml code and import it to my another websites, it created lots of post/product. Ithink it created more than 5 post/product with the same product title. How can I update the product based on SKU without happening this?
 

NicolasLagios

New Member
I have already replied you before about this. Let me be more specific:
download your xml
Import on excel
Enable filters on column headers
Filter sku column to show you only the rows that don't have an sku
Delete those rows
Remove the filters now

Now you have your main products only.

This is not an alidropship problem or wp all export problem. This is not a problem at all. You must learn how to export products and how to use excel. Believe me it's very simple.
 
Top