Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Featured Products for v2.3.x


Guest

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.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

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

Link to comment
Share on other sites

  • 2 months later...

@@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

Link to comment
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.

 

Link to comment
Share on other sites

  • 6 months later...

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

Link to comment
Share on other sites

  • 5 months later...
  • 4 years later...

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.

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...