añadir el mismo tex...
Avisos
Vaciar todo

añadir el mismo texto en la descripción corta para todos los articulos  

Página 1 / 2
 
JAVIER
 JAVIER
Estimable Member

Hola Chicos,
tengo un catálogo de más de 20000 articulos y hasta ahora lo he ido haciendo uno a uno pero veo que es un trabajo interminable y me gustaria saber si se puede hacer que en la descripción corta de todos los articulos aparte del texto que tiene cada uno ya puesto, pudiese aparecer un pequeño texto informativo, el mismo para todos.
gracias por vuestra ayuda

URL del sitio: Contenido solo visible a usuarios registrados

Citar
Respondido : 24/07/2019 10:53 am
Bulmaro
 Bulmaro
Soporte CMS Webempresa Moderator

Hola Javier,

Sí, posiblemente sí se pueda... Sólo te pido, por favor, que nos ayudes explicándonos con mayor detalle y si es posible con un ejemplo, qué es exactamente lo que quieres agregar como descripción corta a los productos, ¿En página o vista será visible? ¿El texto será el mismo para todos los productos siempre y para siempre?

Saludos.

ResponderCitar
Respondido : 24/07/2019 12:44 pm

wpdoctor-revisa-la-salud-de-tu-wordpress

JAVIER
 JAVIER
Estimable Member

Hola Bulmaro,
el texto siempre será el mismo y estará visible en la descripción corta después de lo que haya ahora puesto . Este texto será informativo algo como esto " Para poneros en contacto con nosotros podéis enviarnos un mail a XXXX o por Whatsapp al numero XXXX"

ResponderCitar
Respondido : 24/07/2019 12:52 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola

Si el texto será el mismo, lo más práctico sería que agregues este texto como parte de los archivos de tu theme, específicamente en tu theme debes tener un archivo product.tpl, revisa este archivo, puedes agregar HTML en este archivo.

Si tienes dudas puedes adjuntarnos tu archivo (en .zip) para verificar.

Saludos.

ResponderCitar
Respondido : 24/07/2019 6:41 pm

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

JAVIER
 JAVIER
Estimable Member

Hola John,
lo de añadir el texto en el archivo product.tpl, ya lo habia leido en otro tema parecido de otra empresa , lo que no se es donde debo de añadir ese texto ? en que linea y si se debe de añadir algún código con el?
el texto sería este:

PARA PONEROS EN CONTACTO CON NOSOTROS PODÉIS ENVIARNOS UN CORREO ELECTRÓNICO A (aquí añadiría el correo electrónico) O POR WHATSAPP AL NUMERO (aquí añadiría un numero de telefono)

ResponderCitar
Respondido : 24/07/2019 6:50 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola

Adjunta el archivo product.tpl de tu theme (puedes adjuntarlo en .zip) para verificar

Saludos.

ResponderCitar
Respondido : 24/07/2019 7:00 pm

Cursos Gratuitos WordPress

JAVIER
 JAVIER
Estimable Member

Hola John, como puedo hacer para copiar ese archivo y comprimirlo en formato zip?

ResponderCitar
Respondido : 24/07/2019 10:25 pm
Jhon
 Jhon
Soporte CMS Webempresa Moderator

Hola

Usa el Administrador de Archivos de tu Cpanel de tu cuenta de hosting para localizar el archivo, puedes descargar el archivo a tu máquina local, comprimirlo y luego adjuntarlo

Revisa este artículo relacionado:
https://www.webempresa.com/blog/administrador-de-archivos-de-cpanel-como-buscar-archivos.html

Saludos.

ResponderCitar
Respondido : 24/07/2019 10:52 pm

