Jump to content

Jonathan75004

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • First Name
    Jonathan
  • Last Name
    ATSU

Jonathan75004's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Good tip musicmaster. I have excluded orders cancelled and never paid. And it worked. Now i'll compare the numbers with my orders (paper) for be sure. Thank you for helpping me!
  2. Merci erouvier29 pour cette réponse. J'ai approfondi l'analyse des chiffres de cette table, avec mes commandes et il s'avère qu'ils correspondent. date_upd étant apparemment la date de la dernière commande du produit.
  3. Hello everyone, I introduce myself, Jonathan. I am new to the PrestaShop community and in development. My problem is in the subject of BDD sql. My task is simple verbally: "Show the number of sales of each product in my shop." So I exported the products to the list sql manager. { SELECT SQL_CALC_FOUND_ROWS a.`id_product`, b.name as name, `reference`, supplier_reference, a.price as price, sa.active as active, cl.name` name_category`, sav.`quantity` have sav_quantity, sa.` active`, IF (sav.`quantity` <= 0, 1, 0) badge_danger FROM `has ps_product` LEFT JOIN `ps_product_lang` b ON (= b.`id_product` a.`id_product` AND b.`id_lang` = 1 AND b.`id_shop` = 1) LEFT JOIN` ps_image` i ON (i.`id_product` = a.`id_product`) LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` a.`id_product` = = 0 AND sav.`id_product_attribute` AND sav.id_shop = 1 AND sav.id_shop_group = 0) JOIN `ps_product_shop` its ON (= a.`id_product` sa.`id_product` AND sa.id_shop = a.id_shop_default) LEFT JOIN `ps_category_lang` cl ON (= sa.`id_category_default` cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = a.id_shop_default) LEFT JOIN `ps_shop` shop ON (= shop.id_shop a.id_shop_default) LEFT JOIN `ps_image_shop` image_shop ON (= image_shop.`id_image` i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = a.id_shop_default) LEFT JOIN `ps_product_download` pd ON (= pd.`id_product` a.`id_product`) WHERE 1 ORDER BY GROUP BY sa.id_product a.`id_product` ASC } Until then, no worries! I would now add the number of sales by product. So I run the sql command below, to see what would come out before the partner with the above command: { SELECT * FROM ps_product_sale } However columns "quantity" and "sale_nbr" out numbers that do not match much to me and are often identical. What keeps me going further. How can I view the number of sales by products in my product list? Can you help me please ? I begin to curl :-/ Thank you in advance for your help.
  4. Bonjour à toutes et à tous, Je me présente, Jonathan. Je suis nouveau dans la communauté PrestaShop ainsi que dans le développement. Mon problème se situe dans le sujet des BDD sql. Ma tâche est simple verbalement: "Afficher le nombre de vente de chaque produits de ma boutique." J'ai donc exporté la liste produits vers le gestionnaire sql. { SELECT SQL_CALC_FOUND_ROWS a.`id_product`,b.name as nom,`reference`, supplier_reference, a.price as price,sa.active as active,cl.name `name_category`,sav.`quantity` as sav_quantity, sa.`active`, IF(sav.`quantity`<=0, 1, 0) badge_danger FROM `ps_product` a LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 1 AND b.`id_shop` = 1) LEFT JOIN `ps_image` i ON (i.`id_product` = a.`id_product`) LEFT JOIN `ps_stock_available` sav ON (sav.`id_product` = a.`id_product` AND sav.`id_product_attribute` = 0 AND sav.id_shop = 1 AND sav.id_shop_group = 0 ) JOIN `ps_product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = a.id_shop_default) LEFT JOIN `ps_category_lang` cl ON (sa.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = a.id_shop_default) LEFT JOIN `ps_shop` shop ON (shop.id_shop = a.id_shop_default) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_image` = i.`id_image` AND image_shop.`cover` = 1 AND image_shop.id_shop = a.id_shop_default) LEFT JOIN `ps_product_download` pd ON (pd.`id_product` = a.`id_product`) WHERE 1 GROUP BY sa.id_product ORDER BY a.`id_product` ASC } Jusque là, pas de soucis! Je souhaite maintenant, y ajouter le nombre de vente par produits. J'ai donc exécuté la commande sql ci-dessous, pour voir ce qui en sortirait avant de l'associer à la commande ci-dessus: { SELECT * FROM ps_product_sale } Cependant les colonnes "quantity" et "sale_nbr" sortent des chiffres qui ne correspondent pas à grand chose pour moi et sont souvent identique. Ce qui m'empêche d'aller plus loin. Comment puis-je afficher le nombre de ventes par produits dans ma liste de produits ? Pouvez-vous m'aider s'il vous plaît ? je commence à friser :-/. Merci d'avance pour votre aide.
×
×
  • Create New...