Jump to content

yoelkpo

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Activity
    Other

yoelkpo's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. Hi, I'm in a similar situation here, would appreciate some help: I'm on PS 1.7.6.4. My tables at sql database are named ps_custom_field_userdata which stores id_order value and field_value with the employe seller number, then I have another table called ps_custom_field_values which stores field_value_id (same as field_value from previous table) and field_value with employe name. I've tried editing /modules/ps_emailalerts/ps_emailalerts.php as in your answers in this thread adding: before "hookActionValidateOrder" function: public function getCustomField($id) { $idvendedor = Db::getInstance()->executeS(' SELECT `field_value` FROM `'._DB_PREFIX_.'custom_field_userdata` WHERE `id_order` = '.(int)$order->id.' AND `id_custom_field` = 4'); // Set the number corresponding the field you want to get the value from $custom_fields = Db::getInstance()->executeS(' SELECT `field_value` FROM `'._DB_PREFIX_.'ps_custom_field_values` WHERE `field_value_id` = '.$idvendedor); foreach ($custom_fields as $custom_field) $result = $custom_field['field_value']; return $result; } before "$message = $this->getAllMessages($order->id);": $yourCustomField = $this->getCustomField($customer->id); then added in both "$template_vars = array(" below "$message = $this->getAllMessages($order->id);": '{customField}' => $yourCustomField And added '{customField}' to new-order email template of my theme but value is empty at every new order.
  2. Si te sirvió no olvides marcar el tema como resuelto :-)
  3. Debes editar el archivo product-list.tpl dentro de la carpeta de tu tema (dentro de la carpeta "themes" buscas el nombre de tu tema, si no has instalado ninguno la carpeta que buscas es la que se llama default) y buscar cerca de la línea 71 (en mi caso) verás una linea mas o menos así: <div class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title=" Debes reemplazar a partir de esa linea seleccionando TODO el código a continuación: <div class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}" >{$product.description_short|strip_tags:'UTF-8'|truncate:36:'...'}</a></div> <!--- <a class="button lnk_view" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> --> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}&token={$static_token}", false)}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$product.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add&id_product={$product.id_product|intval}", false)}" title="{l s='Add to cart'} ">{l s='Add to cart'} </a> {/if} {else} <span class="exclusive">{l s='Add to cart'}</span> {/if} {/if} </div> y luego reemplazarlo por este otro: <div class="product_desc"> {if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} {if isset($static_token)} <a href="{$product.link|escape:'htmlall':'UTF-8'}" title="Ver" >Ver modelo disponible</a> {else} <a href="{$product.link|escape:'htmlall':'UTF-8'}" title="Ver" >Ver modelo disponible</a> {/if} {else} <a href="{$product.link|escape:'htmlall':'UTF-8'}" title="Ver" >Ver modelo disponible</a> {/if} {else} <a href="{$product.link|escape:'htmlall':'UTF-8'}" title="Ver" >Ver modelos disponibles</a> {/if} </div> Lo importante es que te fijes a partir de <div class="product_desc"> hasta el primer </div> que logres diferenciar y lo reemplaces por el código que te he pasado. Cualquier duda consultame o si prefieres, publica tu archivo product-list.tpl para que lo edite por ti. Espero haberte ayudado
×
×
  • Create New...