Gestor de Contraseñas - VPN Conexión Segura - Gestor 2FA (Segundo Factor de Autenticación

JAVIER
 JAVIER
Estimable Member

Hola John,
aqui tienes el archivo en formato zip como me pediste, ya me dices donde añadir el codigo con el texto , gracia por tu ayuda

ResponderCitar
Respondido : 25/07/2019 10:36 am
Bulmaro
 Bulmaro
Soporte CMS Webempresa Moderator

Hola Javier,

Te adjunto el archivo product.tpl

A partir de la línea 173 se agrega el texto que deseas, faltaría agregar el teléfono. Si deseas darle cierto formato HTML coméntalo una vez que hallas actualizado el sitio web.

Nota: Recuerda crear una copia de seguridad del fichero antes de reemplazarlo.

Saludos.

ResponderCitar
Respondido : 25/07/2019 6:34 pm

JAVIER
 JAVIER
Estimable Member

me puedes pasar el codigo para sustituir o añadir en esa linea que no puedo abrir el archivo que me has mandado para verlo

ResponderCitar
Respondido : 25/07/2019 6:52 pm
Bulmaro
 Bulmaro
Soporte CMS Webempresa Moderator

Hola Javier,

Adjunto el archivo nuevamente.

Te comparto el código fuente.

*
* 2007-2015 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 license@prestashop.com 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 
*  @copyright  2007-2015 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./errors.tpl"}
{if $errors|@count == 0}
	{if !isset($priceDisplayPrecision)}
		{assign var='priceDisplayPrecision' value=2}
	{/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, $priceDisplayPrecision)}
	{elseif $priceDisplay == 1}
		{assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
		{assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL, $priceDisplayPrecision)}
	{/if}
	
{if !$content_only}
{/if} {if isset($adminActionDisplay) && $adminActionDisplay}

{l s='This product is not visible to your customers.'} id}" />

{/if} {if isset($confirmation) && $confirmation}

{$confirmation}

{/if}
{if $product->new} {l s='New'} {/if} {if $product->on_sale} {l s='Sale!'} {elseif $product->specificPrice && $product->specificPrice.reduction && $productPriceWithoutReduction > $productPrice} {l s='Reduced price!'} {/if}
{if $have_image} {if $jqZoomEnabled && $have_image && !$content_only} name|escape:'html':'UTF-8'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')|escape:'html':'UTF-8'}" itemprop="url"> getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/> {else} getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/> {if !$content_only} {/if} {/if} {else} name|escape:'html':'UTF-8'}"/> {if !$content_only} {l s='View larger'} {/if} {/if}
{if isset($images) && count($images) > 0} <div id="views_block" class="clearfix {if isset($images) && count($images) {if isset($images) && count($images) > 2} {l s='Previous'} {/if} {if isset($images) && count($images) > 2} {l s='Next'} {/if}
{/if} {if isset($images) && count($images) > 1}

getProductLink($product)|escape:'html':'UTF-8'}" data-id="resetImages"> {l s='Display all pictures'}

{/if}
{if $product->online_only}

{l s='Online only'}

{/if}

{$product->name|escape:'html':'UTF-8'}

{if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}

reference) || !$product->reference} style="display: none;"{/if}> {if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}

{if !$product->is_virtual && $product->condition}

{if $product->condition == 'new'}{l s='New'} {elseif $product->condition == 'used'}{l s='Used'} {elseif $product->condition == 'refurbished'}{l s='Refurbished'} {/if}

{/if}
description_short} -->
PARA PONEROS EN CONTACTO CON NOSOTROS PODÉIS ENVIARNOS UN CORREO ELECTRÓNICO A (aquí añadiría el correo electrónico) O POR WHATSAPP AL NUMERO (aquí añadiría un numero de telefono)
description}

{l s='More details'}

{/if} --> 0}

{l s='Pack content'}

{foreach from=$packItems item=packItem} {/foreach}
{/if}-->
{if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)}

quantity {$product->quantity|intval} quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'} quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}

{/if}

quantity available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {*{l s='Availability:'}*} quantity quantity {if $product->quantity available_later}{else}{l s='This product is no longer in stock'}{/if}{elseif $PS_STOCK_MANAGEMENT}{$product->available_now}{/if}

{if $PS_STOCK_MANAGEMENT} {hook h="displayProductDeliveryTime" product=$product}

quantity > $last_qties || $product->quantity available_for_order || $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}

{/if}

quantity > 0) || !$product->available_for_order || $PS_CATALOG_MODE || !isset($product->available_date) || $product->available_date {l s='Availability date:'} {dateFormat date=$product->available_date full=false}

quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS}
{if !$content_only} {/if}
{if ($product->show_price && !isset($restricted_country_mode)) || isset($groups) || $product->reference || (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} quantity > 0} class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html':'UTF-8'}" method="post">
{if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}

{if $product->quantity > 0}{/if} {if $priceDisplay >= 0 && $priceDisplay <= 2} Ahora: {convertPrice price=$productPrice} iso_code}" /> {hook h="displayProductPriceBlock" product=$product type="price"} {/if}

specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}> {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}

Antes:  

