![]() ![]() LEFT JOIN ps_category_lang cl ON(cp.id_category = cl.id_category) LEFT JOIN ps_category_product cp ON(p.id_product = cp.id_product) LEFT JOIN ps_product_lang pl ON(p.id_product = pl.id_product) P.online_only AS 'Available online only (0 = No, 1 = Yes)',Ġ AS 'Uploadable files (0 = No, 1 = Yes)', GROUP_CONCAT(DISTINCT(CONCAT((fl.name), ':', (fvl.value), ':0')) SEPARATOR ',') AS 'Feature (Name:Value:Position)', ![]() P.show_price AS 'Show price (0 = No, 1 = Yes)', P.available_for_order AS 'Available for order (0 = No, 1 = Yes)', Pl.available_later AS 'Text when backorder allowed', Pl.available_now AS 'Text when in stock', Pl.meta_description AS 'Meta description', IF(t.name IS NOT NULL, GROUP_CONCAT(DISTINCT(t.name) SEPARATOR ','), '') AS 'Tags (x,y,z.)', Pl.description_short AS 'Short description', P.additional_shipping_cost AS 'Additional shipping cost', P.minimal_quantity AS 'Minimal quantity', P.supplier_reference AS 'Supplier reference #', IF(pr.reduction_type = 'percentage', pr.reduction, '') AS 'Discount percent', IF(pr.reduction_type = 'amount', pr.reduction, '') AS 'Discount amount', P.price AS 'Price tax excluded or Price tax included', GROUP_CONCAT(DISTINCT(cl.name) SEPARATOR ',') AS 'Categories (x,y,z.)', Feel free to use it: SELECT p.id_product, p.active, pl.name AS 'Name', ![]() Here's the code for all the data that we needed, there are quantities, descriptions etc. Sorry I'm new to SQL export, so please don't judge me. I need to replicate it for at least 3 more images, (image2_url, image3_url etc.). assuming we have smaller image id than 100'000 ) now take all the digits separetly as MySQL doesn't support loops in SELECT statements I use this code to populate the url for the image: CONCAT(' - get the shop domain I have the code where I get the image_url for the main image, but I can't get all the rest images in separate columns. I'm trying to export csv file from Prestashop. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |