Código SQL:
Ver original
SELECT p.products_model AS item_sku, p.products_quantity AS quantity, p.products_image AS main_image_url, p.products_price AS standard_price, d.products_description AS product_description, d.products_name AS item_name, m.manufacturers_name AS manufacturer, m.manufacturers_name AS brand_name, ef.products_extra_fields_value AS external_product_id, pr.products_extra_fields_value AS feed_product_type, ph.products_extra_fields_value AS metal_type, pn.products_extra_fields_value AS part_number, pa.products_extra_fields_value AS recommended_browse_nodes1, "EAN" AS external_product_id_type, "Update" AS update_delete, "EUR" AS currency FROM products AS p LEFT JOIN products_description AS d ON p.products_id = d.products_id AND language_id = 2 LEFT JOIN products_to_products_extra_fields AS ef ON p.products_id = ef.products_id AND ef.products_extra_fields_id = 1 LEFT JOIN products_to_products_extra_fields AS pn ON p.products_id = pn.products_id AND pn.products_extra_fields_id = 4 LEFT JOIN products_to_products_extra_fields AS pa ON p.products_id = pa.products_id AND pa.products_extra_fields_id = 5 LEFT JOIN products_to_products_extra_fields AS pr ON p.products_id = pr.products_id AND pr.products_extra_fields_id = 7 LEFT JOIN products_to_products_extra_fields AS ph ON p.products_id = ph.products_id AND ph.products_extra_fields_id = 9 LEFT JOIN manufacturers AS m ON p.manufacturers_id = m.manufacturers_id ;
La cuestión es que necesito un par de cosas más y llevo varias horas intentandolo y no doy con la manera, necesito filtrar todos los productos que aparecerán en la tabla, según el campo products_to_products_extra_fields, en donde products_extra_fields_id con el valor 8 tenga un products_extra_fields_value con valor 1.
Una vez hecho esto necesitaria añadir un campo a la tabla que me mostrase la url del producto de la tienda, esta hecho para las imagenes de la siguiente manera
Código:
pero no se como se haría en el caso de la url, perdón si la forma de expresarme no es la correcta, pero estoy bastante pegado en todo esto, un saludo. <setting name="BaseUrl" serializeAs="String"> <value>http://www.solerjoyeros.es/images/{0}</value>