Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Which Contrib is this...?


lindstrom

Recommended Posts

Hello,

 

I am looking for the contrib. which allows to show a "detail"-button and a "buy now" button together with a short description of the product on the main page and the list which comes when you click on a category.

 

I have an example:

http://osc.template-help.com/9005/index.php

http://osc.template-help.com/9005/index.php?cPath=21

 

I already installed the "Featured Products" and the "Product Listings in Columns" contributions.

 

After that I studied the contribution list and found the following contribs:

 

-Product Listing with Attributes

-Star Product

-cieto Featured Products with description

-Description in Product Listing Hack MS2 v.2.5

 

What do you think - which was built in by Templatemonster? Or ist it another?

 

Thanks for your help!!!!

Link to comment
Share on other sites

I think that box is probably the 'New Products' found in Catalog/Inc/Modules (Atleast I always use the new products module)

 

To achive that look, replace your new_products.php code with the code below, make sure you backup your old copy tho :) , then goto Admin, and under Maximum Values (Configure) set the 'New Product Listing' to 4 or 6 , or any even number, and save.

 

Now take alook at your store :) You will probably want to play about with the width, display, and add a backgroud to suit your own site. Let me know how you get on.

 

Pete

 

Code:

 

<?php

?>

<!-- new_products //-->

<table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>

<td height="20" bgcolor="#CAD5DB" class="design-2" style="padding-left:6px"><?php echo sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')) ; ?></td>

</tr>

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')));

 

// new contentBoxHeading($info_box_contents);

 

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

} else {

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

}

 

$row = 0;

$col = 0;

$info_box_contents = array();

while ($new_products = tep_db_fetch_array($new_products_query)) {

$new_products['products_name'] = tep_get_products_name($new_products['products_id']);

$info_box_contents[$row][$col] = array('align' => 'center',

'params' => 'class="smallText" width="50%" valign="top"',

'text' => '

<table width="100%" border="0" cellspacing="0" cellpadding="2">

<tr>

<td height="80" rowspan="2"><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></td>

<td class="smallText"><strong>Price:</strong><br>

<span class="design-5">'. $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])).'</span> <br><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $new_products['products_id']) . '">'.tep_image(DIR_WS_IMAGES.'design/buy.gif',BUY).

'</a><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">'. tep_image(DIR_WS_IMAGES.'design/add.gif',DETAIL).' </a>

</td>

</tr>

<tr>

<td align="center" class="design-6"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a></td>

</tr>

</table>'

);

 

$col ++;

if ($col > 1) {

$col = 0;

$row ++;

}

}

 

new contentBox($info_box_contents);

?>

</td>

</tr>

</table>

<!-- new_products_eof //-->

Link to comment
Share on other sites

Thanks for your help. But I already installed the Contrib. "Featured Products" and I think this Contrib. replaces or changes the normal "New Products" Box.

 

Does your code work for this contrib. too? Thank you.

 

Furthermore I want to set such a layout in the category lists too. Whast changes do I need for this?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...