我想创建一个CSV,这样我就可以将我的所有产品图片和类别从opencart网站上的一个域迁移到我的wordpress网站上的新域,有人可以告诉我如何完成这项任务 - 很感谢吗?< / p>
答案 0 :(得分:0)
您可以使用export/import tool
答案 1 :(得分:0)
请使用以下SQL查询。有关完整脚本的信息,请参阅我的教程。 https://www.pearlbells.co.uk/export-opencart-product-csv/
$sql = "SELECT p.product_id as Id, model, p.sku, upc, quantity,stock_status_id,image,manufacturer_id,shipping,"
. "price,weight,weight_class_id,length_class_id,subtract,minimum,status,name,tag,"
. "meta_title,meta_description,meta_keyword, pd.description as description"
. " FROM oc_product p LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id)"
. " WHERE pd.language_id = '1' GROUP BY p.product_id ORDER BY pd.name ASC";
$result = $conn->query($sql);
对于类别:
$sql = 'SELECT category_id,name,description,meta_title,meta_keyword,meta_description FROM oc_category_description ORDER BY name ASC ';