RE: one product; multiple quantity categories
orchard <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.features |
|---|---|
| Message-ID | <5263e9aa56deb7b82a330439bdee2395@osCommerce-Forums> |
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=160075#160075
----------------------------------------------------------------
I did it like this[code] echo '<style>' . "\n";
echo 'a:link{color:#0000FF; Text-decoration: underline}' . "\n";
echo 'a:visited{color:#400080; Text-decoration: underline}' . "\n";
echo 'a:hover{color:#FF0000; text-decoration: underline}' . "\n";
echo '</style>' . "\n";
$short_pos = strpos( $product_info['products_name'], '<' );
if ( $short_pos > 0 )
{
$short_name = substr( $product_info['products_name'], 0, $short_pos );
$search_name = str_replace( ' ', '+', $short_name );
echo '<a href=advanced_search_result.php?keywords=' . $search_name. '>Find <i>' . $short_name . '</i> in other formats</a><br>' . "\n";
}[/code]The first part is to make the links blue so you can see them. All of my products have <br> in the middle of them. The part before <br> tells the common product name, the part after the <br> tells the option on the product (in my case CD,VHS,etc). This code gets the part of the product name before the <br> and searches for it using the normal osCommerce search.