specificPrice || !$product->specificPrice.reduction) && $group_reduction == 0} class="hidden"{/if}> {if $priceDisplay >= 0 && $priceDisplay <= 2} {hook h="displayProductPriceBlock" product=$product type="old_price"} {if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if} {/if}

{if $priceDisplay == 2}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'} {/if}

Iva y gastos de envío no incluidos

specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}> {if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0} -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval} {/if}

{if $packItems|@count && $productPrice getNoPackPrice()}

{l s='Instead of'} {convertPrice price=$product->getNoPackPrice()}

{/if} {if $product->ecotax != 0}

{l s='Including'} {if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if} {l s='for ecotax'} {if $product->specificPrice && $product->specificPrice.reduction}
{l s='(not impacted by the discount)'} {/if}

{/if} {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}

{convertPrice price=$unit_price} {l s='per'} {$product->unity|escape:'html':'UTF-8'}

{hook h="displayProductPriceBlock" product=$product type="unit_price"} {/if} {/if} {*close if for show price*} {hook h="displayProductPriceBlock" product=$product type="weight"}
{if !$PS_CATALOG_MODE}

quantity available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />

{/if}

minimal_quantity available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}> {l s='The minimum purchase order quantity for the product is'} {$product->minimal_quantity}

{if isset($groups)}
{foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count}
{assign var="groupName" value="group_$id_attribute_group"}
{if ($group.group_type == 'select')} {foreach from=$group.attributes key=id_attribute item=group_attribute} {$group_attribute|escape:'html':'UTF-8'} {/foreach} {elseif ($group.group_type == 'color')} {elseif ($group.group_type == 'radio')}
    {foreach from=$group.attributes key=id_attribute item=group_attribute}
  • {$group_attribute|escape:'html':'UTF-8'}
  • {/foreach}
{/if}
{/if} {/foreach}
{/if}
quantity available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>

