Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I want to display specials on my index.php


adam1987

Recommended Posts

you may want to search the contributions if there is something ready, otherwise you copy the file catalog\includes\modules\new_products.php as special_products.php create the file and header definitions and modify the index.php in catalog root to include the new file instead.

 

Now once you're happy with the layout modify the queries to retrieve the specials instead of new products.

 

...and backup your files first.

Link to comment
Share on other sites

1) Save the index.php as indexOriginal.php that way if you want to go back to it you have it.

2) Go to the special and save it as the index.php and you will be done

 

Thats what i tried 1st, but then all my links stoped working, i think its because every page uses the index.php file eg: loveyourmobile.com/shop/index.php?cPath=25

 

anymore ideas ?

Link to comment
Share on other sites

have you checked the 'specials on default' contribution ?

 

http://www.oscommerce.com/community/contri...ials+on+default

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

This is the what you hant to have in side the new_products.php File

 

 

 

 

<?php

$row = 0;

$specials_query = tep_db_query($specials_split->sql_query);

while ($specials = tep_db_fetch_array($specials_query)) {

$row++;

 

echo ' <td align="center" width="33%" class="smallText"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $specials['products_image'], $specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $specials['products_id']) . '">' . $specials['products_name'] . '</a><br><s>' . $currencies->display_price($specials['products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($specials['specials_new_products_price'], tep_get_tax_rate($specials['products_tax_class_id'])) . '</span></td>' . "\n";

 

if ((($row / 3) == floor($row / 3))) {

?>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<?php

}

}

?>

at the end of the day the code will be good

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...