Multiple formato para logo osCommerce 2.3.X

Los propietarios de tiendas osCommerce versión 2.3.x se han encontrado con la novedad que desde sus administradores se puede cargar el logo para la tienda, esta innovación viene de la mano con una limitante, la de poder subir solo imágenes en formato PNG.

Por este motivo te presentamos un tips para que puedas modificar el formato del logo de osCommerce. Al parecer se va a incluir por defecto en la próxima actualización.

Pasos a realizar:

ADMIN

1_ Insertar en la base de datos lo siguiente:

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
('', 'Store Logo', 'STORE_LOGO', 'store_logo.png', 'This is the filename of your Store Logo. This should be updated at admin > configuration > Store Logo', 1, 1000, NULL, '0000-00-00 00:00:00', NULL, NULL);

2_ En admin/store_logo.php

Buscar:

$store_logo->set_extensions('png');

Reemplazar con:

$store_logo->set_extensions(array('png', 'gif', 'jpg'));

2.1_ Buscar y eliminar lo siguiente: (aprox. linea 27):

$store_logo->set_filename('store_logo.png');

2.2_ Buscar:

$messageStack->add_session(SUCCESS_LOGO_UPDATED, 'success');

Reemplazar con:

$messageStack->add_session(SUCCESS_LOGO_UPDATED, 'success');
tep_db_query("update configuration set configuration_value = '" . tep_db_input($store_logo->filename) . "' where configuration_value = '" . STORE_LOGO . "'");

2.3_ Buscar:

<td><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'store_logo.png'); ?></td>

Reemplazar con:

<td><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . STORE_LOGO); ?></td>

2.4_ Buscar:

<td class="main"><?php echo DIR_FS_CATALOG_IMAGES . 'store_logo.png'; ?></td>

Reemplazar con:

<td class="main"><?php echo DIR_FS_CATALOG_IMAGES . STORE_LOGO; ?></td>

3_ En admin/includes/languages/store_logo.php

Buscar:

define('TEXT_FORMAT_AND_LOCATION', 'The store logo must be in PNG format and will be saved as:');

Reemplazar con:

define('TEXT_FORMAT_AND_LOCATION', 'The store logo must be in .png or .jpg or .gif format and will be saved into:');

4_ En admin/invoice.php

Buscar:

<td class="pageHeading" align="right"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'store_logo.png', STORE_NAME); ?></td>

Reemplazar con:

<td class="pageHeading" align="right"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . STORE_LOGO, STORE_NAME); ?></td>

5_  En admin/packing_slip.php

Buscar:

<td class="pageHeading" align="right"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'store_logo.png', STORE_NAME); ?></td>

Reemplazar con:

<td class="pageHeading" align="right"><?php echo tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . STORE_LOGO, STORE_NAME); ?></td>

 

CATALOGO:

1_ En includes/header.php

Buscar:

<div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

Reemplazar con:

<div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . STORE_LOGO, STORE_NAME) . '</a>'; ?></div>

2_ En /includes/modules/payment/moneybookers.php

Buscar:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Logo Image', 'MODULE_PAYMENT_MONEYBOOKERS_STORE_IMAGE', '" . tep_catalog_href_link('images/store_logo.png', '', 'SSL') . "', 'The URL of the store logo image to display on the gateway transaction page. This must be served through HTTPS otherwise it will not be shown.', '6', '4', now())");

Reemplazar con:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Store Logo Image', 'MODULE_PAYMENT_MONEYBOOKERS_STORE_IMAGE', '" . tep_catalog_href_link('images/' . STORE_LOGO, '', 'SSL') . "', 'The URL of the store logo image to display on the gateway transaction page. This must be served through HTTPS otherwise it will not be shown.', '6', '4', now())");

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *