
Bordi nelle immagini dei prodotti
Moderatore: mod Generali
Bordi nelle immagini dei prodotti
Ciao, sto cercando la funzione che si occupa di visualizzare le immagini dei prodotti perchè dovrei metterci un bordo nero. Qualcuno mi aiuta? 

Ciao,
questo è un argomento che è già stato trattato qui sul forum cmq ho il file a portata di mano e te lo posto...devi usare la contribution add borders:
------------------------------------------------------------------
Add Boxes to Thumbail Images v1.2
for MS2.2 by Christian Kolos (http://www.digital-webdesigners.)
------------------------------------------------------------------
This little distribution will add a smile line around the thumbnail pictures in your boxes (see example.gif).
The old distribution (v1.1) worked fine with IE but had some problems to display the boxes in different browsers (Mozilla, Safari...).
So here`s what to do to (if you`ve already installed "Add Boxes v1.1" just delete the old "class=shadow1"-Part and exchange it with the new):
:: Step 1:
- Edit the stylesheet.css File and add this line somewhere:
.shadow1 {border: #000000 1px solid;}
Of course you can experiment with different colors and styles (like dotted, dashed and so on) or add different styles to each box...
:: Step 2:
- Open /includes/boxes/specials.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT). '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1'). '</a>
:: Step 3:
- Open /includes/boxes/reviews.php (AGAIN - BACKUP FIRST!)
- Search for this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: STEP 4:
- Open /includes/boxes/whats_new.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
Done. The small thumbail images in your boxes should now have a border around them.
You can easily change the look and feel of this in your stylesheet.css
UPDATE:
--------------
Of course you can do this for other modules to - for example the "new products module" or the "also purchased products" (see example2.gif). Here`s how to:
:: Step 1:
- Open /includes/modules/new_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: Step 2:
- Open /includes/modules/product_listing.php (BACKUP FIRST!)
- Search for this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
- And exchange it with this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
:: STEP 3:
- Open /includes/modules/also_purchased_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
I wish this to be usefull to some people.
Christian Kolos
--
questo è un argomento che è già stato trattato qui sul forum cmq ho il file a portata di mano e te lo posto...devi usare la contribution add borders:
------------------------------------------------------------------
Add Boxes to Thumbail Images v1.2
for MS2.2 by Christian Kolos (http://www.digital-webdesigners.)
------------------------------------------------------------------
This little distribution will add a smile line around the thumbnail pictures in your boxes (see example.gif).
The old distribution (v1.1) worked fine with IE but had some problems to display the boxes in different browsers (Mozilla, Safari...).
So here`s what to do to (if you`ve already installed "Add Boxes v1.1" just delete the old "class=shadow1"-Part and exchange it with the new):
:: Step 1:
- Edit the stylesheet.css File and add this line somewhere:
.shadow1 {border: #000000 1px solid;}
Of course you can experiment with different colors and styles (like dotted, dashed and so on) or add different styles to each box...
:: Step 2:
- Open /includes/boxes/specials.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT). '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1'). '</a>
:: Step 3:
- Open /includes/boxes/reviews.php (AGAIN - BACKUP FIRST!)
- Search for this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: STEP 4:
- Open /includes/boxes/whats_new.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
Done. The small thumbail images in your boxes should now have a border around them.
You can easily change the look and feel of this in your stylesheet.css
UPDATE:
--------------
Of course you can do this for other modules to - for example the "new products module" or the "also purchased products" (see example2.gif). Here`s how to:
:: Step 1:
- Open /includes/modules/new_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
:: Step 2:
- Open /includes/modules/product_listing.php (BACKUP FIRST!)
- Search for this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
- And exchange it with this:
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
:: STEP 3:
- Open /includes/modules/also_purchased_products.php (BACKUP FIRST!)
- Search for this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
- And exchange it with this:
'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>
I wish this to be usefull to some people.
Christian Kolos
--
Prima di postare leggetevi le FAQ: viewtopic.php?t=3259
Io la sto usando e va bene... con quel sistema ho messo il bordino alle immagini sia dei prodotti nella loro scheda (nelle thumbnails) che in quelli dell a vetrina.
Prova a vedere se per caso hai sbagliato qualcosa perchè alla fine è una cosa semplicissima, solo un'ombra da definire nel css e richiamarla nelle varie pagine.
Per esempio, nella pagina product_listing.php devi far attenzione a non sbagliare riga, basta aggiungere il richiamo a shadow1 (o come l'hai chiamata nel css) nel punto giusto:
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
}
break;
Prova a vedere se per caso hai sbagliato qualcosa perchè alla fine è una cosa semplicissima, solo un'ombra da definire nel css e richiamarla nelle varie pagine.
Per esempio, nella pagina product_listing.php devi far attenzione a non sbagliare riga, basta aggiungere il richiamo a shadow1 (o come l'hai chiamata nel css) nel punto giusto:
case 'PRODUCT_LIST_IMAGE':
$lc_align = 'center';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
} else {
$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';
}
break;
Prima di postare leggetevi le FAQ: viewtopic.php?t=3259
è semplice conoscenza dei css e in parte dell'html. una delle conoscenze base che ti servono per modificare oscommerce.wiko85 ha scritto:ciao, ho provato ma non funziona...
vedi: css.html.it oppure www.html.it
La funzione CERCA si trova sotto al logo Oscommerce italia in questa pagina. - I Love Marketing!
I miei preferiti: internet marketing blog - biancheria da letto - prodotti tipici piemonte - vini piemontesi - roero arneis
I miei preferiti: internet marketing blog - biancheria da letto - prodotti tipici piemonte - vini piemontesi - roero arneis
Ciao, io ho Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 e con quello funziona.
Prima di postare leggetevi le FAQ: viewtopic.php?t=3259
Puoi provare ad usare questa: http://addons.oscommerce.com/info/1702
E' più lunga da installare ma sembra più completa e sopratutto più personalizzabile.
Può darsi che sia utie anche per inserire sfondi nei box come hai chiesto nell'altro post, però non te lo so dire per certo perchè la devo sempre provare.
E' più lunga da installare ma sembra più completa e sopratutto più personalizzabile.
Può darsi che sia utie anche per inserire sfondi nei box come hai chiesto nell'altro post, però non te lo so dire per certo perchè la devo sempre provare.
Prima di postare leggetevi le FAQ: viewtopic.php?t=3259