bluestyle Posted June 27, 2016 Share Posted June 27, 2016 (edited) Va salut. Am nevoie de un cod SQL prin care sa pot actualiza campurile "Displayed text when in stock" si "Displayed text when backordering is allowed" ale unui singur furnizor. Ma puteti ajuta? Edited June 27, 2016 by bluestyle (see edit history) Link to comment Share on other sites More sharing options...
zaurus Posted June 27, 2016 Share Posted June 27, 2016 despre ce furnizor e vorba? (text nume furnizor) si cel mai bine ar fi sa stii ID al acelui furnizor. o intrebare colaterala ar fi daca produsele acelui furnizor sunt unice sau mai exista si alti furnizori cu acelasi produs Link to comment Share on other sites More sharing options...
bluestyle Posted June 28, 2016 Author Share Posted June 28, 2016 Vom face actualizarea pe baza id-ului furnizorului, cred ca este cel mai bine. Cred ca sunt cateva produse vandute de 2 furnizori, insa asta nu ne incurca cu nimic. Link to comment Share on other sites More sharing options...
bluestyle Posted October 24, 2016 Author Share Posted October 24, 2016 Zaurus, poti lasa solutia aici te rog? Cu siguranta va fi utila si altora. Link to comment Share on other sites More sharing options...
zaurus Posted November 6, 2016 Share Posted November 6, 2016 pentru Displayed text when in stock update prefix_product_lang set available_now="in stoc" where id_product in (select id_product from prefix_product_supplier where id_supplier=x) pentru Displayed text when backordering is allowed update prefix_product_lang set available_later="disponibil la comanda" where id_product in (select id_product from prefix_product_supplier where id_supplier=x) unde "prefix" este prefixul tabelelor din baza de date si "x" este id-ul acelui furnizor ca sa afli cine e "x" te uiti in tabela prefix_supplier Link to comment Share on other sites More sharing options...
lightsb Posted November 6, 2016 Share Posted November 6, 2016 (edited) Eu as merge mult mai departe si as adauga un comentariu in functie de stoc-ul existent al produsului + distribuitor. Am atasat si codul ... rugamintea ar fi sa va jucati cu el pe un site de test ca apoi dupa verificari sa il rulati pe live. UPDATE ps_stock_available t1, ps_product t2, ps_product_lang t3, ps_supplier t4 SET t3.available_now=(CASE WHEN t1.quantity='1' THEN 'Stoc Limitat' WHEN t1.quantity>'1' THEN 'In Stoc' end), t3.available_later=(CASE WHEN t1.quantity='0' THEN 'Disponibil la Comanda' WHEN t1.quantity<'0' THEN 'Fara Stoc' end) WHERE t1.id_product=t2.id_product AND t1.id_product=t3.id_product AND t2.id_supplier=t4.id_supplier AND t4.id_supplier='id_supplier' Unde id_supplier se vede din BO Distribuitori. Edited November 6, 2016 by lightsb (see edit history) Link to comment Share on other sites More sharing options...
zaurus Posted November 6, 2016 Share Posted November 6, 2016 da, se poate face si asta. exista 2 abordari, prin proceduri stocate in baza de date (doar pentru statusurile de stoc vav de stocul preluat de la furnizor/stocul magazinului) sau procesare de feed-uri cu acest modul http://addons.prestashop.com/en/17449-total-import-pro.html Link to comment Share on other sites More sharing options...
lightsb Posted November 6, 2016 Share Posted November 6, 2016 Cam scump modulul doar pentru acest lucru. Mai sus am adaugat update-ul pentru cele 2 campuri in functie de stoc si distribuitor. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now