abarroso91 Posted August 25, 2016 Share Posted August 25, 2016 (edited) Buenas tardes a todos, a ver si alguien me puede ayudar, tengo productos con varias combinaciones, hay alguna forma de poner antes del precio la palabra ''Desde''. He estado buscando y no he encontrado nada. Alguien me ayuda, estaría muy agradecido. Un saludo y gracias. Edited August 26, 2016 by Enrique Engblom Título en mayúsculas (see edit history) Link to comment Share on other sites More sharing options...
roja45 Posted August 25, 2016 Share Posted August 25, 2016 como lo hace dependerá de su tema pero en general: {if ($product.id_product_attribute > 0)} <span class="prices-from">{l s='Desde: '}</span> {/if} debe hacerlo. Basicamente, si el producto tiene minimo uno attribute, se mostrará el texto Link to comment Share on other sites More sharing options...
abarroso91 Posted October 28, 2016 Author Share Posted October 28, 2016 Y en qué archivo tengo que modficiar eso?¿? Link to comment Share on other sites More sharing options...
abarroso91 Posted October 28, 2016 Author Share Posted October 28, 2016 Mi archivo product-list.tpl es: {* * 2007-2014 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2014 PrestaShop SA * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {include file="$tpl_dir./layout/setting.tpl"} {if isset($products) && $products} {*define numbers of product per line in other page for desktop*} {if isset($class)} {*only display grid mode when include from other module*} {assign var="LISTING_GRIG_MODE" value="grid" scope="global"} {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN_MODULE} {if $LISTING_PRODUCT_COLUMN_MODULE=="5"} {assign var="colValue" value="col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-2-4 col-sp-12" scope="global"} {else} {assign var="colValue" value="col-sp-12 col-xs-{12/$LISTING_PRODUCT_MOBILE} col-sm-{12/$LISTING_PRODUCT_TABLET} col-md-{12/$LISTING_PRODUCT_COLUMN_MODULE}" scope="global"} {/if} {else} {assign var='nbItemsPerLine' value=$LISTING_PRODUCT_COLUMN} {/if} {assign var='nbItemsPerLineTablet' value=$LISTING_PRODUCT_TABLET} {assign var='nbItemsPerLineMobile' value=$LISTING_PRODUCT_MOBILE} {*define numbers of product per line in other page for tablet*} {assign var='nbLi' value=$products|@count} {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines} {math equation="nbLi/nbItemsPerLineTablet" nbLi=$nbLi nbItemsPerLineTablet=$nbItemsPerLineTablet assign=nbLinesTablet} <!-- Products list --> <div {if isset($id) && $id} id="{$id}"{/if} class="product_list {$LISTING_GRIG_MODE} row {if isset($class) && $class} {$class}{/if}"> {foreach from=$products item=product name=products} {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo} {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineTablet assign=totModuloTablet} {math equation="(total%perLineT)" total=$smarty.foreach.products.total perLineT=$nbItemsPerLineMobile assign=totModuloMobile} {if $totModulo == 0}{assign var='totModulo' value=$nbItemsPerLine}{/if} {if $totModuloTablet == 0}{assign var='totModuloTablet' value=$nbItemsPerLineTablet}{/if} {if $totModuloMobile == 0}{assign var='totModuloMobile' value=$nbItemsPerLineMobile}{/if} <div class="ajax_block_product col-sp-12 {$colValue}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line {elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line {elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if} {if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line {elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if} {if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> {include file="$tpl_dir./product-item.tpl" callFromModule=isset($class)} </div> {/foreach} </div> {addJsDefL name=min_item}{l s='Please select at least one product' js=1}{/addJsDefL} {addJsDefL name=max_item}{l s='You cannot add more than %d product(s) to the product comparison' sprintf=$comparator_max_item js=1}{/addJsDefL} {addJsDef comparator_max_item=$comparator_max_item} {addJsDef comparedProductsIds=$compared_products} {/if} Link to comment Share on other sites More sharing options...
abarroso91 Posted November 8, 2016 Author Share Posted November 8, 2016 Alguien me puede ayudar¿? Gracias Link to comment Share on other sites More sharing options...
roja45 Posted November 8, 2016 Share Posted November 8, 2016 No se, eso no es el tema por defecto en Prestashop, creo. Que es en este archivo: $tpl_dir./product-item.tpl? Link to comment Share on other sites More sharing options...
w3bsolutions Posted November 8, 2016 Share Posted November 8, 2016 como lo hace dependerá de su tema pero en general: {if ($product.id_product_attribute > 0)} <span class="prices-from">{l s='Desde: '}</span> {/if} debe hacerlo. Basicamente, si el producto tiene minimo uno attribute, se mostrará el texto Esta solución tiene sentido siempre y cuando la combinación con el impacto más pequeño sobre el precio base sea la combinación por defecto . Si la combinación con el precio más bajo no es la que se carga por defecto habría un precio más bajo que el "desde". Sólo quería aclararlo. Saludo! 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