KöveZoli Posted November 29, 2016 Posted November 29, 2016 (edited) Sziasztok, Szeretnék egy új labelt a termékhez az "Új" és a "Kiárusítás" mellé, mégpedig "Kifutó". A css formázást meg tudom oldani, a kód részére csak más motorra találtam megoldást. Az Állapot: Új/Használt/Felújított -nak túl sok értelme nincs. Ez lehetne "Elérhető" és "Kifutó" Hogyan kellene kiegészíteni a kódot, hogy ha pl. az állapot=Kifutó, akkor jelenjen meg a label? Köszönöm! Edited November 29, 2016 by Quechua (see edit history) Share this post Link to post Share on other sites More sharing options...
pattila01 Posted November 29, 2016 Posted November 29, 2016 Product.tpl-ben ahol rátennéd a label-t lehívod a condition értékét ( {$product->condition} ) és az eredetihez hasonló módon megcsinálod a célod szerint (vagy az egész eredetit rakd oda és írd át). Share this post Link to post Share on other sites More sharing options...
KöveZoli Posted November 29, 2016 Posted November 29, 2016 A product.tpl-ben ez lett (most "new", de majd "kifuto" lesz a condition == 'new'): <!-- kifutó--> {if $product->condition == 'new'} <span class="kifuto-box no-print"> <span class="kifuto-label">{l s='Kifutó'}</span> </span> {/if} <!-- kifutó vége--> A pruduct-list.tpl-ben is kellene. Ott a new (vagy a sale) alapján ez lenne, viszont nem működik. <!-- kifutó--> {if $product->condition == 'new'} <a class="kifuto-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="kifuto-label">{l s='Kifutó'}</span> </a> {/if} <!-- kifutó vége--> Share this post Link to post Share on other sites More sharing options...
pattila01 Posted November 29, 2016 Posted November 29, 2016 $product->condition helyett ponttal próbáld meg: $product.condition 1 Share this post Link to post Share on other sites More sharing options...
KöveZoli Posted November 29, 2016 Posted November 29, 2016 (edited) Ott a pont. product.tpl: <!-- kifutó--> {if $product->condition == 'kifuto'} <span class="kifuto-box no-print"> <span class="kifuto-label">{l s='Kifutó'}</span> </span> {/if} <!-- kifutó vége--> product-list.tpl: <!-- kifutó--> {if $product.condition == 'kifuto'} <a class="kifuto-box" href="{$product.link|escape:'html':'UTF-8'}"> <span class="kifuto-label">{l s='Kifutó'}</span> </a> {/if} <!-- kifutó vége--> Edited November 29, 2016 by Quechua (see edit history) 1 Share this post Link to post Share on other sites More sharing options...
pattila01 Posted November 29, 2016 Posted November 29, 2016 Örülök, ha sikerült megoldani. Share this post Link to post Share on other sites More sharing options...
KöveZoli Posted November 29, 2016 Posted November 29, 2016 Sikerült, köszönöm! 1 Share this post Link to post 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