Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Star Product


euskopc

Recommended Posts

Hello,

 

I installed the contribution "star_product_v_1.6_1" , everything works well but in the catalog the product doesn't appear!!!!

 

97497048cq1.th.jpg

 

Thank you to help me.

 

Hello, I have the same problem.

 

I didn't understand...

The contribution is ok for 2 products but when I choose a 3rd product, I have a "white" box....

Link to comment
Share on other sites

  • Replies 135
  • Created
  • Last Reply

Top Posters In This Topic

Hi

 

For used Star Product with Graphical borders do this:

 

1. FIND at the line 1:

 

<?php

 

ADD AFTER:

 

?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<?php echo mws_header(STAR_TITLE); ?>
  <td>
<?php

2. comment this line:

 

  new contentBoxHeading($header_star_product);

 

or REPLACE with:

 

//  new contentBoxHeading($header_star_product);

 

3. if you create the classes noborderbox for hidden the default borders do this:

 

FIND:

 

new contentBox($star_products_output);

 

REPLACE:

 

new noborderBox($star_products_output)

4. and at the end of file add this:

 

	  </td>
<?php echo mws_footer(''); ?>
 </tr>
</table>

This applied the graphical borders to this module and hidden the default borders.

 

 

Hi i have downloaded the graphical instructions_to_others_contributions_v2.1 and replaced the star_product.php with the one from nicko107. but unfortunately i get this error

 

Fatal error: Call to undefined function mws_header() in /home/public_html/catalog/includes/modules/star_product.php on line 5

 

please help me

 

many thanks in advance

Link to comment
Share on other sites

I get this error on my index page... I have changed a lot of code because of PHP5 update on the server - I think this Star Product also needs an update. Does anybody know how to??? Please

 

Helle

 

 

1054 - Unknown column 'p.products_id' in 'on clause'

select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from products p, products_description pd, star_product sp left join specials s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '1'

[TEP STOP]

Link to comment
Share on other sites

Hello

 

this could be a problem with MySQL 5.0

 

open file:

 

catalog/include/modules/star_products.php

 

and find:

 

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

 

replace:

 

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ( " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp ) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

This is a BUG reported here:

 

http://www.oscommerce.com/community/bugs,3171

 

thank you for this help

 

i just need to know how to put graphical borders to star product box. i get mwh_header not found error. can you please help?

 

thank you

Link to comment
Share on other sites

  • 4 weeks later...
Guys, don't worry. It's sorted out, although I don't know what I did to fix it. I just deleted the products and recreated them.

 

Hi niko, I implemented the Jan 28 2008 mod for Star Product using graphical borders and got an emty box????

This is my code,

 

<?php

?>

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

<tr>

<?php echo mws_header(STAR_TITLE); ?>

<td>

<?php

$header_star_product = array();

$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));

// new contentBoxHeading($header_star_product);

$star_product_info = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'and pd.language_id = '" . $languages_id . "'");

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

$star_products = tep_db_fetch_array($star_products_query);

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

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

<td height="15%" width="85%" class="star-product-title"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . $star_products['products_name'] . '</a></td>

<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 210) . '</a></td>

</tr>

<tr>

<td height="85%" width="85%" class="star-product">'. $star_products["products_description"] . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>

</tr>

<tr>

<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>

</tr>');

 

new noborderBox($star_products_output)

?>

</td>

<?php echo mws_footer(''); ?>

</tr>

</table>

 

Is there something more to it????

 

Thanks,, Buddy

Link to comment
Share on other sites

  • 3 weeks later...
Hi

 

How can i display a special price in this contrib??? I want it to show the same way as in product description, first the old price and after it the new special price. is it possible????

 

 

Hi crazymetzel,

 

I'd like to do the same thing.

 

Did you find the answer?

 

Regards,

 

Guillaume.

Link to comment
Share on other sites

  • 2 weeks later...

It'd be really nice if it were possible to set the size of the box. I'm sure it is, just not sure how. I've looked through the code, but I can't find anything (I'm no programmer). It'd be even better if there were a GUI option through Admin to set this.

Link to comment
Share on other sites

  • 2 months later...
Hi niko, I implemented the Jan 28 2008 mod for Star Product using graphical borders and got an emty box????

This is my code,

 

<?php

?>

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

<tr>

<?php echo mws_header(STAR_TITLE); ?>

<td>

<?php

$header_star_product = array();

$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));

// new contentBoxHeading($header_star_product);

$star_product_info = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "'and pd.language_id = '" . $languages_id . "'");

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_tax_class_id, sp.product_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

$star_products = tep_db_fetch_array($star_products_query);

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

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

