Jump to content

Edit History

monicaamb

monicaamb


Hello.

I see that PrestaShop exports some data to you but I'm missing those two. How can I get them?

I see I can obtain by the table product_lang but I don't know how to do it.

I will share what I have now:

SELECT 
    CONCAT(LEFT(cu.firstname, 1), '. ', cu.lastname) AS customer, 
    o.id_order, 
    o.reference, 
    o.total_paid_tax_incl, 
    os.paid, 
    osl.name AS osname, 
    o.id_currency, 
    cur.iso_code, 
    o.current_state, 
    o.id_customer, 
    cu.deleted AS deleted_customer,
    os.color, 
    o.payment, 
    s.name AS shop_name, 
    o.date_add, 
    cu.company, 
    cl.name AS country_name, 
    o.invoice_number, 
    o.delivery_number, 
    (SELECT 
        IF(count(so.id_order) > 0, 0, 1) 
        FROM w5kn_orders so 
        WHERE (so.id_customer = o.id_customer) AND (so.id_order < o.id_order) LIMIT 1) 
    AS new, 
    p.reference as sku,
    pl.name AS product_name

FROM w5kn_orders o

LEFT JOIN w5kn_customer cu ON (o.id_customer = cu.id_customer)

LEFT JOIN w5kn_currency cur ON (o.id_currency = cur.id_currency)

INNER JOIN w5kn_address a ON (o.id_address_delivery = a.id_address)

LEFT JOIN w5kn_order_state os ON (o.current_state = os.id_order_state)

LEFT JOIN w5kn_shop s ON (o.id_shop = s.id_shop)

INNER JOIN w5kn_country c ON (a.id_country = c.id_country)

INNER JOIN w5kn_country_lang cl ON (c.id_country = cl.id_country AND cl.id_lang = o.id_lang)

LEFT JOIN w5kn_order_state_lang osl ON (os.id_order_state = osl.id_order_state AND osl.id_lang = o.id_lang)

INNER JOIN w5kn_order_detail od ON (o.id_order = od.id_order)

INNER JOIN w5kn_product p ON (od.product_id = p.id_product)

LEFT JOIN w5kn_product_lang pl ON (pl.id_product = p.id_product AND pl.id_lang = o.id_lang)

WHERE o.id_shop IN ('1')

ORDER BY o.id_order DESC

LIMIT 50;

Thank you very much in advance

monicaamb

monicaamb


Hello.

I see that PrestaShop exports some data to you but I'm missing those two. How can I get them?

Thank you very much in advance

×
×
  • Create New...