{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}
{/if}
{if !$content_only} {if isset($USE_PTABS) && $USE_PTABS} {include file="$tpl_dir./sub/product_info/tab.tpl"} {else} {include file="$tpl_dir./sub/product_info/default.tpl"} {/if} {/if} {strip} {if isset($smarty.get.ad) && $smarty.get.ad} {addJsDefL name=ad}{$base_dir|cat:$smarty.get.ad|escape:'html':'UTF-8'}{/addJsDefL} {/if} {if isset($smarty.get.adtoken) && $smarty.get.adtoken} {addJsDefL name=adtoken}{$smarty.get.adtoken|escape:'html':'UTF-8'}{/addJsDefL} {/if} {addJsDef allowBuyWhenOutOfStock=$allow_oosp|boolval} {addJsDef availableNowValue=$product->available_now|escape:'quotes':'UTF-8'} {addJsDef availableLaterValue=$product->available_later|escape:'quotes':'UTF-8'} {addJsDef attribute_anchor_separator=$attribute_anchor_separator|escape:'quotes':'UTF-8'} {addJsDef attributesCombinations=$attributesCombinations} {addJsDef currencySign=$currencySign|html_entity_decode:2:"UTF-8"} {addJsDef currencyRate=$currencyRate|floatval} {addJsDef currencyFormat=$currencyFormat|intval} {addJsDef currencyBlank=$currencyBlank|intval} {addJsDef currentDate=$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'} {if isset($combinations) && $combinations} {addJsDef combinations=$combinations} {addJsDef combinationsFromController=$combinations} {addJsDef displayDiscountPrice=$display_discount_price} {addJsDefL name='upToTxt'}{l s='Up to' js=1}{/addJsDefL} {/if} {if isset($combinationImages) && $combinationImages} {addJsDef combinationImages=$combinationImages} {/if} {addJsDef customizationFields=$customizationFields} {addJsDef default_eco_tax=$product->ecotax|floatval} {addJsDef displayPrice=$priceDisplay|intval} {addJsDef ecotaxTax_rate=$ecotaxTax_rate|floatval} {addJsDef group_reduction=$group_reduction} {if isset($cover.id_image_only)} {addJsDef idDefaultImage=$cover.id_image_only|intval} {else} {addJsDef idDefaultImage=0} {/if} {addJsDef img_ps_dir=$img_ps_dir} {addJsDef img_prod_dir=$img_prod_dir} {addJsDef id_product=$product->id|intval} {addJsDef jqZoomEnabled=$jqZoomEnabled|boolval} {addJsDef maxQuantityToAllowDisplayOfLastQuantityMessage=$last_qties|intval} {addJsDef minimalQuantity=$product->minimal_quantity|intval} {addJsDef noTaxForThisProduct=$no_tax|boolval} {addJsDef customerGroupWithoutTax=$customer_group_without_tax|boolval} {addJsDef oosHookJsCodeFunctions=Array()} {addJsDef productHasAttributes=isset($groups)|boolval} {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|default:'null' - $product->ecotax)|floatval} {addJsDef productBasePriceTaxExcluded=($product->base_price - $product->ecotax)|floatval} {addJsDef productBasePriceTaxExcl=($product->base_price|floatval)} {addJsDef productReference=$product->reference|escape:'html':'UTF-8'} {addJsDef productAvailableForOrder=$product->available_for_order|boolval} {addJsDef productPriceWithoutReduction=$productPriceWithoutReduction|floatval} {addJsDef productPrice=$productPrice|floatval} {addJsDef productUnitPriceRatio=$product->unit_price_ratio|floatval} {addJsDef productShowPrice=(!$PS_CATALOG_MODE && $product->show_price)|boolval} {addJsDef PS_CATALOG_MODE=$PS_CATALOG_MODE} {if $product->specificPrice && $product->specificPrice|@count} {addJsDef product_specific_price=$product->specificPrice} {else} {addJsDef product_specific_price=array()} {/if} {if $display_qties == 1 && $product->quantity} {addJsDef quantityAvailable=$product->quantity} {else} {addJsDef quantityAvailable=0} {/if} {addJsDef quantitiesDisplayAllowed=$display_qties|boolval} {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'percentage'} {addJsDef reduction_percent=$product->specificPrice.reduction*100|floatval} {else} {addJsDef reduction_percent=0} {/if} {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'amount'} {addJsDef reduction_price=$product->specificPrice.reduction|floatval} {else} {addJsDef reduction_price=0} {/if} {if $product->specificPrice && $product->specificPrice.price} {addJsDef specific_price=$product->specificPrice.price|floatval} {else} {addJsDef specific_price=0} {/if} {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval} {* TODO: remove if always false *} {addJsDef stock_management=$stock_management|intval} {addJsDef taxRate=$tax_rate|floatval} {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL} {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL} {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL} {addJsDefL name='product_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL} {addJsDefL name='product_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL} {/strip} {/if}

Saludos.

ResponderCitar
Respondido : 25/07/2019 7:13 pm

wpdoctor-revisa-la-salud-de-tu-wordpress

JAVIER
 JAVIER
Estimable Member

Buenos dias Bulmaro,
el archivo que me enviaste no es correcto, ya que la modificación que pones en la línea 172 lo que hace, es dejar el texto nuevo que te dije que quería añadir por igual a todos los artículos, y borrar el que tiene cada articulo ya creado, por lo que he tenido que añadir el texto nuevo a continuación de lo que había y asi a funcionado.
Lo que me gustaría saber ahora, es como puedo darle a todo el texto un color distinto al del resto , por ejemplo todo en negrita y donde pone el numero de telefono y el mail de color azul
el texto original decía así:

{$product->description_short}

y el que he dejado queda así

{$product->description_short}Consultanos tus dudas acerca de este producto por Whatsapp al XXXXXXXX o en XXXXXXXXXX@.com, estamos disponibles para ti a cualquier hora
ResponderCitar
Respondido : 26/07/2019 11:27 am
Bulmaro
 Bulmaro
Soporte CMS Webempresa Moderator

Hola Javier,

Una disculpa por la omisión a tu requerimiento. Por favor, agrega el siguiente HTML:

Consultanos tus dudas acerca de este producto por WhatsApp o en info@latiendadelrecambio.com, estamos disponibles para ti a cualquier hora

Donde 1234567891012 -> Teléfono a 12 dígitos, incluye clave del país.

Resultado del HTML anterior

Saludos

ResponderCitar
Respondido : 26/07/2019 11:56 am

optimiza-automaticamente-todas-las-imagenes-de-tu-wordpress

JAVIER
 JAVIER
Estimable Member

Hola Bulmaro,
ese codigo que me envias no funciona correctamente.
Lo que es el texto si que lo pone correctamente, pero el resto de descripcion, precio , etc, lo desplaza y queda como si fuese un error de programacion, te adjunto imagen

ResponderCitar
Respondido : 26/07/2019 12:24 pm
Página 1 / 2