JuanjoSC Posted March 2, 2018 Share Posted March 2, 2018 Hola, En prestashop 1.6 modificaba el archivo: BO\themes\default\template\controllers\products\prices.tpl añadiendo este código: <div style="margin-top:10px;"> <span>[spam-filter]toolsConvertPrice price=$product->wholesale_price*1.21}|string_format:$priceDisplayPrecisionFormat} {$currency->prefix}{$currency->suffix} Con IVA - - - Margen: </span> {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} >=15 } <span><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} <=15 } <span style="color:red;"><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} </div> Y al poner el precio de coste y el de venta me indicaba el margen. Ahora quiero usarlo en 1.7, pero al usar Symfony no logro hacerlo modificando: \src\PrestaShopBundle\Resources\views\Admin\Product\form.html.twig ¿Alguien sabe como modificarlo para la 1.7? Link to comment Share on other sites More sharing options...
joseantgv Posted March 2, 2018 Share Posted March 2, 2018 7 hours ago, JuanjoSC said: Hola, En prestashop 1.6 modificaba el archivo: BO\themes\default\template\controllers\products\prices.tpl añadiendo este código: <div style="margin-top:10px;"> <span>[spam-filter]toolsConvertPrice price=$product->wholesale_price*1.21}|string_format:$priceDisplayPrecisionFormat} {$currency->prefix}{$currency->suffix} Con IVA - - - Margen: </span> {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} >=15 } <span><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} <=15 } <span style="color:red;"><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} </div> Y al poner el precio de coste y el de venta me indicaba el margen. Ahora quiero usarlo en 1.7, pero al usar Symfony no logro hacerlo modificando: \src\PrestaShopBundle\Resources\views\Admin\Product\form.html.twig ¿Alguien sabe como modificarlo para la 1.7? El código no se ha copiado bien. PD: Cada día hay cientos de mensajes de SPAM que no son capaces de filtrar, pero ahora pones un código válido y sí lo filtran Link to comment Share on other sites More sharing options...
JuanjoSC Posted March 2, 2018 Author Share Posted March 2, 2018 (edited) A ver ahora, gracias @joseantgv <div style="margin-top:10px;"> <span>[spam-filter]toolsConvertPrice price=$product->wholesale_price*1.21}|string_format:$priceDisplayPrecisionFormat} {$currency->prefix}{$currency->suffix} Con IVA - - - Margen: </span> {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} >=15 } <span><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} {if [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat} <=15 } <span style="color:red;"><b> [spam-filter]{1-{toolsConvertPrice price=$product->wholesale_price*1.21}/{toolsConvertPrice price=$product->price*1.21[spam-filter]*100}|string_format:$priceDisplayPrecisionFormat}% </b></span>{/if} </div> Edited March 2, 2018 by JuanjoSC El filtro anti span se carga el código (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