Jump to content

(SOLUCIONADO)-Añadir nuevo campo a productos


Recommended Posts

Hola!
 
Lo que quiero es añadir un nuevo campo de información a los productos. He seguido el artículo que recomendáis en otros posts (http://www.jose-aguilar.com/blog/como-anadir-campos-extra-a-los-productos-de-prestashop-15x/#comment-19772) pero quizás he hecho algo mal porque no veo esa información en el front office de los artículos. 
 
Espero que alguien me pueda ayudar. Tengo la versión 1.5.6 y he seguido los pasos del blog, pero tampoco tengo mucha idea de bases de datos. Creo que he creado bien la tabla, pero no estoy segura.
(adjunto imagen, la última fila es lo que he añadido)
 
Un saludo.

 

Screenshot-29_06_201420_14_14_zpscdbbb6c

Edited by Jessy (see edit history)
Link to comment
Share on other sites

{if $check_product_association_ajax}
{assign var=class_input_ajax value='check_product_name '}
{else}
{assign var=class_input_ajax value=''}
{/if}
<input type="hidden" name="submitted_tabs[]" value="Informations" />
<div id="step1">
	<h4 class="tab">1. {l s='Info.'}</h4>
	<h4>{l s='Product global information'}</h4>
	<script type="text/javascript">
		{if isset($PS_ALLOW_ACCENTED_CHARS_URL) && $PS_ALLOW_ACCENTED_CHARS_URL}
			var PS_ALLOW_ACCENTED_CHARS_URL = 1;
		{else}
			var PS_ALLOW_ACCENTED_CHARS_URL = 0;
		{/if}
		{$combinationImagesJs}
		{if $check_product_association_ajax}
				var search_term = '';
				$('document').ready( function() {
					$(".check_product_name")
						.autocomplete(
							'{$link->getAdminLink('AdminProducts', true)|addslashes}', {
								minChars: 3,
								max: 10,
								width: $(".check_product_name").width(),
								selectFirst: false,
								scroll: false,
								dataType: "json",
								formatItem: function(data, i, max, value, term) {
									search_term = term;
									// adding the little
									if ($('.ac_results').find('.separation').length == 0)
										$('.ac_results').css('background-color', '#EFEFEF')
											.prepend('<div style="color:#585A69; padding:2px 5px">{l s='Use a product from the list'}<div class="separation"></div></div>');
									return value;
								},
								parse: function(data) {
									var mytab = new Array();
									for (var i = 0; i < data.length; i++)
										mytab[mytab.length] = { data: data[i], value: data[i].name };
									return mytab;
								},
								extraParams: {
									ajax: 1,
									action: 'checkProductName',
									id_lang: {$id_lang}
								}
							}
						)
						.result(function(event, data, formatted) {
							// keep the searched term in the input
							$('#name_{$id_lang}').val(search_term);
							jConfirm('{l s='Do you want to use this product?'} <strong>'+data.name+'</strong>', '{l s='Confirmation'}', function(confirm){
								if (confirm == true)
									document.location.href = '{$link->getAdminLink('AdminProducts', true)}&updateproduct&id_product='+data.id_product;
								else
									return false;
							});
						});
				});
		{/if}
	</script>

	{if isset($display_common_field) && $display_common_field}
		<div class="warn" style="display: block">{l s='Warning, if you change the value of fields with an orange bullet %s, the value will be changed for all other shops for this product' sprintf=$bullet_common_field}</div>
	{/if}

	{include file="controllers/products/multishop/check_fields.tpl" product_tab="Informations"}

	<div class="separation"></div>
	<div id="warn_virtual_combinations" class="warn" style="display:none">{l s='You cannot use combinations with a virtual product.'}</div>
	<div>
		<label class="text">{$bullet_common_field} {l s='Type:'}</label>
		<input type="radio" name="type_product" id="simple_product" value="{Product::PTYPE_SIMPLE}" {if $product_type == Product::PTYPE_SIMPLE}checked="checked"{/if} />
		<label class="radioCheck" for="simple_product">{l s='Product'}</label>
		<input type="radio" name="type_product" {if $is_in_pack}disabled="disabled"{/if} id="pack_product" value="{Product::PTYPE_PACK}" {if $product_type == Product::PTYPE_PACK}checked="checked"{/if} />
		<label class="radioCheck" for="pack_product">{l s='Pack'}</label>
		<input type="radio" name="type_product" id="virtual_product" {if $is_in_pack}disabled="disabled"{/if} value="{Product::PTYPE_VIRTUAL}" {if $product_type == Product::PTYPE_VIRTUAL}checked="checked"{/if} />
		<label class="radioCheck" for="virtual_product">{l s='Virtual Product (services, booking or downloadable products)'}</label>
	</div>

	<div class="separation"></div>
	<br />
	<table cellpadding="5" style="width: 50%; float: left; margin-right: 20px; border-right: 1px solid #CCCCCC;">
	{* global information *}
		<tr>
			<td class="col-left">
				{include file="controllers/products/multishop/checkbox.tpl" field="name" type="default" multilang="true"}
				<label>{l s='Name:'}</label>
			</td>
			<td style="padding-bottom:5px;" class="translatable">
			{foreach from=$languages item=language}
				<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if} float: left;">
						<input class="{$class_input_ajax}{if !$product->id}copy2friendlyUrl{/if} updateCurrentText" size="43" type="text" {if !$product->id}disabled="disabled"{/if}
						id="name_{$language.id_lang}" name="name_{$language.id_lang}"
						value="{$product->name[$language.id_lang]|htmlentitiesUTF8|default:''}"/><sup> *</sup>
					<span class="hint" name="help_box">{l s='Invalid characters:'} <>;=#{}<span class="hint-pointer"> </span>
					</span>
				</div>
			{/foreach}
			</td>
		</tr>
		<tr>
			<td class="col-left"><label>{$bullet_common_field} {l s='Reference:'}</label></td>
			<td style="padding-bottom:5px;">
				<input size="55" type="text" name="reference" value="{$product->reference|htmlentitiesUTF8}" style="width: 130px; margin-right: 44px;" />
				<span class="hint" name="help_box">{l s='Special characters allowed:'}.-_#\<span class="hint-pointer"> </span></span>
			</td>
		</tr>
		<tr>
			<td class="col-left"><label>{$bullet_common_field} {l s='EAN13 or JAN:'}</label></td>
			<td style="padding-bottom:5px;">
				<input size="55" maxlength="13" type="text" name="ean13" value="{$product->ean13|htmlentitiesUTF8}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(Europe, Japan)'}</span>
			</td>
		</tr>
		<tr>
			<td class="col-left"><label>{$bullet_common_field} {l s='UPC:'}</label></td>
			<td style="padding-bottom:5px;">
				<input size="55" maxlength="12" type="text" name="upc" value="{$product->upc|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span class="small">{l s='(US, Canada)'}</span>
			</td>
		</tr>
		<tr>
    <td class="col-left"><label>{$bullet_common_field} {l s='Plazo de entrega:'}</label></td>
    <td style="padding-bottom:5px;">
        <input size="55" maxlength="12" type="text" name="delivery" value="{$product->delivery|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span>{l s='(dias)'}</span>
    </td>
