distrax Posted May 7, 2016 Share Posted May 7, 2016 Nabend, ich möchte gern den Stückpreis in der Kategorieansicht unter den Preis anzeigen lassen. Kurz und knapp: Wie kann ich das anstellen? Wo es hin muss, weiß ich wohl, nur was ich da einfügen muss weiß ich nicht. Bin über jede Hilfe dankbar - danke schon einmal. Presta 1.5.x Link to comment Share on other sites More sharing options...
Whiley Posted May 7, 2016 Share Posted May 7, 2016 Hallo distrax, guckst du hier: https://www.prestashop.com/forums/topic/520495-grundpreisangabe-auf-der-produkt%C3%BCbersichtseite-oder-startseite/?do=findComment&comment=2303766 Stückpreis = Grundpreis. Läuft auch mit dem 1.5er,. Grüsse Whiley 1 Link to comment Share on other sites More sharing options...
distrax Posted May 13, 2016 Author Share Posted May 13, 2016 (edited) Hallo Whiley und dankeschön. Tatsächlich hatte ich das auch schon gefunden, aber es nicht hinbekommen, das unter den Preis anzeigen zu lassen. Für alle anderen der Code {if $product.unit_price_ratio && $product.price} {math equation="b/a" a=$product.unit_price_ratio b=$product.price assign=realunit} {convertPrice price=$realunit} {l s="per"} {$product.unity} {/if} muss in den <div class="right_block"> Ich habe es direkt unter diese Line gesteckt. Edited May 13, 2016 by distrax (see edit history) Link to comment Share on other sites More sharing options...
distrax Posted May 13, 2016 Author Share Posted May 13, 2016 Doch noch nicht ganz gelöst.Bei den Produkten mit Stückpreis passt es jetzt super. Allerdings bei allen anderen habe nun auch die {l s="per"} ausgabe, sprich ich habe ein "/" unter dem Preis stehen. Ich habe aber auch keine Ahnung. Ich gehe davon aus, das irgendwas an dem Code fehlt, aber ich weiß einfach nicht was. Link to comment Share on other sites More sharing options...
eleazar Posted May 14, 2016 Share Posted May 14, 2016 Schreib einfach nur per oder lass zumindest das l s= innerhalb der geschweiften Klammern weg. Alternative: Ändere die Übersetzung in der Frontend-Abteilung des Templates. Link to comment Share on other sites More sharing options...
distrax Posted May 14, 2016 Author Share Posted May 14, 2016 Ah der Herr eleazar ;-) Neh... leider ist es das nicht. Also, bei Artikeln MIT Grund-/Stückpreis wird ja alles tutti dargestellt. Bei den Produkten OHNE Grund- / Stückpreis hingegen steht das per bzw. der Slash trotzdem noch da (ganz alleine und verwaist), nur halt die Stückpreisangaben nicht. Das finde ich voll doof , da soll dann halt garnichts stehen. Link to comment Share on other sites More sharing options...
eleazar Posted May 14, 2016 Share Posted May 14, 2016 Ja stimmt, du solltest dann aber auch abfragen, ob überhaupt ein Stückpreis angegeben ist, Also etwas in der Art: {if $product.unit_price_ratio && $product.price && $product.unity > 0} 1 Link to comment Share on other sites More sharing options...
distrax Posted May 14, 2016 Author Share Posted May 14, 2016 (edited) War mir ja klar, das irgendwas fehlte, nur wie ich das reinbekomme, wusste ich halt nicht.Danke allen beteiligten! Für interessierte, das muss dann da stehen: {if $product.unit_price_ratio && $product.price && $product.unity > 0} {math equation="b/a" a=$product.unit_price_ratio b=$product.price assign=realunit} {convertPrice price=$realunit} {l s="per"} {$product.unity} {/if} Edited May 14, 2016 by distrax (see edit history) 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