Jump to content
DunWeb

[Contribution] Featured Products for v2.3.x

Recommended Posts

The reason that the calendar is not displayed in admin/featured.php is that the few links are missing from the file. Need to add:

<link rel="stylesheet" type="text/css" href="includes/javascript/calendar.css">
<script language="Javascript" src="includes/javascript/calendarcode.js"></script>

just below:

require(DIR_WS_INCLUDES . 'template_top.php');
?>

Also, for the special prices to display in product listing on index, need to add the following code below to includes/modules/featured.php:

if (tep_not_null($featured_products['specials_new_products_price'])) {
  $new_price = '<s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s> ';
  $new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>';
   } else {
  $new_price = $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id']));
   }

Also, change in line from:

$featured_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br />' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</td>';

to this:

$featured_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br />' . $new_price . '</td>';

This worked for me, hope it works for you, too.

Share this post


Link to post
Share on other sites

Sorry but probably being blind. Installed the add-on and don't get any errors but it is not showing featured products on the home page. I installed the module and that works fine. I have double checked all my edits and cannot see anything wrong. Please can someone provide a bit of assistance.

Share this post


Link to post
Share on other sites

Copied all the backup files, started again and it's working. Still haven't figured out what I missed first time round.

Share this post


Link to post
Share on other sites

Hi everybody,

 

I have the featured products contribution installed and it works fine.

 

Maybe somebody figuered it out already:

How can I distinguish if a product is featured in the "normal" product listing? So that I can mark it for example with a overlay image "featured"?

(I have already an overlay image "new" for new products and one for "sale" for special offers, but this was quite simple because this information was stored within the products table)

 

Maybe there is an elegant way to add this query to the normal product listing query... without slowing all down to much.

Share this post


Link to post
Share on other sites

I built a little function from one checking if a product is on offer and used it to check if it is a featured product or not, works for me and can be used in category product listing and info boxes.

If someone is interested write me message.

Share this post


Link to post
Share on other sites

I installed the 2.3.x mod for this and its working. (I just read every single post in both support threads... whew)

 

At any rate, I saw a couple people ask how to get the featured products to look the same as the rest of the site, but I didnt see any exact specific instructions on HOW to do it...

 

The site I am working on is:

 

http://www.rivasremedies.com/store/index.php You can see what I mean. The featured products doesnt match the rest of the site at all...

 

It would be great if I can even just ditch the visible table and just make it white with no border... And get rid of the "Featured Products" heading in the top of the table all together... (I will just put the title in plain text on the index page with the other text I added.

 

Thank you in advance. I like the way this works, and appreciate all the time gone into doing this for us...

 

I don't mind paying for your support in this if its necessary. I'm pretty good and reading and following instructions and doing code mods though, so any help you can be for this would be awesome. I just don't even know where this formatting is. I've searched through all the files. Maybe I'm just missing something easy?

Share this post


Link to post
Share on other sites

@@deejay23

 

Featured products uses all of the same css classes as the default osCommerce stylesheet. Your site has been themed or templated, so you will have to change the classes to suit your needs.

 

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

From what I see the add-on uses the old css of osCommerce 2.2 series, it doesn't follow the ui theme styling

 

@@deejay23

 

Mike, since you use MTS, please contact support via email to get the featured products extension that you can configure then as you like in your admin. No code edits necessary

Share this post


Link to post
Share on other sites

From what I see the add-on uses the old css of osCommerce 2.2 series, it doesn't follow the ui theme styling

 

@@deejay23

 

Mike, since you use MTS, please contact support via email to get the featured products extension that you can configure then as you like in your admin. No code edits necessary

 

Contact what support via email? The featured products support, or the MTS support?

 

Thanks for the replies

Share this post


Link to post
Share on other sites

installed the latest featured items addon on osc 2.3.3. Everything seems to be working but somehow featured products are not contained in infobox. any help is appreciated. TIA.

 

www.potala.com

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this contribution.

Is there a possibility to add the manufacturer name ?

 

I add this

 

// Phocea Optimize featured query

$query = 'SELECT distinct p.products_id, p.products_image, p.products_tax_class_id, IF (s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, p.products_price, pd.products_name, m.manufacturers_name

FROM ' . TABLE_PRODUCTS . ' p left join ' . TABLE_MANUFACTURERS . ' m on p.manufacturers_id = m.manufacturers_id

FROM ' . TABLE_PRODUCTS . ' p LEFT JOIN ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c using(products_id)

LEFT JOIN ' . TABLE_CATEGORIES . ' c USING (categories_id)

LEFT JOIN ' . TABLE_FEATURED . ' f ON p.products_id = f.products_id

LEFT JOIN ' . TABLE_SPECIALS . ' s ON p.products_id = s.products_id

LEFT JOIN ' . TABLE_PRODUCTS_DESCRIPTION . " pd ON p.products_id = pd.products_id AND pd.language_id = '" . $languages_id . "'

where c.categories_id IN(" . $catIdSql . ") AND p.products_status = '1' AND f.status = '1' ";

 

AND THIS:

 

 

$featured_prods_content .= '<td width="33%" align="center" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $featured_products['products_id']) . '">' . $featured_products['products_name'] . '</a><br />' . TEXT_MANUFACTURER . ' ' . $featured_products['manufacturers_name'] . '<br>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</td>';

 

But no name appears. What is wrong?

 

Thanks for help

Nico

Share this post


Link to post
Share on other sites

Hello, I installed featured products but when I post the specials do not come out the catalog, in the box when it comes out.

Edited by nachotator

Share this post


Link to post
Share on other sites

Hi,

 

Try this featured.php in

 

/includes/modules

 

Regards

Joli

featured.php


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

@@nachotator

 

Products on special are not part of this contribution. You can feature JUST the specials if you choose that option in the admin area, but otherwise this contribution has little to do with the specials.

 

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Hi,

 

Try this featured.php in

 

/includes/modules

 

Regards

Joli

I downloaded the featured.php and if it worked the specials. Thank you.

Share this post


Link to post
Share on other sites

@@nachotator

 

Products on special are not part of this contribution. You can feature JUST the specials if you choose that option in the admin area, but otherwise this contribution has little to do with the specials.

 

 

 

 

Chris

Hi ,

The file above just included the bug fix for the specials price not appearing (with the normal price stroked through and the specials price in red) if a special was included as a featured product.

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Also, for the special prices to display in product listing on index, need to add the following code below to includes/modules/featured.php:

if (tep_not_null($featured_products['specials_new_products_price'])) {
$new_price = '<s>' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</s> ';
$new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span>';
} else {
$new_price = $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id']));
}

 

 

 

Where in the file should this be added?

 

Tim

Share this post


Link to post
Share on other sites

Hi,

 

Try this featured.php in

 

/includes/modules

 

Regards

Joli

 

I missed this post. I see the download now!!

Thanks, i used it and all is well.

 

Tim

Share this post


Link to post
Share on other sites

Phoenix version uploaded:

Featured Products CE v2.0.0

Featured Products CE v2.0.0. for OSCOM CE Phoenix 1.0.1.x
tested under PHP 7.3

Changes version 2.0.0.:
- Updated for OSCOM CE Phoenix
- moved expire featured products function call from application_top.php into a sitewide hook.
- moved all html output into template files

no more core changes at all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×