<td height="15%" width="85%" class="star-product-title"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . $star_products['products_name'] . '</a></td>

<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 210) . '</a></td>

</tr>

<tr>

<td height="85%" width="85%" class="star-product">'. $star_products["products_description"] . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>

</tr>

<tr>

<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>

</tr>');

 

new noborderBox($star_products_output)

?>

</td>

<?php echo mws_footer(''); ?>

</tr>

</table>

 

Is there something more to it????

 

Thanks,, Buddy

This worked for me:

 

<?php

//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER

// $header_star_product = array();

// $header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));

// new contentBoxHeading($header_star_product);

//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-

?>

 

<!-- Start Graphical Borders //-->

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

<tr>

<?php

$title = sprintf(STAR_TITLE, strftime('%B'));

echo mws_header_main($title);

?>

<td>

<!-- End Graphical Borders //-->

 

<?php

function tep_star_product_with_attributes($products_id) {

$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");

$attributes = tep_db_fetch_array($attributes_query);

 

if ($attributes['count'] > 0) {

return true;

}

else {

return false;

}

}

 

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ((" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id) where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

$star_products = tep_db_fetch_array($star_products_query);

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

$evita_cortar_palabras = explode( ' ', $star_products["products_description"] );

array_pop( $evita_cortar_palabras );

$star_products["products_description"] = implode( ' ', $evita_cortar_palabras );

 

if (!tep_star_product_with_attributes($star_products['products_id'])) {

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

 

 

<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>

<td align="right" height="100%" width="15%" rowspan="2">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*1, SMALL_IMAGE_HEIGHT*1) . '</td>

</tr>

<tr>

<td height="80%" width="85%" class="star-product">' . strip_tags($star_products["products_description"]) . '...' . '</td>

</tr>

<tr>

<td><br>  <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>' . '<td height="5%" width="85%" class="star-product-price" align="center">' . $products_price = $currencies->display_price($star_products['products_price'], tep_get_tax_rate($star_products['products_tax_class_id'])) . '</td>

</tr>');

$star_products_output = array_slice($star_products, sizeof($star_products)-1);

 

// Start Graphical Borders Step 7.3 - Adapted by Coopco for Star Products

// new contentBox($star_products_output);

new noborderBox($star_products_output);

// End Graphical Borders

 

}

 

else {

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>

<td align="right" height="100%" width="15%" rowspan="2">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*1, SMALL_IMAGE_HEIGHT*1) . '</td>

</tr>

<tr>

<td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '...' . '</td>

</tr>

<tr>

<td><br>  <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>' . '<td height="5%" width="85%" class="star-product-price" align="center">' . $products_price = $currencies->display_price($star_products['products_price'], tep_get_tax_rate($star_products['products_tax_class_id'])) . '</td>

</tr>');

 

 

}

?>

<!-- Start Graphical Borders //-->

</td>

<?php echo mws_footer_main(''); ?>

</tr>

</table>

<!-- End Graphical Borders //-->

Link to comment
Share on other sites

Hello, I have the same problem.

 

I didn't understand...

The contribution is ok for 2 products but when I choose a 3rd product, I have a "white" box....

How does it work for two products? I can only get one at a time.

Link to comment
Share on other sites

This worked for me:

OK needed more testing. This one works and is in action on my site.

 

<?php

//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER

// $header_star_product = array();

// $header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));

// new contentBoxHeading($header_star_product);

//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-

 

// Start Graphical Borders

?>

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

<tr>

<?php

$title = sprintf(STAR_TITLE, strftime('%B'));

echo mws_header_main($title);

?>

<td>

<?php

// End Graphical Borders

 