</tr>
	</table>
	{* status informations *}
	<table cellpadding="5" style="width: 40%; float: left; margin-left: 10px;">
	<tr>
		<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="active" type="radio" onclick=""}
			<label class="text">{l s='Status:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<ul class="listForm">
				<li>
					<input onclick="toggleDraftWarning(false);showOptions(true);showRedirectProductOptions(false);" type="radio" name="active" id="active_on" value="1" {if $product->active || !$product->isAssociatedToShop()}checked="checked" {/if} />
					<label for="active_on" class="radioCheck">{l s='Enabled'}</label>
				</li>
				<li>
					<input onclick="toggleDraftWarning(true);showOptions(false);showRedirectProductOptions(true);"  type="radio" name="active" id="active_off" value="0" {if !$product->active && $product->isAssociatedToShop()}checked="checked"{/if} />
					<label for="active_off" class="radioCheck">{l s='Disabled'}</label>
				</li>
			</ul>
		</td>
	</tr>
	<tr class="redirect_product_options" style="display:none">
		<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="redirect_type" type="radio" onclick=""}
			<label class="text">{l s='Redirect:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<select name="redirect_type" id="redirect_type">
				<option value="404" {if $product->redirect_type == '404'} selected="selected" {/if}>{l s='No redirect (404)'}</option>
				<option value="301" {if $product->redirect_type == '301'} selected="selected" {/if}>{l s='Redirect permanently (301)'}</option>
				<option value="302" {if $product->redirect_type == '302'} selected="selected" {/if}>{l s='Redirect temporarily (302)'}</option>
			</select>
			<span class="hint" name="help_box">
				{l s='404 : Not Found = Product does not exist and no redirect'}<br/>
				{l s='301 : Moved Permanently = Product Moved Permanently'}<br/>
				{l s='302 : Moved Temporarily = Product moved temporarily'}
			</span>
		</td>
	</tr>
	<tr class="redirect_product_options redirect_product_options_product_choise" style="display:none">
		<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="id_product_redirected" type="radio" onclick=""}
			<label class="text">{l s='Related product:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<input type="hidden" value="" name="id_product_redirected" />
			<input value="" id="related_product_autocomplete_input" autocomplete="off" class="ac_input" />
			<p>
				<script>
					var no_related_product = '{l s='No related product'}';
					var id_product_redirected = {$product->id_product_redirected|intval};
					var product_name_redirected = '{$product_name_redirected|escape:html:'UTF-8'}';
				</script>
				<span id="related_product_name">{l s='No related product'}</span>
				<span id="related_product_remove" style="display:none">
					<a hre="#" onclick="removeRelatedProduct(); return false" id="related_product_remove_link">
						<img src="../img/admin/delete.gif" class="middle" alt="" />
					</a>
				</span>
			</p>
		</td>
	</tr>
	<tr>
		<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="visibility" type="default"}
			<label>{l s='Visibility:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<select name="visibility" id="visibility">
				<option value="both" {if $product->visibility == 'both'}selected="selected"{/if} >{l s='Everywhere'}</option>
				<option value="catalog" {if $product->visibility == 'catalog'}selected="selected"{/if} >{l s='Catalog only'}</option>
				<option value="search" {if $product->visibility == 'search'}selected="selected"{/if} >{l s='Search only'}</option>
				<option value="none" {if $product->visibility == 'none'}selected="selected"{/if}>{l s='Nowhere'}</option>
			</select>
		</td>
	</tr>
	<tr id="product_options" {if !$product->active}style="display:none"{/if} >
		<td class="col-left">
			{if isset($display_multishop_checkboxes) && $display_multishop_checkboxes}
				<div class="multishop_product_checkbox">
					<ul class="listForm">
						<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"}</li>
						<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"}</li>
						<li>{include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"}</li>
					</ul>
				</div>
			{/if}

			<label>{l s='Options:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<ul class="listForm">
				<li>
					<input  type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if}  />
					<label for="available_for_order" class="t">{l s='Available for order'}</label>
				</li>
			<li>
				<input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/>
				<label for="show_price" class="t">{l s='show price'}</label>
			</li>
			<li>
				<input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} />
				<label for="online_only" class="t">{l s='Online only (not sold in store)'}</label>
			</li>
			</ul>
		</td>
	</tr>
	<tr>
		<td class="col-left">
			{include file="controllers/products/multishop/checkbox.tpl" field="condition" type="default"}
			<label>{l s='Condition:'}</label>
		</td>
		<td style="padding-bottom:5px;">
			<select name="condition" id="condition">
				<option value="new" {if $product->condition == 'new'}selected="selected"{/if} >{l s='New'}</option>
				<option value="used" {if $product->condition == 'used'}selected="selected"{/if} >{l s='Used'}</option>
				<option value="refurbished" {if $product->condition == 'refurbished'}selected="selected"{/if}>{l s='Refurbished'}</option>
			</select>
		</td>
	</tr>
</table>

<table cellpadding="5" cellspacing="0" border="0" style="width: 100%;"><tr><td><div class="separation"></div></td></tr></table>
		<table cellspacing="0" cellpadding="5" border="0">
			<tr>
				<td class="col-left">
					{include file="controllers/products/multishop/checkbox.tpl" field="description_short" type="tinymce" multilang="true"}
					<label>{l s='Short description:'}<br /></label>
					<p class="product_description">({l s='Appears in the product list(s), and on the top of the product page.'})</p>
				</td>
				<td style="padding-bottom:5px;">
						{include file="controllers/products/textarea_lang.tpl"
						languages=$languages
						input_name='description_short'
						input_value=$product->description_short
						max=$PS_PRODUCT_SHORT_DESC_LIMIT}
					<p class="clear"></p>
				</td>
			</tr>
			<tr>
				<td class="col-left">
					{include file="controllers/products/multishop/checkbox.tpl" field="description" type="tinymce" multilang="true"}
					<label>{l s='Description:'}<br /></label>
					<p class="product_description">({l s='Appears in the body of the product page'})</p>
				</td>
				<td style="padding-bottom:5px;">
						{include file="controllers/products/textarea_lang.tpl" languages=$languages
						input_name='description'
						input_value=$product->description
						}
					<p class="clear"></p>
				</td>
			</tr>
		{if $images}
			<tr>
				<td class="col-left"><label></label></td>
				<td style="padding-bottom:5px;">
					<div style="display:block;width:620px;" class="hint clear">
						{l s='Do you want an image associated with the product in your description?'}
						<span class="addImageDescription" style="cursor:pointer">{l s='Click here'}</span>.
					</div>
					<p class="clear"></p>
				</td>
			</tr>
			</table>
				<table id="createImageDescription" style="display:none;width:100%">
					<tr>
						<td colspan="2" height="10"></td>
					</tr>
					<tr>
						<td class="col-left"><label>{l s='Select your image:'}</label></td>
						<td style="padding-bottom:5px;">
							<ul class="smallImage">
							{foreach from=$images item=image key=key}
									<li>
										<input type="radio" name="smallImage" id="smallImage_{$key}" value="{$image.id_image}" {if $key == 0}checked="checked"{/if} >
										<label for="smallImage_{$key}" class="t">
											<img src="{$image.src}" alt="{$image.legend}" />
										</label>
									</li>
							{/foreach}
							</ul>
							<p class="clear"></p>
						</td>
					</tr>
					<tr>
						<td class="col-left"><label>{l s='Position:'}</label></td>
						<td style="padding-bottom:5px;">
							<ul class="listForm">
								<li><input type="radio" name="leftRight" id="leftRight_1" value="left" checked>
									<label for="leftRight_1" class="t">{l s='left'}</label>
								</li>
								<li>
									<input type="radio" name="leftRight" id="leftRight_2" value="right">
									<label for="leftRight_2" class="t">{l s='right'}</label>
								</li>
							</ul>
						</td>
					</tr>
					<tr>
						<td class="col-left"><label>{l s='Select the type of picture:'}</label></td>
						<td style="padding-bottom:5px;">
							<ul class="listForm">
							{foreach from=$imagesTypes key=key item=type}
								<li><input type="radio" name="imageTypes" id="imageTypes_{$key}" value="{$type.name}" {if $key == 0}checked="checked"{/if}>
									<label for="imageTypes_{$key}" class="t">{$type.name} <span>({$type.width}px {l s='by'} {$type.height}px)</span></label>
								</li>
							{/foreach}
							</ul>
							<p class="clear"></p>
						</td>
					</tr>
					<tr>
						<td class="col-left"><label>{l s='Image tag to insert:'}</label></td>
						<td style="padding-bottom:5px;">
							<input type="text" id="resultImage" name="resultImage" />
							<p class="preference_description">{l s='The tag to copy/paste into the description.'}</p>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<div class="separation"></div>
						</td>
					</tr>
				</table>
		{/if}
		<table>
		<tr>
			<td class="col-left"><label>{l s='Tags:'}</label></td>
			<td style="padding-bottom:5px;" class="translatable">
				{foreach from=$languages item=language}
					<div class="lang_{$language.id_lang}" style="{if !$language.is_default}display: none;{/if}float: left;">
						{literal}
						<script type="text/javascript">
							$().ready(function () {
								var input_id = '{/literal}tags_{$language.id_lang}{literal}';
								$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
								$({/literal}'#{$table}{literal}_form').submit( function() {
									$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
								});
							});
						</script>
						{/literal}
						<input size="55" type="text" id="tags_{$language.id_lang}" name="tags_{$language.id_lang}"
							value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" class="tagify" />
						<span class="hint" name="help_box">{l s='Forbidden characters:'} !<;>;?=+#"°{}_$%<span class="hint-pointer"> </span></span>
					</div>
				{/foreach}
				<p class="preference_description clear">{l s='Tags separated by commas (e.g. dvd, dvd player, hifi)'}</p>
			</td>
		</tr>
		</table>
	</table>
	<br />
</div>

Lo he puesto en la línea 146, ¿podrías decirme si lo he insertado correctamente y en el lugar que debo? Es el que pone "Plazo de entrega" 

Edited by Jessy (see edit history)
Link to comment
Share on other sites

en el tpl debes de ponerlo asi:

{if $product->delivery}
    <p>{l s='Plazo de entrega en '}{$product->delivery} {l s='dias'}</p>
{/if}

Asi, si el campo está rellenado en el backoffice se mostrará en el front-office

Link to comment
Share on other sites

en el tpl debes de ponerlo asi:

{if $product->delivery}
    <p>{l s='Plazo de entrega en '}{$product->delivery} {l s='dias'}</p>
{/if}

Asi, si el campo está rellenado en el backoffice se mostrará en el front-office

 

Perdona mi ignorancia... Inserto estas líneas que me dices, ¿borrando las que yo puse anteriormente? ¿Dónde lo inserto concretamente?

Link to comment
Share on other sites

el codigo que has puesto es del informations.tpl, esta sería la parte correspondiente al backoffice, donde rellenas el campo nuevo que has agregado. Ahora para verlo en el front-office, la parte visible de la tienda, tendrás que colocar el codigo que te puesto en el product.tpl de la pantilla que estás utilizando

/themes/ mi_plantilla/product.tpl
Link to comment
Share on other sites

Ah! lo tengo hecho ya, sí. Como en el tutorial, pero no me sale en la información del producto.Quizás lo coloqué en un sitio incorrecto del código? ¿Dónde debería insertarlo? Te muestro donde lo coloqué (línea 76):

// Parameters
var id_product = '{$product->id|intval}';
var productHasAttributes = {if isset($groups)}true{else}false{/if};
var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if};
var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if};
var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if};
var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}';
var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}';
var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax};
var productBasePriceTaxExcluded = {$product->base_price} - {$product->ecotax};
var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if};
var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction|floatval}{else}0{/if};
var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if};
var product_specific_price = new Array();
{foreach from=$product->specificPrice key='key_specific_price' item='specific_price_value'}
	product_specific_price['{$key_specific_price}'] = '{$specific_price_value}';
{/foreach}
var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if};
var group_reduction = '{$group_reduction}';
var default_eco_tax = {$product->ecotax};
var ecotaxTax_rate = {$ecotaxTax_rate};
var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}';
var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties};
var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if};
var displayPrice = {$priceDisplay};
var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}';
var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if};
var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}';
var productUnitPriceRatio = '{$product->unit_price_ratio}';
var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if};
var stock_management = {$stock_management|intval};
{if !isset($priceDisplayPrecision)}
	{assign var='priceDisplayPrecision' value=2}
{/if}
{if $product->delivery}
    <p>{l s='Plazo de entrega en '}{$product->delivery} {l s='dias'}</p>
{/if}
{if !$priceDisplay || $priceDisplay == 2}
	{assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
	{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
{elseif $priceDisplay == 1}
	{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
	{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
{/if}
Edited by Jessy (see edit history)
Link to comment
Share on other sites

Bueno, y coloqué la línea 

public $delivery;

debajo de "class ProductCore extends ObjectModel". ¿Está correcto? Es el archivo /httpdocs/classes/product.php. En el artículo del blog indica que hay que ponerlo en el override, pero yo uso 1.5.6 y no veo ese archivo, y por lo que he leído en comentarios mas abajo, se puede hacer así (sin override).

Link to comment
Share on other sites

Lo he colocado como me lo envías, pero no sirve, me descuadra todo, no me enseña la foto ni la descripción breve del producto, ni precio ni colores, sólo veo todo lo demás pero descuadrado y sin fondo.  :unsure:

Link to comment
Share on other sites

Ya está! gracias!! había incluído sin quere un {/if}

 

Una duda más, me sale ya el plazo de entrega pero pegado a la referencia del producto, ¿cómo puedo hacer que salga en la línea de debajo?

 

¿Y cómo puedo hacer que en esa línea de plazo de entrega pueda escribir más caracteres? ahora sólo me deja 12 y quisiera especificar algo más, pero no puedo...

Edited by Jessy (see edit history)
Link to comment
Share on other sites

Ponlo asi mejor y editalo luego con css

{if $product->delivery}
     <span class="product_delivery">{l s='Plazo de entrega en '}{$product->delivery} {l s='dias'}</span>
{/if}

Luego en el global.css de la plantillla que utilizas, lo editas asi por ejemplo, se puede acceder a tu web para verlo y decirtelo con mas precision ¿?

 

 

.product_delivery
{
   text-align:left;
   line-height:15pt

}

 

Link to comment
Share on other sites

Así es como se ve en mi producto:

 

Screenshot-30_06_201410_25_46_zps7623368

 

Quisiera que "Plazo de entrega" aparezca debajo de la referencia del producto. Y además, que me deje escribir más de 12 caracteres.

 

 

Para el limite de caracteres cambia esto en el informtations.tpl

 <td style="padding-bottom:5px;">
        <input size="55" maxlength="12" type="text" name="delivery" value="{$product->delivery|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span>{l s='(dias)'}</span>
    </td>
elimina o dale un valor mas alto al 


maxlength="12"
  • Like 1
Link to comment
Share on other sites

 

Para el limite de caracteres cambia esto en el informtations.tpl

 <td style="padding-bottom:5px;">
        <input size="55" maxlength="12" type="text" name="delivery" value="{$product->delivery|escape:html:'UTF-8'}" style="width: 130px; margin-right: 5px;" /> <span>{l s='(dias)'}</span>
    </td>
elimina o dale un valor mas alto al 


maxlength="12"

 

Perfecto!  :)

 

Ya está, muchísimas gracias por tu ayuda!!

Link to comment
Share on other sites

  • nadie locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...