function tep_star_product_with_attributes($products_id) {

$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");

$attributes = tep_db_fetch_array($attributes_query);

 

if ($attributes['count'] > 0) {

return true;

}

else {

return false;

}

}

 

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ((" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id) where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");

$star_products = tep_db_fetch_array($star_products_query);

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

$evita_cortar_palabras = explode( ' ', $star_products["products_description"] );

array_pop( $evita_cortar_palabras );

$star_products["products_description"] = implode( ' ', $evita_cortar_palabras );

 

if (!tep_star_product_with_attributes($star_products['products_id'])) {

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>

<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>

</tr>

<tr>

<td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>

</tr>

<tr>

<td height="5%" width="85%" class="star-product-price" align="left">'. 'Price ' .

$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>

</tr>

<tr>

<td> </td>

</tr>

<tr>

<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>

</tr>');

$star_products_output = array_slice($star_products, sizeof($star_products)-1);

 

// Start Graphical Borders Step 7.3 - Adapted by Coopco for Star Products

// new contentBox($star_products_output);

new noborderBox($star_products_output);

// End Graphical Borders

 

}

 

else {

$star_products["0"] = array('align' => 'center',

'params' => 'width="100%" valign="top"',

'text' => '<tr>

<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>

<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>

</tr>

<tr>

<td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>

</tr>

<tr>

<td height="5%" width="85%" class="star-product-price" align="left">'.

$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>

</tr>

<tr>

<td> </td>

</tr>

<tr>

<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>

</tr>');

 

// Start Graphical Borders Step 7.3 - Adapted by Coopco for Star Products

// new contentBox($star_products);

new noborderBox($star_products);

// End Graphical Borders

 

}

?>

<!-- Start Graphical Borders //-->

</td>

<?php echo mws_footer_main(''); ?>

</tr>

</table>

<!-- End Graphical Borders //-->

Link to comment
Share on other sites

  • 1 month later...

i get this in the admin panel...i only have 2 products but it shows up as three...but the goku one never displays

starproductweirdness2nc3.jpg

when i select the goku one it shows up like this...

starproductweirdnesszr3.jpg

both the carsssss show up tho...

 

anyone know why?

 

thanks

Link to comment
Share on other sites

How does it work for two products? I can only get one at a time.

Thank you all for your assistance, it is much appreciated that you can all take the time to post an answer to such a simple question.

Link to comment
Share on other sites

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">
 <tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="4" class="infoBoxContents">
 <tr width="100%" valign="top">
<td align="center" width="100%" valign="top">

<div id="featured"><a href="http://www.southeast-design.com/product_info.php?products_id=136" class="featuredmargin"><img src="images/newviralposterfortdk.jpg" border="0" alt="BOSANDKJAS" title=" BOSANDKJAS " width="82" height="82"></a><br />

<span class="productname">BOSANDKJAS</span>

<span class="description"><a href="http://www.southeast-design.com/product_info.php?products_id=136"></a></span>

<span class="price"><span class=currency_symbol>$</span>69.69<span class=currency_symbol></span></span></div>

</td>

</tr>

</table>

</td>

</tr>

</table>

 

i searched and search but i cant seem to find these tables...i looked in the star_product.php in the includes/modules but i cant find these tables...i just want to remove them cause its effecting my template

 

thanks

Link to comment
Share on other sites

  • 1 month later...
anyone know why i get this weirdness?

starproductweirdnesszr3.jpg

 

i did everything right...no errors just no display on products,,,

 

 

:lol: Hi,

Put a description on the product

A hug and sorry my english!

Adriana

Link to comment
Share on other sites

  • 2 months later...

Missing File

 

Hi, I installed Star Product 1.6 and it works as advertised (thanks!). I have found one issue however. If I go to Admin->Modules and click on Shipping I get the errors listed below. I'm missing a "star_product.php" file in the catalog/includes/languages/english/modules/shipping/ directory. This file was not included in the 1.6 package. I checked the 1.0 package as well and it didn't have this file. anyone have any suggestions?

 

*****************

Warning: main(/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php) [function.main]: failed to open stream: No such file or directory in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Warning: main(/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php) [function.main]: failed to open stream: No such file or directory in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Warning: main() [function.include]: Failed opening '/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Fatal error: Cannot instantiate non-existent class: contentboxheading in /home/asifnyc0/public_html/os/includes/modules/shipping/star_product.php on line 5

******************

Link to comment
Share on other sites

Missing File

 

Hi, I installed Star Product 1.6 and it works as advertised (thanks!). I have found one issue however. If I go to Admin->Modules and click on Shipping I get the errors listed below. I'm missing a "star_product.php" file in the catalog/includes/languages/english/modules/shipping/ directory. This file was not included in the 1.6 package. I checked the 1.0 package as well and it didn't have this file. anyone have any suggestions?

 

*****************

Warning: main(/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php) [function.main]: failed to open stream: No such file or directory in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Warning: main(/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php) [function.main]: failed to open stream: No such file or directory in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Warning: main() [function.include]: Failed opening '/home/asifnyc0/public_html/os/includes/languages/english/modules/shipping/star_product.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/asifnyc0/public_html/os/admin/modules.php on line 166

 

Fatal error: Cannot instantiate non-existent class: contentboxheading in /home/asifnyc0/public_html/os/includes/modules/shipping/star_product.php on line 5

******************

I think you have ome files in the wrong places, check your files that you uploaded (nothing new goes in shipping for this addon).

Link to comment
Share on other sites

  • 1 month later...

For those looking to have specials price display in their star_product the same as on product page. This is just a copy of my star_product.php. It is modded to fit my store, no buy_now or image_click. Most should be able to cut and paste to suit. I know squat about php so forgive any screwups.

It works for my sites, you can check it out here if necessary Visit My Website

 

Hope this helps

 

<?php
function tep_star_product_with_attributes($products_id) {
 $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
 $attributes = tep_db_fetch_array($attributes_query);

 if ($attributes['count'] > 0) {
   return true;
 }
 else {
   return false;
   }
 }

 $star_products_query = tep_db_query("select substring(pd.products_description, 1, 175) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ( " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp )left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
  $star_products = tep_db_fetch_array($star_products_query);
  $star_products['products_name'] = tep_get_products_name($star_products['products_id']);
  $avoids_cutting_words = explode( ' ',  $star_products["products_description"] );
  array_pop( $avoids_cutting_words );
  $star_products["products_description"]  = implode( ' ', $avoids_cutting_words );

  $star_products['specials_new_products_price'] = tep_get_products_special_price($star_products['products_id']);
  if (tep_not_null($star_products['specials_new_products_price'])) {
  $star_products['specials_new_products_price'] = tep_get_products_special_price($star_products['products_id']);
  $price = '<s>' . $products_price = $currencies->display_price($star_products['products_price'], tep_get_tax_rate($star_products['products_tax_class_id'])) . '</s><br />';
       $price .= '<b><span class="productSpecialPrice">' . $currencies->display_price($star_products['specials_new_products_price'], tep_get_tax_rate($star_products['products_tax_class_id'])) . '</span></b>';
  } else {
     $price = $products_price = $currencies->display_price($star_products['products_price'], tep_get_tax_rate($star_products['products_tax_class_id']));
  }

  if (!tep_star_product_with_attributes($star_products['products_id'])) {
    $star_products["0"] = array('align' => 'center',
			      'params' => 'width="292" valign="top"',
                                     'text' => '<tr>
			      		   <td height="15%" width="142" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td class="star-product-image" rowspan="2">'. tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 140) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="142" class="star-product">' . strip_tags($star_products["products_description"]) . '...' . '</td>
					 </tr>
					 <tr>
					   <td align="right"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image_button('more_info_trans.gif',IMAGE_BUTTON_MORE_INFO) . '</a></td>' . '<td height="5%" width="142" class="star-product-price" align="center">' . $price . '</td>
					 </tr>');
    $star_products_output = array_slice($star_products, sizeof($star_products)-1);
    new contentBox($star_products_output);
  }else {
    $star_products["0"] = array('align' => 'center',
			      'params' => 'width="292" valign="top"',
                                     'text' => '<tr>
			      		   <td height="15%" width="142" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td class="star-product-image" rowspan="2">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], 140) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="85%" class="star-product">' . strip_tags($star_products["products_description"]) . '...' . '</td>
					 </tr>
					 <tr>
					   <td align="right"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image_button('more_info_trans.gif',IMAGE_BUTTON_MORE_INFO) . '</a></td>' . '<td height="5%" width="85%" class="star-product-price" align="center">' . $price . '</td>
					 </tr>');
    new contentBox($star_products);
  }
?>

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hello thanks for this great contribution.

 

I would like to know - is there supposed to be a more info button or text that appears after the description text?

 

If so, please tell me where I need to upload the more_info.gif button.

 

Thanks

Link to comment
Share on other sites

  • 1 month later...

I just installed Star Product 1.6 and when I go to in the Admin Panel I get

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/ghirsch/public_html/catalog/admin/includes/boxes/catalog.php on line 34

 

On my main catalog page i also see

 

//Star product Start define('STAR_TITLE', 'Star Product'); // star product define('STAR_READ_MORE', ' ... read more.'); // ... read more. //Star product End

 

Anyone have an idea what im missing?

Link to comment
Share on other sites

Ok, I fixed the first issue. It was due to another contrib I was using. Placing the STAR_PRODUCT code underneath FILENAME_PRODUCTS_EXPECTED seems to have cleared up the problem I was getting in my Admin panel.

 

'<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STAR_PRODUCT, '', 'NONSSL') . '" class="menuBoxContentLink">' . STAR_PRODUCT . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>');

 

I still havent resolved the 2nd error on the main page.

Link to comment
Share on other sites

I fixed my other issue but now im getting another common error message that Ive seen alot of people getting. From what I understand this error is caused by PHP4 and PHP5 incompatibilities? Any quick fix for this?

 

1054 - Unknown column 'p.products_id' in 'on clause'

 

select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from products p, products_description pd, star_product sp left join specials s on p.products_id = s.products_id where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '1'

 

[TEP STOP]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...